Designing for a Notifications capability

How have you added support for notifications to your RoR modular monolith?

Did you directly leverage something like GitHub - palkan/active_delivery: Ruby framework for keeping all types of notifications (mailers, push notifications, whatever) in one place or GitHub - excid3/noticed: Notifications for Ruby on Rails applications?

Did you try to wrap such a capability behind an API?

Tons of other questions for each design path…

Thanks for sharing your experiences / thoughts.

We have a dedicated team building and maintain a service with API for this. The API is crucial as there are multiple angles by which to decide how to deliver notifications. E.g., take user configured preferences that can’t apply to certain kinds of notifications where there are regulatory requirements.

@stephan A few f/u questions

  • Inherent in notifications is the “subject” of the notification (the record). How do clients pull together all the pieces (one API yields the notification itself, and some other API yields the subject/record)? One of the features of gems like noticed is to pull it all together easily.

  • is your email notification channel included in this API? Where do the email templates live – in the notifications module or in the domains or applications?

  • is your in-app notification channel included in this API? is the notifications alert graphical widget included in the notifications domain, such that a action cable broadcast with an updated widget (new count) can be sent?