Page MenuHomePhabricator

Explore replacing Enotif with an extensible notification system
Open, Needs TriagePublic

Description

In the context of KR hypothesis 5.2.2 we want to explore "evolving the MediaWiki ecosystem's programming interfaces to empower decoupled, simpler and more sustainable feature development." We've focused on the notification platform which is currently split between Core (Enotif) and Echo Notifications.

We're considering what it would mean to unify the behavior of the (currently split) notification platform with that of the core platform and how we could do that.

A first step could be introducing a new notification pattern in core to prepare the ground for a unification. For that, we need to make sure the new design would accommodate core's enotif as well as the use cases of the Notification extension, and would be feasible within the year's work.

To scope that work, a coding spike should be conducted to explore what it would take.

See also:

Event Timeline

Here's how I would suggest we could most productively explore this:

  • Think about what an event type registry in MW core would look like. This would be something that Echo events could be ported to, and that Enotif could also use.
  • Implement this registry in a proof of concept patch in MW core, but don't implement the behavior behind it yet. In other words, allow event types to be registered, but don't actually implement the logic for recording and delivering events etc, only implement the registration mechanism.
  • Do the same things for a delivery type registry
  • Design the event firing API (and maybe implement a mock one, but don't spend time trying to make notifications actually work)
  • Sketch out how Enotif would use these things
  • Sketch out how things that currently use Echo would use these things

Then when we've done these things and we have an API that we're happy with, we could start implementing a new system for real:

  • Implement the actual behavior of storing, managing and delivering notifications, making the new system fully functional
  • Actually port Enotif to use this new system
  • Gut the Echo extension and make its registration mechanisms wrap around the ones in the new system
  • Deprecate these Echo wrappers, and migrate extensions from the Echo wrappers to the new system over time

During the implementation stage it's of course possible that we could run into unforeseen issue that would require us to change the APIs slightly, and that's OK, but hopefully we'll catch most of it by sketching things out. At the sketching stage it'll also be much easier to make changes to the APIs, because we won't have any non-sketch code relying on them yet.

I tightened the description text and added a couple of more historical links.

daniel added subscribers: pmiazga, matmarex.

Unassigning myself, @matmarex and @pmiazga are leading this effort now.