Right now I'm working on architecture for application that will manage smart sockets and I need advice. This is what I have for now:
I'm not sure how to handle connection between Spring and smart socket (I want to be able to turn on/off socket from my web app). I communicate with my sockets via HTTP. My idea is to have server that will manage connections and commands between Spring and sockets:
- When socket will be turned on, it will try to connect to the server.
- Server will wait for new connections from smart sockets, to save them. Also it will wait for commands from Spring to change state of the socket.
Is it a good idea? If yes, is there any tool that will help me do that (maybe build in in Spring), or should I write it on my own?