Source Code address of Cobar-Server: GitHub welcomes Fork. For details about the network communication module of Cobar, Cobar uses Java NIO for read/write processing. NIO is the IO reuse in Java, without the need to create a processing thread for each connection. For details, see the Cobar initialization flowchart of the non-blocking IOJavaNIO Tutorial:
Source Code address of Cobar-Server: GitHub welcomes Fork. For details about the network communication module of Cobar, Cobar uses Java NIO for read/write processing. NIO is the IO reuse in Java, without the need to create a processing thread for each connection. For details, see the Cobar initialization flowchart of the non-blocking I/OJava NIO Tutorial:
Source Code address of Cobar-Server: GitHub welcomes Fork.
For more information about the Cobar network communication module, see,
Cobar uses Java NIO for read/write processing. NIO is the IO reuse in Java, without the need to create a processing thread for each connection. For more information, see the non-blocking I/O-Java NIO tutorial.
The Cobar initialization flowchart is as follows:
The relationships between the three XML configuration files during Cobar instantiation are as follows (the specific members are not indicated ):
In this way, the Cobar system is running:
- Each Processor starts two reactors R and W to process NIO input and output.
- A connector thread that processes connections to backend MySQL nodes
- An acceptor thread is used to accept connection requests from clients.
- Timer tasks include (periodic update of time, periodic processor check, used to clear resource recycling, idle timeout check for data nodes, data node heartbeat packet, and Cobar cluster heartbeat packet)Author:GeekComeSource:Excellent guestOriginal article:Distributed Database middleware-(1) Cobar initialization processTip:This article is copyrighted by the author. You are welcome to repost this article, but you must keep this statement without the author's consent and provide a connection to the original article on the article page.If you have any questions about the article, you can leave a comment. I will try my best to reply to you. Thank you for reading this article.