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:
In the database.
No, they have to be requested.
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.
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.
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.