-2

I'm looking to create an application that will run in the browser as well as on devices. The application could be run on any device anywhere but eventually needs to be connected via websocket to a specific piece(s) of hardware in specific location(s) based on user accounts that will be behind one or multiple firewalls/NATs.

I want the user to initially connect to a cloud server that will show them the devices that are online and then once a device is chosen connect them via websocket to the device (most likely NAT'd and behind firewalls).

The concept is similar to what Ubiquiti does with it's Unifi solutions to give a broad example.

I've looked into hole-punching and although it looks promising there are some security problems that could surface that I don't know enough about to even talk about. This also seems like it could get clunky fairly quickly and may be difficult to implement.

Another thing I came across was long-polling from the devices to the server and just have the device check for changes but I'm not sure this is as reliable and I'd like any changes to happen more quickly than this solution would provide (I know many applications use this type of architecture but I'll probably need the hardware to respond quicker as long-polling typically has anywhere between

I know this type of architecture is used often and I absolutely may be overthinking this but I'm hoping someone has more insight on this that has run into this kind of thing before. I'm also open to any services that make this type of communication easier but so far haven't come across any.

0 Answers0