I am working on a system where multiple devices (autonomous vehicles, smartphones and stationary sensors) collect data, send it to a backend and perform commands submitted by users through a web frontend. The devices communicate with the backend wirelessly through a cellular connection or wifi. The backend needs to be able to command each device independently. At the moment the devices do not need to communicate with each other.
There will be up to 10-20 devices, transmitting several times per second at up to 10 kb/s each. Except for control messages, most of the data is sent repeatably and only the most recent instance is of interest. Some units will be coded by a third party, so the client should be fairly easy to implement using C# (x64) and Python/C++ (ARM64).
I am looking for a message protocol / broker that allows for direct bidirectional client-server communication. So far I have looked into:
- Plain TCP - too much boilerplate to get message-based communication to work (especially relevant for third parties), and I would prefer having a fallback option to HTTP in case of a restrictive carriers / firewalls.
- ZeroMQ (probably with ROUTER/DEALER) - same comment about HTTP.
- MQTT - while I do like the simplicity of the protocol and client-side usage, I do not really need Pub-Sub, just a bidirectional client-server channel.
- AMQP / RabbitMQ - seems like an overkill, and same comment about Pub-Sub.
- gRPC - no easy way to stream multiple message types from server to client, and I am not sure how HTTP/2 would work over restrictive carriers / firewall.
- WebSockets - my leading option right now, although I am not sure how well it will handle connection drops over cellular.
Are there any other suggested protocols? Is there anything I missed in my review?