Architecture Questions

I am trying to track down some issues with the gateway and ran into a few general questions:

  1. What is the gatewayPseudoRoster table for and when is it used? It seems to hold roster elements for each user for each transport. However, I thought that the gateway component imported those into the XMPP roster when the user registers with a transport. Is this gatewayPseudoRoster used every time the user logs in, or just during the gateway registration?

  2. If a user is deleted using the Delete User operation in Openfire, are that users entries in gatewayPseudoRoster and gatewayRegistration and gatewayRestrictions also removed?

  3. Are there any other database tables that the gateway component writes to?

Thanks!

sphillips wrote:

I am trying to track down some issues with the gateway and ran into a few general questions:

  1. What is the gatewayPseudoRoster table for and when is it used? It seems to hold roster elements for each user for each transport. However, I thought that the gateway component imported those into the XMPP roster when the user registers with a transport. Is this gatewayPseudoRoster used every time the user logs in, or just during the gateway registration?

The real XMPP roster of the user is generally left alone. The only thing that’‘s added officially to it is the transport itself, and that’‘s only if you aren’‘t using Spark. The actual roster items in the XMPP roster are “non persistent” and not stored for real anywhere. That said, typically the legacy roster (MSN, AIM, whatever) is treated as the gospel. So you if I see a contact A in group B on the legacy roster, that’‘s where it’'s going in the XMPP non-persistent roster. Likewise, if you change things like nicknames and groups, they are reflected on the legacy service.

The PseudoRoster comes into play when the legacy roster doesn’‘t support certain things. For example, IRC has no concept of a server side roster, so I store all of the contact information in the pseudo roster table. I am not sure off the top of my head, but I think Yahoo is the one that doesn’'t support contact nicknames and such, so I store the nicknames in the PseudoRoster. Consider it a “glue” table.

So yes, it’'s used every time a user logs in -if- the transport in question actually uses the table.

  1. If a user is deleted using the Delete User operation in Openfire, are that users entries in gatewayPseudoRoster and gatewayRegistration and gatewayRestrictions also removed?

Hrm. You know what, nothing is cleaned up when a user is deleted. I hadn’'t thought about that. GATE-203. Thanks!

  1. Are there any other database tables that the gateway component writes to?

It only directly writes to the tables prefixed with gateway. All other tables it interacts with are through Openfire APIs.

OK thanks!

How do you handle the case where a user may add, for example an AIM contact to their roster using the AIM native client? Do you attempt to fetch the roster every time the user logs in and add new contacts to the pseudo roster?

The reason I am asking such questions is that I am trying to determine if my client should issue a iq:register to each transport every time they login, or only do that once (like when the XMPP account is created).

Thanks

Message was edited by: sphillips

Yup! In fact at the moment I’‘m literally pulling down the entire contact list every time. (as part of the login process) I’'ve kicked around the idea of storing the contact list version number in the future and not always pulling it down, but that will require more caching of the contact list and a lot of involved work.

Just to clarify/make sure, I don’'t believe the AIM piece is using the pseudo roster at all.