[PureOS] "PureOS changes" notifications
matthias.klumpp at puri.sm
Wed Jul 3 09:13:35 PDT 2019
Am Mi., 3. Juli 2019 um 16:48 Uhr schrieb Chris Lamb <chris.lamb at puri.sm>:
> Chris Lamb wrote:
> > I'm generally not one to send "me too" or "+1" emails, but I will get
> > over my usual reticence that here to underline that this would
> > be great.
> > How can I help?
> Very gentlest of reminders on this thread/question? :)
In theory you could start writing the "Mirk" Matrix bot - I have not
looked into how to do that uch yet, but there are some Python modules
to help with creating it. I could also add a simple project template
to the Laniakea repository.
All the bot will do is to subscribe to a ZeroMQ publisher socket on a
Lighthouse relay and listen to the stream of events, publishing the
information it find interesting to the channels it is in.
The event publishing is something I am currently writing, the first
step was to add a few unittests for Lighthouse last weekend - because
I will not write this feature without at least a basic level of
testing, now that that's possible easily in the Laniakea repo.
So, each message that any subscriber to the event stream receives will
have the following format:
"author": "<message author>",
id: This is the type identifier of the message, also repeated in the
ZeroMQ multipart message, to allow clients to efficiently subscribe to
events. It follows a reverse-DNS scheme, with the "_lk" "domain" being
reserved for Laniakea built-in modules. The modulename is the name of
the module, the event is an event identifier. A valid ID could be for
format: Message format, always 1.0 until it's changed. There only for
time: Timestamp (will likely be ISO 8601) of when the message was emitted.
origin: Optional entry showing from which machine (hostname) the
author: Optional entry denoting a user or other entity who triggered
the event emission
data: Arbitrary payload, with format matching the event id (e.g. a
"_lk.synchrotron.package-synced" event will most certainly carry the
information which package was synced from where to where)
signatures: ED25519 signatures of services which have seen this
message and have emitted it. This will be the original sender of the
event as well as a signature of the Lighthouse relay which has
re-emitted the message.
The basic flow of information is source-relay-sink:
laniakea-module --> lighthouse-relay ---> many message consumers
A module can also be both consumer and emitter of events. Ultimately,
the goal of this is to make the archive react to changes faster and
get rid of a bunch of cronjobs.
The Matrix bot is more of a byproduct (and a very nice piece for
testing the feature, once it's implemented).
Once the feature is finished, you'll be able to find a more
sophisticated writeup of this mail in the documentation as well.
All in all, I am not sure how much people can help me with
implementing this, but at least for package upload information
subscribing to pureos-changes will get you the data as emails.
More information about the Pureos-project