directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kaspar L├╝thi <>
Subject Re: [MINA] Short or long messages for IoSession method write(...) ?
Date Mon, 02 Jan 2006 21:33:58 GMT
> Do you mean a message for each session ?

i mean send one message to the connecting user containing a list of all
connected users instead of sending him a message for each connected user.

to which the server must reply,
    $NickList <nick1>$$<nick2>$$<nick3>$$...

but maybe i don't understand your scenario correctly.

> Or is there some method I don't know to group all the messages for all
> sessions and to delegate the work to a low level  of mina ?

all sessions for all messages? sounds scary :)
there is no session-grouping or sendToGroup function in mina, afaik.

optimum would be using ByteBuffer.duplicate() to send one message to multiple
sessions ("broadcast"). it's missing on the higher level, due to the automatic
pooling and the autosize-feature of the mina-ByteBuffer.

optimum for sending multiple messages to one session would probably be using
gathering writes offered by java.NIO. this is not supported in mina, afaik.

> And then iBatis is surely more performant than hibernate ?

its something different, more "low level", you write sql in xml.

for my case i just use plain JDBC and prepared statements (prepared once on
application startup on multiple connections). JDBC itself is already enough
abstraction for my taste :)

i maintain user-lists in memory and have them "cached" as a ByteBuffer.

if you are only looking for caching, maybe OSCache
( is another thing to try.
i notice you are quick in trying out stuff...

> I'm trying with HSQL now...I hope...bye ;-)

... :) good luck.
for curiousity: how do you test performance?


View raw message