PlaidWeb / Publ

Flexible publishing system for the web
http://publ.beesbuzz.biz/
MIT License
40 stars 4 forks source link

Thoughts on notification stuff #437

Open fluffy-critter opened 3 years ago

fluffy-critter commented 3 years ago

Less an issue and more an idea on how to handle native push notifications: publ (or a module that talks to it) can have the notion of subscribers and views thereof. A subscription can be registered against a page (template+category+user), and the indexer can gather a list of which entries changed and then determine which subscriptions' pages have updated, and use that to send the updated rendered template via websub/activitypub/etc.

For bonus points, there could be a mechanism for it to override view.entries such that only the changed entries go into the update render, to reduce the size of the push notification.

fluffy-critter commented 3 years ago

Maybe when the subscription is created, it can run the template and instrument which view specs get created, then the view spec list gets stored somewhere. Then add a function like queries.contains_entries, and after an indexer pass runs, it goes through all of the registered views with that as an additional parameter and then updates all subs which generate a result with that query.

fluffy-critter commented 3 years ago

Implementing #415 would help with this a lot.