It looks like you know what I'm speaking of...I didn't spoke of
$NickList <nick1>$$... do you program in DC protocol ?
I send the list containing all connected users (all myinfos) to each
connected user, I don't send a single myInfo to each connected user, so
I think here I'm ok.
I'm here on the HSQLDB...probably I have to do a tutorial tonight
(ahahha) !
When you write:
i maintain user-lists in memory and have them "cached" as a ByteBuffer.
You would mean direct connect hub userlists ? If so you can directly
help me ! I also have them in memory simply in a String...but I have to
get them from a hashmap, I correct a ConcurrentHashMap
(java.util.concurrent) so I have to iterate it and create the userlist,
I put the result in a String that I modify (and so re-iterate the
hashmap) when a new myinfo is sent to the hub.
P.S. I use ConcurrentHashMap because I had a lot of
ConcurrentModificationException or something similar...this is really
thread- safe
Best regards, see you soon !
Kaspar Lüthi wrote:
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.
i.e.
$GetNickList
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
(http://www.opensymphony.com/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?
kaspar