New client/server architecture under development

Until now I tested the SDK network communication between MyzharBot and the remote client using a single socket connection over TCP protocol. This can be enough if the messages exchanged are few, but when the system will be complete there will be a lot of messages to be exchanged: Control messages, Status messages, Video streaming, ecc.
Furthermore the latency of the TCP protocol make it not good to transmit Control messages, even if in a more secure way.

The complete communication infrastructure is illustrated in the following scheme:

Communication Infrastructure

Communication Infrastructure

The Robot Server will communicate with the clients opening four channels over four Network Sockets: one TCP socket and three UDP socket.

The TCP socket has major latency than the UDP socket, but is more stable and you are sure that each message will reach its destination, so TCP socket will be used to transmit configuration messages.

The UDP socket has minimal latency, so it is perfect to transmit control commands from client to server, and to send status messages and images from robot to clients.
This kind of messages are transmitted with high frequency, so if one of them does not reach its final destination, it is not a serious problem, unless they are emergency messagges, in which case will be implemented a software handshaking.

The full software is coded under Qt5 framework, using QtNetwork module and its QTcpServer, QTcpSocket and  QUdpSocket classes.

As always you can follow the development steps on Github, in the HLU module:

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.