<div dir="ltr"><div><div>Hi Lee,<br><br></div>Not sure I understood your problem correct or not. Just try to throw some ideas.<br><br></div><div>What you want to do is similar to the massive online gaming with virtual play rooms. And player wants to get into one player room dynamically decided by the server.<br>
</div><div><br></div><div>Basically, you want to do the following things:<br></div><div>- Service Routing: meaning routing the user to the proper node (having service with least load?)<br></div><div>- Node information sharing/communicating<br>
</div><div>- Load balancing algorithm<br><br></div><div>As my understanding, RIAK (the distributed database in erlang) has capabilities to do more than the above. Maybe you can refer to it as a reference to get some ideas.<br>
<br><br></div><div>Samuel<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Mar 22, 2013 at 3:25 PM, Lee Sylvester <span dir="ltr"><<a href="mailto:lee.sylvester@gmail.com" target="_blank">lee.sylvester@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey guys,<br>
<br>
I'm writing a messaging service where connected users are placed in a room.  Users can then message other users in this same room.  This is the easy part :-)<br>
<br>
I now want to make this service distributed.  Users will be added to rooms in a service that is most "available", so it must be at the nearest datacentre with the least load.  Therefore, I need to find a pattern that allows users to communicate across services.  Essentially, users should be able to message anyone in there room regardless of what service manages their connection.  However, if I have 200 services, but only two people in a room, I'd like to avoid those other 198 services having to deal with the messages.<br>

<br>
Question is, then, does anyone know of a pattern or best practice that supports this paradigm?<br>
<br>
Thanks loads in advance.<br>
<br>
Lee<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br></div>