Todd Sundsted
Release v3.4.0 of Ktistec

The biggest change in release v3.4.0 of Ktistec is cursor-based pagination for all web-navigable collections (timeline, notifications, etc.). Offset-based pagination will be removed completely in the next release.

Offset-based (e.g. page/size) pagination works well on collections that don't change. But, what does "the second page" contain in a dynamic timeline? Support for cursor-based pagination is required by the Mastodon-compatible API, but has been a desirable feature for quite a while.

While updating queries to paginate by cursor, I also made performance improvements to the queries themselves, as mentioned elsewhere. Scrapers and bots have already adapted—sort of. I now see odd hybrid requests in the log like /tags/xyz?page=7&min_id=123. Overall CPU usage under normal load is now sitting at 0-1%.

Here is the full changelog for the release:

Added

  • Cursor-based pagination for web-navigable collections. (fixes #122)
  • Mastodon-compatible API: /api/v1/timelines/tag/:hashtag endpoint.

Fixed

  • Negative replies count when viewing a post that is also a reply.
  • Order cached actors' posts by published rather than id.

Changed

  • Report 401 and 403 as distinct errors in Ktistec::Network.get.

Removed

  • Unused paginated query methods.

Enjoy!

#ktistec #crystallang #activitypub #fediverse