GoActivityPub library

The Karma is just a number release

Collection cursors improvements

One of the things I’ve worked on for the past months was to remove the one on one correspondence between the items being displayed and the underlying collections loaded from FedBOX.

Some small improvements were made to collection cursors which are the data model littr.me uses. The work is not fully complete but it already allows for some benefits (see next item).

Other niceties that this will lead to are improved local caching of items and faster loads for the users, and also use local pagination.

Sorting by score is back

The first thing I wanted to have was the score based oredering of submissions. Until now the ordering was strictly based on submission date.

Now we order the current loaded items by using a HackerNews gravity based algorithm. Of course, in longer term, I want this to be selectable by the users, but for the moment is hard coded.

The main submission pages of littr.me plus the comments page now use this sorting method, while the /followed tab and the user’s submissions page have kept their date base sorting.

Cache invalidation improvements

Like I observed when first introduced last month, cache invalidation is oftentimes a problem.

I fixed some corner cases here where we didn’t remove caches for inboxes or outboxes of some the actors in the inReplyTo property.

We still have a couple of corner cases where we don’t invalidate caches for, as an example we have some collections that can contain actors (such as a /followers collection).

Binary on-disk storage (not yet!)

Started work on switching on disk storage encoding from jsonld.Marshal to gob.Marshal. However this proved to be a bigger endeavour than predicted and will require gob specific plumbing in the activitypub package.