Difference between Pubsub and PEP

I’ve had lots of opportunity over the past few weeks to work with both PEP and Pubsub. While both delivers data/item/payload, the way the 2 services are structured are quite different. The following table list their respective differences

Pubsub PEP
Service discovery
  • Typically discovered by sending a disco#item to the server
  • Discovered via entity caps in the presence
Node
  • Can create/delete multiple nodes if authorized.
  • Node can be configured during creating
  • Only one node, your JID; and cannot be deleted.
  • Not configurable
Publish/subscribe
  • Depending on configuration, anyone can publish/subscribe to nodes (list-single_access-model, list-single_publish_model)
  • Declare in your disco#info your intention to publish certain type of info or receive certain type of info
  • Only those in your roster and have declared their intention to receive the type of info will receive it
Payload
  • Configurable number of items that you can persist in the node (persist_items, max_items)
  • Can either deliver a notification of the payload or the payload itself (deliver_payloads)
  • Payload may be marked delayed and timestamped if they are delivered after the fact
  • Persist only the last payload published
  • No timestamped/delay delivery

Hopefully this will help you decide which model is suitable for your need. Let me know if you spot any mistakes or give me feedback.

Advertisements
%d bloggers like this: