Hi,
On 4/4/07, yann Blazart <[EMAIL PROTECTED]> wrote:
Hi ! I try to code a replacement of rmi using mina.
In Jdk 5 Rmi take 0.16 ms to make a remote call, but with my mina
implementation I had 0.89 ms !
So I spiciest my own way of coding and made a simple test : a client that
send a string to server (10000 loops)
One call take 0.12 ms !
If a make the client wait for the server response the average call time
take 0.44ms.
Is it normal that mina is so long ?
MINA takes longer to accept a connection than blocking I/O because the
acceptor thread and read/write threads are separated, and it's causing
high latency. But once a connection is established, it will perform
well. Sending messages asynchronously definitely improves
performance. In HTTP, it is called 'connection pipelining'.
Also you might need to adjust socket options such as tcpnodelay if the
size of a message is small.
HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6