[muscle] Re: Server design

  • From: Jeremy Friesner <jeremyfriesner@xxxxxxxxxxxxx>
  • To: muscle@xxxxxxxxxxxxx
  • Date: Mon, 3 Nov 2003 16:16:15 -0800 (GMT-08:00)

Hi Marius,

>I stumbled on MUSCLE while researching toolkits for client/server application 
>toolkits, and based on the information I have read so far, it looks like a 
>very solid design.

Thanks :^)

>1) Server design. Should I plan on extending the muscled daemon, adding my own 
>authentication layer and session logic, or would it be just as good just to 
>have a "server" as a separate process to another muscled process, where my 
>"server" (typically running centrally under my control) would take care of 
>controlling which messages gets distributed to what clients through the 
>muscled daemon?

Typically the server is a process that you manually start on the 
server computer, similar to how muscle's built-in muscled executable works.

The best way to do it is to make your own subclass of the StorageReflectSession 
class (or AbstractReflectSession if you don't want/need the database or live
query features) and add in any necessary custom logic there.  You may also
find it useful to make a "persistent state session" that contains state 
information
that isn't specific to any particular client.  This session would not be 
associated
with any particular client, but would hang around permanently and interact
with the clients' sessions.

If you haven't seen it already, be sure to read this article:
   http://www.lcscanada.com/muscle/muscle/html/Custom%20Servers.html

>2) Has anybody added SSL transport support?

Not that I'm aware of.  But if you end up making an SSLDataIO wrapper
class, I'd be happy to add it to the distribution!

>3) Anywhere I can look for more documentation or application examples?

Check out this article I wrote about multiplayer games
with MUSCLE, it includes an example multiplayer game
(only Windows binary and source links are working though,
the other files seem to have disappeared from the server :^( )

http://www.osnews.com/story.php?news_id=1523

Also, feel free to ask more questions here!  :^)

Jeremy


Other related posts: