Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] XMPP: Post to PubSub #2475

Open
sjehuda opened this issue Apr 17, 2024 · 2 comments
Open

[Feature Request] XMPP: Post to PubSub #2475

sjehuda opened this issue Apr 17, 2024 · 2 comments

Comments

@sjehuda
Copy link

sjehuda commented Apr 17, 2024

Greetings!

In XMPP, using PubSub(1) (XEP-0060), it is possible to store posts as Atom Syndication(2) entries into XMPP(3).

There are several XMPP extensions that apply it, namely XEP-0227 (4) and XEP-0472 (5) which make node urn:xmpp:microblog:0 as a common choice to manage news for client accounts (e.g. blog@getzola.org), yet a component account (e.g. pubsub.getzola.org) may use all of its nodes for this purpose.

pubsub.getzola.org/
|
|-- updates/
    |-- Sombre
     `-- Varied
|-- releases/
 `-- events/
pubsub service/
|
|-- node/
    |-- item
     `-- item
|-- node/
 `-- node/

A Rust library that can be utilized would be xmpp.rs.

I have made a script that realizes viewing PubSub node items as Atom XML feeds over HTTP.

XEP-0060: Publish-Subscribe
RFC 4287: The Atom Syndication Format
Atom Over XMPP
XEP-0277: Microblogging over XMPP
XEP-0472: Pubsub Social Feed
XMPP in Rust
PubSub Over HTTP

@Keats
Copy link
Collaborator

Keats commented May 27, 2024

What does this mean in practice for Zola?

@sjehuda
Copy link
Author

sjehuda commented May 28, 2024

It means two (or three) things that I can think of:

  • Making published posts available to the public, also via XMPP, even without an HTML browser *;
  • Incorporating Zola posts inside an XMPP groupchat, in addition to groupchat's PubSub feed **.
  • Making posts easily sharable over the XMPP network.

The following pages display*** PubSub node items on the XMPP network Phoronix and PlanetJabber. These posts are stored (i.e. published) on an XMPP server on a PubSub service "news.movim.eu", one at node "Phoronix" and the other on node "PlanetJabber".

* By publishing to XMPP, people can receive "push" updates to their account, and it is also possible to make posts selectively accessible to certain people (i.e. Jabber ID) which are white-listed for a given post.
** Incorporation of chat with PubSub reduces the need of having an Atom/RSS bot that would constantly scan for updates.
*** I deliberately do not use the word "contain" because pages Phoronix and PlanetJabber are generated by Movim which also acts as a proxy XMPP<->HTTP.


An additional note about PubSub

Making published posts available on XMPP, van be either on a dedicated PubSub service (i.e. "news.movim.eu") or either on a Jabber ID (i.e. "keatas@movim.eu") or even both, which means that it is possible to associate your Zola publication with your account which means as follows:

Case 1
In case Schimon is subscribed to the PubSub node of "keatas@movim.eu", he will receive the update instantly.

  • 11:00 Schimon and Keats are corresponding with each other;
  • 13:00 Keats is publishing a new post;
  • 13:01 Schimon receives a notification of a new post from Keats.
  • 13:15 Schimon reads the post of Keats directly from his XMPP client.

Case 2
In case Schimon is not subscribed, he will see an indication of a new post which Keats has, the next time he opens a chat with Keats or view the contact row of Keats in his roster (contact list).

  • 11:00 Schimon and Keats are corresponding with each other;
  • 13:00 Keats is publishing a new post;
  • 15:00 Schimon opens the chat with Keats and notices the indicator which indicates that a new post has been made a couple of hours ago.
  • 15:00 Schimon reads the post of Keats directly from his XMPP client.

This is probably the most important aspect of Zola (or any other CMS) posts as PubSub being associated with ones account, because it creates rapport and also make your publication in the same spot where your account is, instead of having a Jabber ID (XMPP) and an HTML site (HTTP), usually on two different places.

Also notice that Keats - by himself, "in flesh" - did not ask or notify Schimon that he has made an interesting post; Schimon was notified only by his XMPP client software.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants