You can, I've done this, you have to modify the /etc/riak/vm.args to
include and start your application (assuming your application has a start/0)
function.

So if you have a foo app, you can add something like

-pa /usr/lib/erlang/lib/foo-0.0.0/ebin
-s foo_app

Then if foo_app.erl has something like

-module(foo_app).

-export([start/0]).

-behaviour(application).
-export([start/2,stop/1]).

start() ->
 application:start (foo).

start(_,_) ->
  foo_sup:start_link().

stop (_) ->
  ok.

That should do it.

-Anthony

On Wed, Jun 08, 2011 at 11:49:28AM -0400, Evans, Matthew wrote:
> Hi List,
> 
> I'm new to riak, and I am thinking of using riak to store log file / 
> statistics information from a client application. The main benefit riak could 
> offer here are its map-reduce/search capabilities.
> 
> The client side applications are developed in a variety of languages, but in 
> the end all requests will be tunneled via a light weight API to our own 
> Erlang "admin" application.
> 
> I've noticed that the riak Erlang API really dispatches requests to the riak 
> cluster via the gen_tcp module. The logging (insert) rate could be very high, 
> so what would be neat is if I could embed our Erlang "admin" application 
> directly into the riak cluster to avoid the IPC hop between the 
> riak-erlang-client node and the riak node(s).
> 
> Now obviously I can fork the code and implement my own way of doing this, but 
> the question is there an official way to embed your own code directly into a 
> riak cluster to avoid that extra IPC hop?
> 
> Thanks
> 
> Matt

> _______________________________________________
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


-- 
------------------------------------------------------------------------
Anthony Molinaro                           <antho...@alumni.caltech.edu>

_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
  • Erlang API Evans, Matthew
    • Re: Erlang API Anthony Molinaro

Reply via email to