Dispatch rules in riak

Kevin Smith ksmith at basho.com
Tue Feb 2 23:27:37 EST 2010

Alan -

My preference in the situation you describe would be to write the application using webmachine and deploy it separately from the Riak cluster. Separating the application from the Riak cluster permits both components to be upgraded separately and at different times.

As for interacting with Riak from your application, the riak_client module is a better choice. It provides access to all of Riak's features with the low overhead since the client and server are both implemented in Erlang.

Does this answer your questions?

On Feb 2, 2010, at 8:35 PM, Alan McKean wrote:

> I have been trying to set up my own routing rules to allow for serving up static files alongside the dynamic data that I server up from Riak, and any help will be greatly appreciated.
> While there was a demo in previous versions of Riak taht showed how the dispatch map was set up (stickynotes), the latest version seems to not have a similar example. There is an example ('demo') in the apps/webmachine directory, and it shows how to set up dispatch rules in the webmachine_demo_sup:init/1, but it seems to have no relationship to riak. Can someone inform me about how to set up my own routes in Riak?
> A related question regards architecture: is it preferable to have separate webmachine instances that are calling and load-balancing across a tier of Riak servers (via http or riak_client calls) or to embed your application in the Riak instances themselves and hitting them directly from the browsers? The question that I posed above relates to putting app logic in the Riak instances and controlling the routing to that logic. The other approach (fronting the Riak instances with Webmachine instances would either using http REST or duplicating code that exists in Riak for converting the incoming request data (e.g., json) to the raw_resource format that riak_client calls use.
> Thanks
> Alan
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

More information about the riak-users mailing list