Unlock instant, AI-driven research and patent intelligence for your innovation.

Method for asynchronous long connection of easily extended interfaces

An easy-to-expand, asynchronous long-term technology, applied in the interface field, can solve the problem of wasting resources and time, and achieve the effect of short response time and fast processing efficiency

Inactive Publication Date: 2016-11-09
SHENZHEN SECURITIES COMM
View PDF5 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] Short connection, repeated TCP establishment and closing operations with many connections, wastes resource time

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

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0012] The present invention will be further described below through specific embodiments.

[0013] An asynchronous long connection easy-to-extend interface method. The client inserts the request message into the server message queue. After the insertion is successful, the client asynchronously queries the response message, and the blocking waiting time for the query can be set. After the server gets the request message from the corresponding message queue, it processes the message and sends response data to the client in an asynchronous or synchronous manner.

[0014] This interface is a typical distributed message queue mode message middleware.

[0015] Realize distributed message queue based on Redis. Redis is an in-memory Key-Value NoSQL database with extremely fast access speed and very easy to use. It supports List data structure operations and can be used for lightweight queue services. The Redis server can be deployed in multiple clusters to solve single-point failur...

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 provides a method for asynchronous long connection of easily extended interfaces. The method comprises the following steps: S1, inserting a request message into a message queue of a server side by a client side, and after inserting is successful, asynchronously inquiring an answer message by the client side; and S2, after extracting the request message in a corresponding message queue by the server side, treating messages, and transmitting response data to the client side by an asynchronous or synchronous mode. The method has the beneficial effects that long connection between the client side and the server side is established, asynchronous call is realized, the treating efficiency is high, and the response time is short.

Description

technical field [0001] The invention relates to an interface method, in particular to an asynchronous long connection easy-to-extend interface method. Background technique [0002] Traditional interfaces, such as general http protocol interfaces, generally use short connections and synchronous calls. The client thread establishes a connection and calls the interface to send a request to the server. At the same time, the current thread should be in a "suspended" state, that is, the thread cannot execute backwards. It must obtain the results from the server before executing backwards. After receiving the request from the client, the server processes the request and sends the result to the client. After the client receives the result, the current thread continues to execute and closes the connection. [0003] Short connection, repeated TCP establishment and closing operations with many connections, wastes resource time. [0004] Synchronous call, each time the client sends a ...

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/546
Inventor 何发范路曼彭正飞
Owner SHENZHEN SECURITIES COMM