Method and device for processing multi-client access by using asynchronous non-blocking mode

A mode processing, multi-client technology, applied in the field of communication, can solve problems such as high cost, and achieve the effect of strong market application prospects

Pending Publication Date: 2021-10-26
ZHEJIANG EBANG COMM
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Obviously, the first solution requires more hardware resources, and more hardware resources mean higher costs
Although the

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for processing multi-client access by using asynchronous non-blocking mode
  • Method and device for processing multi-client access by using asynchronous non-blocking mode

Examples

Experimental program
Comparison scheme
Effect test

Example Embodiment

[0037] Example 1

[0038] This example is disclosed figure 1 A method of processing multi-client access using asynchronous non-blocking mode, including the following steps:

[0039] S1 initializes the main working group and turn on the main thread M. After the binding listening to the IP + port, turn on the MAIN workgroup thread pool MPool and start the polling;

[0040] S2 Initialization Request Queue RQ and SELECTOR Multi-Double Selector; Turn on the Sub Workgroup Main Thread S and Start Polling Selector, open the SUB Workgroup Thread Pool Spool, initialize the ready queue WQ;

[0041]After the S3 thread M listens to the client Accept request, place the ACCPET request in RQ, MPOOL polling RQ, when the RQ is requested, the request data is obtained, and the request data is assigned to each of the MPOOL. Thread;

[0042] S4 processes the Accept request, perform authentication, handshake, login operation, generate the corresponding Channel, and register into the Selector;

[0043] S...

Example Embodiment

[0052] Example 2

[0053] This example discloses a method of processing multi-client access using asynchronous non-blocking modes, specifically, the server is used to process the overall scheme design of multi-client access, including multi-way multiplexing technology, efficient Thread model design.

[0054] This embodiment multiplexed techniques include:

[0055] The server authenticates the client's Accept request, including identity authentication, handshake, login operation;

[0056] After the above operation is completed and authenticated, the server generates the corresponding Channel according to the Accept request, and registers the multiplexer Selector;

[0057] Selector constantly polls the Channel to Channel, put the ready Channel in the corresponding collection;

[0058] The other modules of the server will poll the collection of the Selector, remove the ready Channel, and perform business processing.

[0059] The efficient thread model design of this embodiment includ...

Example Embodiment

[0062] Example 3

[0063] This embodiment discloses a method of processing a multi-client access, and the flow is as follows:

[0064] Server initialization Main Workgroup: Enable the main thread M, binding listener IP + port;

[0065] Enable the MAIN workgroup thread pool MPool and start the polling; initialize the request queue RQ; initialize the Selector multiplex selector;

[0066] Service Initialization Sub Working Group: Open the Sub Workgroup Main Thread S and Start Polling Selector; turn on the SUB Workgroup thread pool spool; initialize the ready queue WQ;

[0067] Thread M listens to the client Accept request, put the ACCPET request in RQ;

[0068] MPOOL polling RQ, when RQ has request data, obtain request data, assisted with load balancing to each thread in MPool, such as figure 1 Process 101;

[0069] The thread in the mpool processes the Accept request, authenticate, handshake, login operation;

[0070] After the thread in the mpool processes the Accept request, gener...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to the technical field of communication, in particular to a method and device for processing multi-client access by using an asynchronous non-blocking mode, and the device comprises a primary working group primary thread and thread pool module, an auxiliary working group working thread and thread pool module, a multipath server and a load balancing module, according to the method, a master-slave working group model is adopted at a server side, a master working group is responsible for client ACCEPT access, authentication, handshake and login requests, and a channel is generated and registered on a multiplexer; and the auxiliary working group is responsible for I/O processing, user-defined tasks and user timed tasks. By adopting the method and the device, the problem of simultaneous access requests of multiple clients can be effectively solved by using an asynchronous non-blocking mode and adding a double-thread group mode.

Description

Technical field [0001] The present invention relates to the field of communication technology, and more particularly to a method and apparatus for processing multi-client access using asynchronous non-blocking mode. Background technique [0002] The rapid development of network technology has put forward higher requirements for the reliability of the network. In order to improve the user's experience, the software interaction is not caldton, the request can get a timely response, the software design needs to consider a large number of users at the same time It is especially important to have high performance and stability when entering the server. In the initial period of software, the business is small, the number of users is small, and the use of traditional BIO communication methods can cope with current needs, but once traffic and user grow faster, traditional BIO modes have not satisfied user needs, at this time The server will congest, the user is unable to connect, the ser...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F9/54G06F9/50
CPCG06F9/547G06F9/546G06F9/5083
Inventor 郭清川
Owner ZHEJIANG EBANG COMM
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products