[muscle] ReflectServer::ServerProcessLoop

  • From: Wilson Yeung <wilson@xxxxxxxxx>
  • To: muscle@xxxxxxxxxxxxx
  • Date: Tue, 24 Aug 2004 11:30:23 -0700

In ReflectServer::ServerProcessLoop, the method is expected to possibly 
never return.  It is, afterall, busy doing stuff. :)

But that makes it difficult to integrate external event loops.  In many 
event loops, there's the notion of  do_loop(), which runs until forced 
exit or error, and do_once() which returns after one iteration of the 
loop so that other tasks can be scheduled and run, and then do_once() 
is called again ... and again ... and again. :)

I couldn't find the equivalent in ReflectServer.  Is there some thought 
of adding such a thing?

The reason why I ask is because I'm currently writing a custom server 
which needs to additionally process messages from other muscled 
servers.  That is, the custom server will be a muscled server and also 
be a client of other muscled servers.  It'll slurp in data from the 
other servers, and publish the data to itself.

I'd rather not create another process that just forwards the data, 
mainly because it seems wasteful -- as I'm already pushing more than 
50,000 messages per minute, I'd like to trim down the amount of sending 
and receiving and duplicate data sitting around on various processes.


Other related posts: