While a category lets you specify the type of notification,
a topic enables you to model a specific object in your app's domain.
For example, a social network deals with users, posts, and images and sends notifications
on particular posts, comment threads, or pictures.
Topic represents a uniquely identifiable entity,
Post with ID 123 a user with email
[email protected], or even a
The social network could send multiple notifications about the
post with ID 123,
across different categories like
like. You can see where this is going!
Notifications from the same topic (and
category) need to thread in an email client
or sent as a batch in the in-app inbox (ex: Julie and three others commented on your latest pic).
With topics, you would have a way to be specific (and precise) when grouping things.
As long as you find a unique identifier for something, you can model it as a topic!
Topics also enable
- The ability to notify all subscribers of a topic. This allows you to build a more stateless notification system by subscribing users when it makes sense and not having to build a recipient list when sending notifications.
- Follow/unfollow or watch/unwatch functionality in your front end. You can quickly build something like the GitHub Watch button (with category-level granularity) or the Youtube Subscribe button.
matchesfor specifying recipients using a SQL-like syntax.
- Inline display of notifications in the topic view in your application.
Some upcoming features that topics will power
- Threading in email clients
- An ability to yank all or expired notifications from in-app and mobile channels.
- Batched notifications are sent to a specific topic/category.