[Standards-JIG] Using pub/sub as a private storage

Maciek Niedzielski machekku at miroku.uaznia.net
Wed Dec 21 16:59:43 UTC 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've been thinking recently what to do about old private storage and its
problems and I invented a private pub/sub extension.
I'll try to show a sample use by using Annotations.

Creating a private node (the syntax is not really important right now)

<iq type="set"
    from="me at example.org/Work"
    to="pubsub.example.org"
    id="create1">
    <pubsub xmlns="http://jabber.org/protocol/pubsub">
        <create node="private/annotations" private="true"/>
        <configure/>
    </pubsub>
</iq>

Two important things about private nodes:
1. Private node name has to be unique only per user, not per all pub/sub
service users. So I can have a private "annotations" node and my friend
can have a private "annotations" node on the same pub/sub service.
2. Private nodes are not accessible (and not visible) for anyone else
than their creator.

Now to publish an annotation for someone at example.org, we publish a new
item and use "someone at example.org" as its ID.

<iq type="set"
    from="me at jabber.org/Work"
    to="pubsub.example.org"
    id="publish1">
  <pubsub xmlns="http://jabber.org/protocol/pubsub">
    <publish node="private/annotations">
      <item id="someone at example.org">
        Here something about the person.
      </item>
    </publish>
  </pubsub>
</iq>

Since this is a pub/sub service, we can solve Private Storage's problem
with changes while having multiple resources connected: the service will
send notifications to all other connected resources:

<message to="me at example.org/Home" from="pubsub.example.org">
  <event xmlns="http://jabber.org/protocol/pubsub#event">
    <items node="private/annotations">
      <item id="someone at example.org">
        Here something about the person.
      </item>
    </items>
  </event>
</message>

Of course, this requires that the pub/sub service has subscription from
the user.

Deleting an item works the same.


When a client connects to the server and wants to get all annotations,
it has to request all items from a node, just like in normal pub/sub.
It may be a good idea to use JEP-0150 (Entity Tags) to save some traffic.


Yes, there is at least one open issue: how to get the address of my
private pub/sub storage...

- --
Maciek
 xmpp:machekku at chrome.pl
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1-nr1 (Windows XP)

iD8DBQFDqYn+7knNPWzAbeURAjqgAKCreZrWu1Y4vv7KO9yfBERfnqkq5QCg3C3X
3INxHkuRdB6fMZ3a18xSvqw=
=fn/8
-----END PGP SIGNATURE-----



More information about the Standards mailing list