What is an "online" jabber user?

Nicolas Niclausse nicolas at niclux.org
Tue Dec 13 00:46:56 CET 2005

Jason Tucker a écrit :
> On 12/12/05, *Nicolas Niclausse* <nicolas at niclux.org
> <mailto:nicolas at niclux.org>> wrote:
>     Jason Tucker a écrit :
>     > On 12/9/05, *Nicolas Niclausse* <nicolas at niclux.org
>     <mailto:nicolas at niclux.org>
>     > <mailto:nicolas at niclux.org <mailto:nicolas at niclux.org>>> wrote:
>     >
>     >
>     >     Yes, a user is considered online as soon as he is connected,
>     so it's
>     >     possible to get an offline message in the case you describe.
>     >
>     >
>     > Is there any way this behavior can be altered? It would be *much*
>     better
>     > if tsunami only considered a user online after they have
>     authenticated.
>     Is it after authentication or after the "presence"  msg is received by
>     the server ?
> After authentication. During the last part of the authentication phase,
> the client sends an jabber:iq:auth 'set' mesage to the server. Assuming
> successful authentication, the server would respond with an iq
> type='result'. At this point the client session is fully established -
> any messages sent to this client prior to this point will go to offline
> message store.
> For my purposes, it would be ideal if there was a way to put this in the
> idx-tsunami.xml as a configurable element. This part of the tsunami code
> is well beyond my skills, though, or I'd try to contribute something.
> While we're on the subject, would you have any idea why at around 25,600
> (approximately) we would start running into problems with messages sent
> to online users? The test starts off OK (sometimes sporadic offline
> messages due to the problem we've discussed), but basically goes well
> until about ~25.6K users. Then suddenly, like clockwork, tsunami starts
> hitting *recently* connected users with messages - before they have a
> chance to auth. I don't know how tsunami stores the list of online
> users, or how it then selects an online user to send a message to... but
> it is very odd that it always happens at this point.
> Anyway - if the first problem could be fixed (onlline only if authed),
> then the second part of my problem would probably be irrelevant.

I've made a small patch. Instead of having 2 state in the user_server,
we have 3: online, offline and connected. So you just have to call
add_to_line(Id) somewhere to switch from connected to online. In the
patch, the call is done just before the auth. msg is sent, so it still
not perfect.

WARN: it's completely untested (i'll try to test the patch tomorrow).

For your 25.6K problem, i don't know. What is the value of userid_max ?
Do you have something in the logs ?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: jabber.patch
Type: text/x-patch
Size: 6269 bytes
Desc: not available
Url : http://lists.process-one.net/pipermail/tsung-users/attachments/20060520/654529ac/jabber.bin

More information about the Tsung-users mailing list