Idavoll rewrite (continued)
Lately I've been hacking on Idavoll's rewrite in Twisted. I'm now at the point that I can claim the most basic protocol requirements as defined in JEP-0060 have been implemented in Idavoll, a Jabber based Publish-Subscribe service.
I managed to find a nice architecture for Idavoll that makes it
possible to write different storage backends, and use Twisted services to
implement the various parts of the pubsub protocol. Currently, there is
one service that implements the mandatory pubsub stuff, and one service
that does the Idavoll specific stuff, like responding to
jabber:iq:version and Service Discovery
I make a distinction between Idavoll and the pubsub service
implementation. Idavoll is a complete server side component, of which the
pubsub service is one part. In the future, Idavoll might also interact
with other protocols such as HTTP or XMLRPC. These would be separate
services communicating with the backend. Also, we could listen for other
Jabber based subprotocols like presence, and implement those as seperate
services too, interacting with the rest of the component. The Idavoll
specific service asks the other services for replies to a disco request
and collects the answers to form one reply. Maybe this should become part
twisted.protocols.jabber.component down the road.
I'm still playing to find the best way to implement this, though.
The only backend available at the moment is a memory based one. It
stores all data in python structures instead of relying on files or a
database. Currently it is pretty static, as Idavoll does not jet support
the protocol for creating nodes and subscribing to them. The nodes,
subscriptions and affiliations are hardcoded in the backend as a
dictionary. Nevertheless, for the most basic uses, this could already be
enough to be usable in embedded systems. In the
Release Often mantra, the current code can be found in the
idavoll2 directory of the idavoll
module in the JabberStudio CVS repository.
No doubt many things will change, but have a look, and let me know what