mercredi 20 octobre 2021

How to design a back in stock notification system?

I want to design a back-in-stock notification email service, where the users can sign up on the out-of-stock page and get notified when the item is back in stock. If I have the list of users subscribed to back in stock alert and another table that has the latest stock availability, what would be the best approach to build an efficient system that looks at these data and trigger back in stock email?

  • Do I poll the stock table for change in stock and then compare with user table and trigger email ?
  • Is there any other better way of doing it ? Are there any design patterns/ specific tools/ constructs to solve such problems? I am gravitating towards as event-driven model - but not sure what to look out for this problem statement. I am not looking for a complete solution, but opinions/ pointers to any resource would be greatly appreciated.

Aucun commentaire:

Enregistrer un commentaire