I'm designing a web application that should communicate with a remote raspberry (or similar devices for what it matters)
I need to achieve these goals:
- user be able to send commands and receive answers
- device be able to send data on his own initiative
- when the user is offline, the application server should be able to get updates from the device
https://i.stack.imgur.com/hHbPb.png
Actually I'm at this stage of designing. I cannot figure out what to put in A and B boxes. I was thinking about node.js on the B side, and it would work very smooth if I only needed to send direct commands from the frontend, but I also need to update the DB and get the application and the raspberry communicate when the user is offline.
Any ideas? Thanks a lot.