8
submitted 1 month ago by [email protected] to c/[email protected]

I'm exploriing the idea that would be the "reverse" of Libervia: an offline-first AcitivityPub application that keeps all information in the client and only relies on the server to be the receiver of the inbox messages. To make sure that the client can synchronize properly, I am considering two approaches:

  1. The server and the client need to use the same database which has a replication protocol (like CouchDB/PouchDB)
  2. The server receives the messages in the inbox via HTTP, but relays to the client via XMPP.

The first idea simplifies things a bit, but forces the client to use a specific tech stack. I'm also not sure if the server needs to have everything replicated, just the messages that the device haven't seen yet.

I'd also be interested in something like MUC, because I would use to let the server use rooms for things like Mastodon's "follow tags".

Lastly, because I'm planning to do this as a browser extension, it would have to be something that runs on the browser. xmpp.js seems like a good candidate (lots of contributors and reasonably well documented), but the last commit was from two years ago. Is it still being used/maintained? If not, is there any other recommendation?

top 4 comments
sorted by: hot top controversial new old
[-] [email protected] 3 points 1 month ago* (last edited 1 month ago)

Javascript libraries are not in the best shape, but you could try to use the headless version of ConverseJS.

Edit: there is a version of ConverseJS that works as a browser plugin called "Pade" if I recall correctly. Might be a good reference point.

[-] [email protected] 1 points 1 month ago

Thanks. I've seen ConverseJS but it seems overkill to what I have in mind. Is there any part of the modules that can be taken out of the main code base and used just to authenticate and receive the messages?

[-] [email protected] 3 points 1 month ago
[-] [email protected] 1 points 1 month ago

That looks more like it! I will try them out and report back how it went. Thank you very much!

this post was submitted on 02 Jun 2024
8 points (100.0% liked)

XMPP

266 readers
1 users here now

XMPP (aka Jabber) is the community-owned standard for real-time federated messaging.

For a quick start click here

JoinJabber.org support chat

JoinJabber.org admin support chat

XMPP.net Provider List

Also see JoinJabber.org FAQ

founded 1 year ago
MODERATORS