SàT Progress note 2019-W15

goffi 5 years ago jabber-xmpp-en SàT project libre SàT progress

Hello everybody,

I've decided to start writing regular progress notes on this blog, so I can have more feedback from you :). The goal is on one hand to show what is worked on, and on the other hand to explain some technical/design decisions. I'll try to make it weekly, but it's not a promise (maybe this one will be the only one who knows). Also even if I often try to publish both in French and English, this is additional work and I need to focus, so this will probably be English only.

For people who haven't heard about the project, Salut à Toi (or SàT) is a communication ecosystem, libre (free as in freedom), decentralised, encrypted, multi-platforms and based on the rock solid XMPP standard. There are numerous features, among which chat, blog, events, files sharing, etc. and even a web framework. You can check https://salut-a-toi.org for details. Cagou is the frontend for desktop/Android, Libervia the web frontend (which include the web framework), jp the command line frontend, and Primivitus the TUI (Terminal User Interface).

Let's go with this first weekly progress note.

This week I've been working on connection change on Cagou on Android: when disconnected, the backend will try to reconnect every 30 s, this makes no sense when network has been disabled, and would be bad for battery. Now, thanks to pyjnius and android module from python-for-android, backend can check connectivity status, and get notified when there is a change. With those data, the reconnection can be adapted to the situation.

This was the last feature I wanted to implement for Cagou. It is now ready for beta. I'm already aware of a couple of troubles, they will be corrected during beta phase.

To save some bandwith on connection, roster versioning has been implemented.
So far SàT was requesting whole roster (the name of the contact list in XMPP) at each startup, which is not really optimal. Roster versioning lets client keep a local cache, and request only for changes (added/removed contacts) since its version in cache.
This was already handled in wokkel that SàT is using, but roster needed to be saved in local storage, and updates to be managed. A jp roster resync command has been added to force a full resynchronisation with server.

On Libervia I've added a button to change language. Localisation was already managed in the engine, but not used.
An explicit button is needed because there is no good way to auto detect language of user (checking user location is not good for various reasons, and browser language is not good either because user can be using a third party browser in a library for instance), so this needs to be visible and easy to change.
I try to keep Libervia working as much as possible without javascript, so the button had to work without javascript enabled. When javascript is enabled, changing language on the dropdown will immediately reload the page with new locale. When javascript is not enabled, an additional button is visible to use the desired language.
capture of language selector with extra button when javascript is not available

Beta version is coming, the last thing I want to implement is a discovery page for photo albums. I've also started to write a new website using Libervia, where I'll move (and improve) SàT documentation, which is currently mainly on the wiki.

That's all for today, please let me know if this progress note is useful/interesting, and if it worth publishing it more or less every week.

N.B.: I haven't made a blog post with the links to my 2 talks at FOSDEM, so here it is:

First talk, about using XMPP beyond instant messaging can be found at:

Second talk, a presentation of SàT focusing on its use of Python

C

clacke 5 years ago