I am designing a notification center where multiple events take place periodically (conferences, sending invitation requests, accepting invitation requests, ...etc) where notifications can be sent with email, sms or FCM mobile notifications or all of those together. I am seeking a good OOP design/ design pattern to achieve this.
The functionality to be used to send notifications is available using third-party services such as twilio and customrIO, the problem is the classes to be used in system design.
I am using a queue to store my events where a separate thread keeps checking the events queue and then the notification center must do the right action to send the notification.
I am developing my app using django framework.
The operation can be summarized as follow:
- pull an event from the queue .
- extract necessary info. about the event (user_id, notification type ...) .
- send the notification to user with user_id according to the notification type/s.
Aucun commentaire:
Enregistrer un commentaire