sweetroll

From IndieWeb
Jump to: navigation, search

sweetroll is Greg V's engine that powers their website, unrelenting.technology.

micro-panel-screenshot.png

Architecture

Sweetroll consists of:

  • a "backend" service written in Haskell that's (roughly) responsible for getting data into the database: auth, micropub, receiving webmentions;
  • a "frontend" service written in JavaScript (node.js) that's (roughly) responsible for getting data out of the database: rendering the website, sending webmentions, publishing WebSub notifications;
  • a PostgreSQL database (mf2sql schema created for Sweetroll) that's used for storage, full text search and change notifications (LISTEN/NOTIFY).
  • a web server that proxies requests to both services (configuration is provided for nginx).

Pretty much everything in Sweetroll is represented as microformats2 JSON objects, including feed configurations and site settings. (Of course there's no common microformats for that, so it's custom, but stored in the same way.) Stored procedures are used to extract embedded entries (comments, in-reply-to contexts, etc.) into their own records when writing content and to embed them back when reading. And to build feeds.

sweetroll live.png

This data-driven feed construction allows the engine to know exactly which feeds would be affected by an entry creation/change. So when an entry is updated, the frontend app would determine that it affected e.g. the home feed, the articles feed and tag feeds for #sweetroll and #web. So the WebSub hub would receive a notification for all these feeds, and browsers currently open to these pages would receive a "reload this" box →

Libraries

The following Haskell libraries were written for Sweetroll:

No longer used:

Personal tools
Namespaces
Variants
Actions
Recent & Upcoming
Resources
Toolbox