Doubts about PubSub

Just a bunch of doubts:

  1. using PubSub with Openfire, where do the nodes/leaves get stored?
  2. if I make a persistent node, when a client (that is following it?) connects to the server, he’ll get all the leaves automatically?
  3. is it possible to “edit” a leaf? (will then the “update” get pushed to the listening clients?)

What I am trying to implement is a “Whiteboard” - many different nodes with editable leaves (add, delete, edit).

Thanks

I assume referring to the published items as “leafs”? This is somewhat deceiving since pubsub uses collection nodes, leaf nodes and items which are published to the leaf nodes.

As for your questions:

  1. In the database.

  2. No, they have to be requested.

  3. If by leaf you mean item, then yes. You simply publish an item with the same id, it will overwrite the existing one and publish the update.

You’re welcome

Thanks

So if I understand correctly, we can have multiple collection nodes, each with many nodes and each node has many items ?

Yes, but only leaf nodes can have items while collection nodes can contain either node type. Thus you can have a hierarchy of nodes down to a leaf node.

Oh, I see

And apart from looking the database tables, is there a way to visualize the PubSub tree in the admin panel ?

Afraid not. There is no UI admin component for pubsub.

Thanks

Uhm, if I may continue here, I have another question (hopefully last one):

since I am quite new to XMPP in general, I just discovered that each JID has a resource, and this can be the “location” from which the user is connected: if the users is connected with, let’s say, Spark and a simple Smack implementation at the same time, I see 2 sessions for the user (one with res. “Spark” and one with res. “smack”), which is great.

What if that user using Spark (hypothetically) publish/subscribes to a node? Will the other instance using smack get notified if listening?

If this is not so, I probably have to read more about resources and pubsub spec.