HMTP - publish/subscribe packets
Tuesday, January 20th, 2009
With the rise of instant events like twitter and RSS, publish/subscribe technologies are finally getting the respect they deserve. With HMTP, a client can subscribe to a message stream and wait for messages to arrive, avoiding the need for polling. In fact, since HMTP is an addressable architecture, the client can subscribe to multiple publishing services at once, with a single connection and receive notifications as they happen, not waiting every 15 minutes.
To support publish/subscribe (and following the Jabber/XMPP specification), HMTP has 8 packets devoted to subscriptions and presence notifications:
- presence - notify a service that a client has logged in
- presenceProbe - query for client capabilities (text, html, mp3, etc.)
- presenceUnavailable - notify that a client has logged out
- presenceSubscribe - request for a new subscription
- presenceSubscribed - successful subscription notification
- presenceUnsubscribe - unsubscribe from a service
- presenceUnsubscribe - notice of unsubscription
- presenceError - error occurring during presence/subscription
