Is MUSCLE appropriate to use as our communications engine?

Asked by Rick Stovall

Rather than rolling our own IPC layer, I'm thinking it may be advantageous to use this pre-rolled system Any thoughts?

https://public.msli.com/lcs/muscle/index.html

The MUSCLE system is a robust, somewhat scalable, cross-platform client-server solution for dynamic distributed applications for Linux, BSD, Windows, MacOS/X, and other operating systems. It allows (n) client programs (each of which may be running on a separate computer and/or under a different OS) to communicate with each other in a many-to-many message-passing style. It employs a central server to which client programs may connect or disconnect at any time (This design is similar to other client-server systems such as Quake servers, IRC servers, and Napster servers, but more general in application). In addition to the client-server system, MUSCLE contains classes to support peer-to-peer message streaming connections, as well as some handy miscellaneous utility classes. As distributed, the server side of the software is ready to compile and run, but to do much with it you'll want to write your own client software. Example client software can be found in the "test" subdirectory.

Question information

Language:
English Edit question
Status:
Solved
For:
New Real Time Battle Edit question
Assignee:
NRTB Core Edit question
Solved by:
Rick Stovall
Solved:
Last query:
Last reply:
Revision history for this message
Rick Stovall (fpstovall) said :
#1

More information: I'll be moving towards a resolution of this question in the next 5 days. If you have feedback, please provide it by Wednesday, March 9th so that I may include it in the final evaluation. I will publish the final determination which will be published on Friday, 2010-02-11.

Revision history for this message
George Jordan (gsjordanc) said :
#2

I am having reservations about MUSCLE. The part that "scares" me is the part about the speed of service.

********** From the web page **************************************************
"Is TCP stream communication fast enough for my app? Do I need to use lower level protocols such as UDP or ICMP?
MUSCLE does all of its data transfer by serializing Messages over TCP streams. If your application is a particularly high-performance one (such as video streaming), MUSCLE may not be able to provide you with the efficiency you need. In this case, you might use MUSCLE TCP streams for your control data only, and hand-code separate routines for your high-bandwidth/low-latency packets. I've used this pattern (TCP + UDP) in audio-over-Internet programs before and it works well.

In addition, you should be aware of the CPU and memory overhead added by MUSCLE to your communications. While MUSCLE has been designed for efficiency, and will not make unreasonable demands on systems that run it, it is necessarily somewhat less efficient that straight byte-stream TCP programming. Specifically:

Its use of Messages means that there will be several dynamic allocations and deallocations, and an extra data copy, for each message sent and received. (note: ObjectPools are used to minimize the former)
It uses arbitrary-length message queues to avoid ever having to "block" your application's threads. While this will keep your application reliably responsive to the user, it can potentially use a lot of memory if you are producing messages faster than the network connection can send them.
If you use the MessageTransceiverThread class there will be one extra thread used for each MUSCLE TCP connection. In addition, MessageTransceiverThread (and the muscled) uses select() to arbitrate data flows, which can be inefficient under the currently released (R5 and earlier) BeOS networking stacks. (it's more efficient under other operating systems, and should be fine under BONE as well)"

****************************************************************

If you can explain how this is not an issue/problem for us, then I would feel better about it.

Revision history for this message
Rick Stovall (fpstovall) said :
#3

We are using custom written communications classes, moving GPB (Google Protocol Buffer) messages over TCP/IP. This should be both lighter and faster than MUSCLE for our purposes.