| Brian Lesser 2005-08-31, 5:50 pm |
| Hi Daniel,
That's an excellent question. There are a number of different
approaches. In the book I show one example where all the lobbies connect
to a master instance but don't really describe how message passing
between lobbies works. One approach with the single master/multiple
lobbies is to use the master to route messages between lobbies. One
assumption behind this is that each client will always stay connected to
one lobby as well as to any number of rooms. So things like chat
invitation messages always go from lobby to master to lobby and no rooms
are involved. Another assumption is that the system must know what user
is connected to each lobby. The easiest and least memory intensive way I
know of to deal with this is to keep track in a database who is logged
into each lobby. When a client wants to do something like send a chat
invitation to a list of people the lobby makes a remoting call to lookup
the lobby each invitee is connected to. An RMI to the master with a list
of users, an invitation message, and user locations can be sent to the
master for distribution to other lobbies.
Another approach is to have the lobbies connect to each other intead of
using a Master instance as a message relay. For very large scale
applications one master instance will not be able to handle the load.
Another approach is to have the Web application connect to and update
the lobbies itself with a client invitation. For that we need MM to
deliver the Java SDK they mentioned in the Sneak Peek.
Yours truly,
-Brian
Daniel Pedro wrote:
> Just looking over the PFCS book, by the way very well written, I am still struggling with the Lobby/Room concept. The main thing that concern me is if you are in one room and you wish to RMI to another how can it be done? even with the master example I
don't quite see how a room can RMI to a lobbywhich in turm can RMI to another Lobby then to another room???I am basically trying to not only send private messages accross rooms but also call other specific functions. Please helpSorry for simple question..
... Thank you in advance.Danny.
>
> ________________________________________
_______
>Join Excite! - http://www.excite.com
>The most personalized portal on the Web!
>
>=-----------------------------------------------------------
>Supported by Fig Leaf Software - http://www.figleaf.com
>=-----------------------------------------------------------
>
>To change your subscription options or search the archive:
>http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
>
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
|