PhamNam-3513 avatar image
0 Votes"
PhamNam-3513 asked AgaveJoe commented

Push notification from worker service to client

Hello everyone, I am new to ASP.NET Core and have some questions.
My system which has a worker service, a grpc service, a web API and mobile and web clients as below architecture. The system is monitoring sensor temperature, if temperature is out of threshold, the client will receive a push notification of warning. So the worker service is for monitoring temperature. The grpc service is for turning on a light.
1. Is my system is a microservice architecture system? (I'm not clearly)
2. How should I push notification to clients (mobile app) when temperature is out of threshold? I use Firebase Cloud Messaging to push notification but where should I do send request to FCM? Worker service send request to FCM directly or worker send request to web API and web API send request to FCM?
3. If the temperature is out of threshold I will send notification to clients but I think I send once for per warning. If the user receive notification and next time if temperature is out of threshold again I will send other notification. How can I implement this?
4. I want to log (save) temperature to database every 5 minutes for history view. And where should I do implement database connection? worker service directly write to database or worker service send temperature data to web api and web api write to database?

Thank you for your help.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I read your post a few times and cannot figure out if you've written a working application or you are asking the community to design and write an application according to your specifications.

Keep in mind, it is much easier to get assistance if you provide sample code the community can run that reproduces the unwanted behavior. Explain the steps to reproduce the unwanted behavior and explain the expected behavior.

0 Votes 0 ·

0 Answers