This invention discloses a communication method,
system, device, and computer-readable storage medium, applied in the field of
network communication technology. The method includes: an I / O
thread pool receiving messages sent by an external terminal device and loading the messages into a
memory pool using zero-copy technology; sending the messages to an independent service
thread pool using a
serialization executor corresponding to the current communication connection; the independent service
thread pool being a collection of task
processing threads independent of I / O scheduling; the independent service thread
pool performing protocol
parsing on the messages, constructing the corresponding communication messages based on the
parsing results, and distributing the communication messages to the corresponding lock-free circular queues; and the I / O thread
pool communicating based on the priority of the communication messages in the lock-free circular queues using an atomic operation
mechanism based on hardware primitives. This invention improves communication efficiency by introducing atomic variables based on hardware primitives to replace traditional mutex locks, achieving asynchronous serial
processing within a single device and fully
parallel processing between multiple devices.