[muscle] Question about server behaviour

  • From: James Mansion <james@xxxxxxxxxxxxxxxxxxxxxx>
  • To: muscle@xxxxxxxxxxxxx
  • Date: Tue, 01 Jan 2008 13:43:33 +0000

I'm playing with MUSCLE 4.11 on my XP portable.

I've adjusted the server build to be a DumbReflectServer for convenience, and I have a couple of Java client apps - one of which pumps empty messages at the server, and one of which sucks in messages and counts the rate per second.

I also have a simple homebrew Java server implementation that implements Dumb by way of a learning tool for Apache MINA 2.0.

The behaviour of the two servers is different in a way that I had not expected.

The Java server pretty much pumps messages as it receives them.

The C++ server, however, seems to prefer to read messages rather than to write them. If the sender application sends with little respite (a flush and 10ms sleep every 1000 messages) then the C++ server effectively just sucks in all the messages until the sender stops, and then they get spooled to the receiver.

If I increase the sleep time to 100ms then the message flow is even (at about 6000 messages per second with one sender and one receiver), with a little CPU spare on my machine.

Is this expected behaviour?

James


Other related posts: