Skip to main content

XMPP RA Activity ID

5 replies [Last post]
eduardomartins
Offline
Joined: 2005-10-10

Right now the Activity ID created in XMPP Resource Adaptor is the event hashCode(). This means that each event, which is the XMPP packet received, creates a new Activity.

The XMPP Activity does not have any value for services right now, but the fact that 2 events related arrive at the RA and may be delivered in the wrong order is a real problem right now. Note that this is a real possibility because those 2 events do not belong to the same SLEE transaction because they will be fired to different ACs.

Ok, we need to change that Activity ID, that is mandatory, what I seek here is an agreement to what is the best solution for this key.

The XMPP packet recieved has the following common attributes:

Id: the packet identification
From: the entity that sent the packet
To: the entity that will receive the packet
Type: the subtype of the packet, since the packet type is the element name (Message,Presence,IQ)

In my opinion the ID should be a (From,To) key, this would fix the order of related events problem, the AC creation grain would be appropriated too (not too much, not too less).

Eduardo Martins
PT Inova

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ivelin
Offline
Joined: 2003-07-13

I agree with the proposal, provided that From and To are logical names that do not change as frequently as the physical address of the end points. If this change is introduced, the version of the XMPP RA should be incremented.

Eventually another AC may be introduced when there is implementation for the call control extension of XMPP - Jingle. At that point an SID based AC, which is similar to the SIP Call-ID would be convenient for a number of applications.

Ivelin

eduardomartins
Offline
Joined: 2005-10-10

I was thinking of not changing the RA version, because this is really a bug, and it would avoid to change XMPP services.

As for the change, i propose to set a simple (and fast to build) String using a StringBuffer to append the From and To addresses (with a simple " char, which is forbidden in XMPP adressess, between them to make the String secure).

Also, the resource* of the addresses, if exist, are removed.

Eduardo Martins
PT Inovação

* a XMPP adress, or JID, usually has is in the form of name@domain/resource. The bare address (name@domain) identifies a XMPP user (or entity) and is unchanged, the resource is a dynamic id for a session that adds support to more than one session at a time, which is not supported by MSN for example.

ivelin
Offline
Joined: 2003-07-13

OK, sounds like a reasonable way to proceed.

eduardomartins
Offline
Joined: 2005-10-10

So, can I proceed and create an issue and patch?

Eduardo Martins

ivelin
Offline
Joined: 2003-07-13

please go ahead. Since you have committer rights, you can proceed directly with commit. Please make sure that all XMPP examples continue to work and if there are documents that would become incorrect after the change, then please fix them.