Hello,
In fact, while coming up with a small reproducing sample, I realized
that the code is working with multiple clients if the data sent is
small. In the sample, the objects are around 1 KB, and in the case that
doesn't work, much larger objects are sent ( > 700 KB).
This tells me that something is definitely wrong in my code. Let me do a
little more investigation into this, and I will update you on what I find.
Sincerely,
-Laurent
On 03/01/2010 15:12, Emmanuel Lcharny wrote:
Laurent Cohen a écrit :
Hello Emmanuel,
Thanks for your reply. I'm perfectly comfortable with English, so I'd
rather stick to it, in case anyone else could benefit from reading
this thread.
As far as I know, the points you mentioned previously are already
handled. The only thing I do not need to handle is the case where we
have multiple messages per incoming buffer, because the application
is built in such a way that a client always sends a single message,
and always in response to a server command.
The code I'm using is essentially an adaptation of existing code that
was using non-blocking NIO low-level APIs directly, and it was
already handling these issues, including potentialy partial length
values.
The code for this can be found there:
http://jppf-project.cvs.sourceforge.net/viewvc/jppf-project/server/src/java/org/jppf/server/mina/nodeserver/NodeMessage.java?revision=1.1&view=markup
In any case, if I were missing one of these points, it wouldn't even
be working with a single client, would it?
Not necessarily, but at this point, I would first check that the code
with a single client is correct, as you suggested :) I think that your
approach is correct.
What would help is a simple multi-threaded client injecting messages
to the server, in order to be able to reproduce the problem easily.
It's difficult to tell what's going wrong by looking at the code... :/
As per your request, I can put together a simple test that will
reproduce the issue. I just need to take some time to package it, I
hope it's OK if I send it tomorrow or the day after?
NP, I'm currently a bit busy too with some bugs to fix on another
project.