Mooon-agent is designed in a simple way to maintain a simple relationship between objects and avoid excessive transmission. Therefore, cagentthread becomes the core. In addition, there are several key design points:
1. An epollable queue is used to ensure real-time message reporting. 2. A state machine is used to send messages to the csendmachine and the crecvmachine for receiving messages, make sure that all processes are asynchronous and non-blocking CodeConcise 3. abstraction of downstream message processing to achieve general purpose 4. netint is used to solve the problem of Message Network byte order and ensure that the agent is well prepared: 1. Full design, the pursuit of the relationship between objects is the most simplified 2. Limited design, the number of control functions in each stage, despise the idea of one step in place, such as reporting the heartbeat function, it also needs to support sending simple heartbeats and sending rich heartbeats (with data heartbeats, such as CPU usage). This will make the first version difficult to converge and lead to design expansion.