In industrial grade, the network communication protocol is usually designed to be divided into two layers: the higher layer and the lower layer.
[img]http://dl.iteye.com/upload/attachment/377461/d5e500ce-31c1-366f-899e-1cdc6b7f9ffe.jpg[/img]
The most outstanding difference is the higher packets employing a variable length while the lower doing a fixed length. The higher relates to business logic, whose packet length is ranging, say, from 1x KB to 1xx MB.
Why we need a fixed-size lower layer?
Imagine the following scenario: an emergency packet needs to be send immediately but a low-priority packet is in the process of being sent, which has occupied the expensive socket and would last for a while. Without the lower layer, we can do nothing but to wait.
It comes to a help that segmenting the size-variable packet into small fixed-size sub-packets, whereby we can check whether there’s an additional packet with higher priority at the interval of sending two sub-packets.
Abbreviations:
MUX – Multiplexing,
DEMUX - Demultiplexing
An alternate solution - FTP’s way:
FTP server and FTP client maintain two socket connections:
1) Command connection – for short and high-prioritized packets
2) Data connection – for long and low-prioritized packets
[img]http://dl.iteye.com/upload/attachment/377464/c4ed386c-2576-3f2d-9b9b-32424dd38216.jpg[/img]
[img]http://dl.iteye.com/upload/attachment/377461/d5e500ce-31c1-366f-899e-1cdc6b7f9ffe.jpg[/img]
The most outstanding difference is the higher packets employing a variable length while the lower doing a fixed length. The higher relates to business logic, whose packet length is ranging, say, from 1x KB to 1xx MB.
Why we need a fixed-size lower layer?
Imagine the following scenario: an emergency packet needs to be send immediately but a low-priority packet is in the process of being sent, which has occupied the expensive socket and would last for a while. Without the lower layer, we can do nothing but to wait.
It comes to a help that segmenting the size-variable packet into small fixed-size sub-packets, whereby we can check whether there’s an additional packet with higher priority at the interval of sending two sub-packets.
Abbreviations:
MUX – Multiplexing,
DEMUX - Demultiplexing
An alternate solution - FTP’s way:
FTP server and FTP client maintain two socket connections:
1) Command connection – for short and high-prioritized packets
2) Data connection – for long and low-prioritized packets
[img]http://dl.iteye.com/upload/attachment/377464/c4ed386c-2576-3f2d-9b9b-32424dd38216.jpg[/img]
本文探讨了工业级网络通信协议的设计,强调了分层结构的重要性。通过将协议分为高层和底层,可以实现不同长度的数据包传输,并解决了紧急数据包优先发送的问题。文章还介绍了通过分段可变大小的数据包来提高效率的方法。
2万+

被折叠的 条评论
为什么被折叠?



