Notifications and Background services

Hello, i have question: let's say i want the admin to be able to send notifications to all the users in my asp.net core web api application, the point is that i'm not sure what's the best way to do this? options 1 : from inside the endpoint i call the google api that send the notification to the users option 2 : i insert a record in the announcement table and i create a background service that's responsible for sending these notifications. what't the best approach for doing this ??
3 Replies
HtmlCompiler
HtmlCompiler10mo ago
does firebase already have a notification architecture?
Lebanese Putin
Lebanese PutinOP10mo ago
Yup i wrote it in a better way, it's more like an architectural question
HtmlCompiler
HtmlCompiler10mo ago
if the notification is fire and forget i would just send a fan-out event via ws or sse to the connected clients and any client processes it depending in its status
Want results from more Discord servers?
Add your server