I am currently building a distributed system that consists of two separated nodes, connected over wireless Lan.
The processes communicate over a bidirectional TCP Socket and JSON messages.
For the application, it is quite crucial that all transmitted messages arrive at the receiver consistent in the correct order. Beside this, it is not tragic if there is a transition delay (caused by the network).
Since I am not that familiar with network communication protocols, I ask myself if I must build in additional security mechanisms to ensure that no inconsistent message arrives (incomplete JSON message). Currently I only use a message counter, which I embed into the JSON message.
As socket implementation I use the standard Java socket class (java.net.Socket)
Do you recommend any further methodologies or is the consistence ensured by the ISO/OSI stack?
Best regards