On 04-09-2012 13:56, Bernard Fouché wrote:
Maybe this proposal is already an error by itself (comments welcome!)
Possibly :-) - see below for things you should at the very least be aware of.
  It triggers the following questions (from what I've understood from Erlang
and Riak at this point):

- When multiple rings are needed, it seems that each ring needs a new
Riak instance on each node. But all examples I found are about running
an Erlang VM per Riak instance, instead of having more than one Riak
instance in a single VM. I'd like to know if there is a solution to run
many Riak instance in a single VM since Erlang seems to be designed to
sustain large quantities of processes in a single VM instead of having
many VM on a single host (for better resource management/monitoring).
I'd like to know what is really possible with Riak regarding multiple
instances ?
You can run multiple apps in a single Erlang VM.
But you can not run multiple instances of the same app - for one thing, there are singleton processes which are registered with a certain name.

A close match to what you're asking - *in case* you really want to run multiple rings and cannot just use a backend with auto-expiry - is to run multi_backend with appropriate configurations (i.e., data dir locations).

However, that would leave the problem that the individual storage backends would presumably be confused when all of their files are deleted under their feet. That can probably be solved by making a storage backend wrapper for such "droppable" buckets, which can shut down the actual backend prior to deletion. (The deletion functionality should then be put in that wrapper).

- For the same reason, I'd like to have the server that process the
traffic coming from the sensors in the same VM, to have just one VM per
physical machine. Is there some doc about bundling an Erlang user made
app with riak in the same .beam (a 'release'?)?

- Or if a user can tell if having many different Erlang VM running Riak
on a single node works efficiently?
At least with LevelDB, there would be a potential problem with the number of simultaneously open FDs. Note that that's also the case with one Riak instance which has many LevelDB backends under a multi_backend.

All in all... if you can use auto expiry, it'll be less trouble.

/Erik
--
Mobile: + 45 26 36 17 55 | Skype: eriksoesorensen | Twitter: @eriksoe
Trifork A/S | Margrethepladsen 4 | DK-8000 Aarhus C | www.trifork.com <http://www.trifork.com/>
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to