Request processing method, server and computer readable storage medium

A request processing and processor technology, applied in the computer field, can solve problems such as connection need to wait, affect response speed, need to wait, etc., to achieve the effect of improving throughput, preventing unnecessary waiting, and good guidance

Active Publication Date: 2018-10-12
BEIJING 58 INFORMATION TTECH CO LTD
View PDF8 Cites 14 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The design of TNonblockingServer is all based on the event callback mechanism, including connection monitoring, creating client connections, processing client requests, etc. All calls are non-blocking, but it does not need to wait. When requesting, the connection will no longer read the next call request until the processing thread completes the processing and sends the result to the client. Synchronous, although the processing request is completed in a thread pool, the receiving and sending threads still need to wait
[0004] It can be seen that the connection in the existing Server model needs to wait, which affects the response speed

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
  • Request processing method, server and computer readable storage medium
  • Request processing method, server and computer readable storage medium
  • Request processing method, server and computer readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0051] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0052] In the first implementation of the present invention, a request processing method is provided, which is applied to the server, such as figure 1 As shown, the method includes the following steps:

[0053] Step S101, by creating multiple receiving threads, multiple read request threads, and multiple task processing threads, the connection requests sent by the client are sequentially monitored, read, and processed in parallel; ...

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 discloses a request processing method, a server and a computer readable storage medium. The method comprises the steps that through created multiple receiving threads, multiple reading request threads and multiple task processing threads, connection requests sent by clients are sequentially monitored, read and processed in parallel; and through created multiple sending threads, messages obtained after processing are sent to the clients in parallel, wherein queue numbers of connection queues where the monitored connection requests are stored are mod (values of source socket descriptors of the connection requests and the number of the reading request threads), and queue numbers of sending queues where the messages obtained after processing are stored are mod (the values of thesource socket descriptors of the connection requests and the number of the sending threads). Through the scheme, unnecessary waiting is not needed among the threads, queue locking is not needed, therefore, response time of the server is shortened, and the throughput of the server is improved.

Description

technical field [0001] The present invention relates to the field of computers, in particular to a request processing method, a server and a computer-readable storage medium. Background technique [0002] The performance of the server determines the quality of the service, which is mainly reflected in the delay and throughput of the service. How to use limited computer hardware resources to obtain higher service performance has become the goal pursued by the designers of the server. A general system provides a complete set of network programming interfaces and concurrent programming mechanisms for developers to use. How to use these interfaces and mechanisms reasonably and effectively to build a complete, general and efficient server model is positive for server developers. The guiding significance of Server users has faster response and higher performance. [0003] TNonblockingServer of Thrift (one of Facebook's core technical frameworks) is the most usable and scalable am...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/54
CPCG06F9/546G06F9/547G06F2209/548G06F2209/541
Inventor 陈宝球
Owner BEIJING 58 INFORMATION TTECH CO LTD
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