Reputation: 815
Firstly sorry this is more a design and architecture question and wanted to get some opinions on how to solve my problem, which I know some people won't like but I am at a loss to where to ask this.
So I am building a device that people will have at home and connect to their network. I want this device to call home (talk back to my Servers e.g. API server in this case) and then for the user to be able to manage that device and the device to send back close-to-realtime data to my API server.
Thinking of the normal home network, it would be silly to think that the device would be given a public IP or put on a DMZ thus I couldn't make my API servers call the device, but the device could call the API servers.
Would this be a good case for WebSockets? And anyone seen WebSockets done with Ruby on Rails 6 or could point me into a good example?
Upvotes: 0
Views: 50
Reputation: 69
The Action cable tutorial can be a starting point, I suggest you to make a minimal implementation and see how it goes. It is a valid solution for what you want to do, for the architecture point of view.
Upvotes: 1