CN114584573A - Node machine information synchronization method based on long polling mechanism - Google Patents

Node machine information synchronization method based on long polling mechanism Download PDF

Info

Publication number
CN114584573A
CN114584573A CN202210334737.1A CN202210334737A CN114584573A CN 114584573 A CN114584573 A CN 114584573A CN 202210334737 A CN202210334737 A CN 202210334737A CN 114584573 A CN114584573 A CN 114584573A
Authority
CN
China
Prior art keywords
node machine
long polling
data
server
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210334737.1A
Other languages
Chinese (zh)
Inventor
陈柏成
邹琼
周双全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Rayvision Technology Co ltd
Original Assignee
Shenzhen Rayvision Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Rayvision Technology Co ltd filed Critical Shenzhen Rayvision Technology Co ltd
Priority to CN202210334737.1A priority Critical patent/CN114584573A/en
Publication of CN114584573A publication Critical patent/CN114584573A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC

Abstract

The invention discloses a node machine information synchronization method based on a long polling mechanism, which comprises the following steps: the client side initiates a long polling request to the server side every n seconds; after receiving the long polling request, the server collects the latest node machine data of each node machine, and carries out hash algorithm processing on the latest node machine data once to obtain an MD5 value; the service end compares the generated MD5 value with the MD5 value in the long polling request; if the values of the two MDs 5 are not equal, the ID of the node machine is returned to the client; and the client sends a long polling request to the server again according to the returned node machine ID, pulls the latest node machine data of the node machine and updates the latest node machine data to the local. The method has the advantages that the cloud rendering platform can obtain real-time change data of the node machine in a delay of approximately 0, timeliness and authenticity of the data of the platform are improved, throughput of the system is improved, and rendering work efficiency is improved.

Description

Node machine information synchronization method based on long polling mechanism
Technical Field
The invention relates to a rendering management platform in the field of cloud rendering, in particular to a node machine information synchronization method based on a long polling mechanism.
Background
The cloud rendering platform needs to obtain real-time information of rendering node machines, including node machine states (such as in operation, in connection, offline, abnormal, and the like), node machine configuration information (such as ip, cpu/gpu models, memories, and the like), and information related to rendering, such as current rendering tasks, rendering frames, and success rates. And an operator can perform related operation on the node machine according to the real-time information of the node machine of the cloud rendering platform, so that the efficiency of rendering tasks is improved.
The http data synchronization mode between two traditional services is 2, namely a Push mode (Push) and a Pull mode (Pull), wherein the Pull mode is actively initiated by a client, so that the http data synchronization method has the advantages that the resources of the server can not be occupied, and the http data synchronization method has the defect that the real-time performance of data synchronization cannot be ensured. The Push mode is that the server side actively pushes data to the client side, and has the advantages that the data can be pushed to the client side in real time, and the Push mode has the defects that effective long connection needs to be established with the client side, and the number of the client sides is large, so that excessive server resources are occupied.
Accordingly, the prior art is deficient and needs improvement.
Disclosure of Invention
The invention aims to provide a node machine information synchronization method based on a long polling mechanism, which combines the advantages of Pull and Push by using a long polling mode and can ensure real-time synchronization of data under the condition of not occupying excessive node machine server resources.
The technical scheme of the invention is as follows:
a node machine information synchronization method based on a long polling mechanism comprises the following steps:
step 1, a client side initiates a long polling request to a server side every n seconds; the long polling request comprises the ID of each node machine and a first MD5 value obtained by carrying out Hash algorithm processing on the node data of each node machine stored locally;
step 2, after receiving the long polling request, the server collects the latest node machine data of each node machine, and carries out hash algorithm processing on the latest node machine data once to obtain a second MD5 value corresponding to each node machine;
step 3, the server compares the first MD5 value and the second MD5 value corresponding to each node machine; if the two are the same, the server side keeps a monitoring state, the step 2 is circulated, the MD5 value is compared, and an empty result is returned to the client side until the timeout time is reached; if the first MD5 value is detected to be not equal to the second MD5 value in the circulation process, the node machine data of the node machine is changed during description, and the ID of the node machine is returned to the client;
and 4, the client sends a long polling request to the server again according to the returned node machine ID, pulls the latest node machine data of the node machine and updates the latest node machine data to the local.
Optionally, in step 1, once the response of the server is received, a new request is sent to the server immediately.
The invention has the beneficial effects that: the cloud rendering platform can obtain real-time change data of the node machine in a delay of 0, timeliness and authenticity of the data of the platform are improved, and throughput of the system is improved. Meanwhile, the method is beneficial to the administrator to timely perform relevant processing according to the node machine information of the platform, and the rendering work efficiency is improved.
Drawings
Fig. 1 is an interaction diagram of the long polling mode in the present invention.
Detailed Description
The invention is described in detail below with reference to the figures and the specific embodiments.
For convenience of understanding, the terms in this application are explained below:
a node machine: and the computer is responsible for reading rendering assets and performing calculation when the task is rendered.
Cloud rendering platform (hereinafter referred to as client): rendering the client role in the data integration platform, long polling request.
A node machine server (hereinafter referred to as a server): the program responsible for collecting each item of hardware data of the node machine, the server role in the long polling request.
Long polling mode: an efficient data interaction mode based on an http protocol. The client side can initiate a request to the server side at regular time, but the timeout time of the request is prolonged to 30s, after the server side receives the request, the request is not returned immediately, but the request is suspended and added into a task queue for storage, meanwhile, whether the corresponding data is changed or not is checked, if the data is changed, the request is triggered immediately to return the data, otherwise, the monitoring is kept all the time, and the data is returned after the time reaches the request timeout time.
And (3) Hash algorithm: the fixed length output can be obtained by the hash algorithm for any input. If the value of the input changes, the value of the output also changes. Can be used to detect whether complex data has been altered.
As shown in fig. 1, the present invention provides a node machine information synchronization method based on a long polling mechanism, which includes the following steps:
step 1, a client initiates a long polling request to a server, and the long polling request is executed once every 30 seconds; the long polling request includes an ID of each node machine (unique identifier of each node machine) and a first MD5 value obtained by performing hash algorithm processing on node data of each node machine stored locally.
It should be noted that the interval time may be set to other time lengths, and is not particularly limited herein.
In step 1, upon receiving the response from the server, a new request is immediately sent to the server.
Step 2, after receiving the long polling request, the server collects the latest node machine data of each node machine, and carries out hash algorithm processing on the latest node machine data once to obtain a second MD5 value corresponding to each node machine;
step 3, the server compares the first MD5 value and the second MD5 value corresponding to each node machine; if the two are the same, the server side keeps a monitoring state, the step 2 is circulated, the MD5 value is compared, and an empty result is returned to the client side until the timeout time is reached; if the first MD5 value is detected to be not equal to the second MD5 value in the circulation process, the node machine data of the node machine is changed during description, and the ID of the node machine is returned to the client;
and 4, the client sends a long polling request to the server again according to the returned node machine ID, pulls the latest node machine data of the node machine, and updates the latest node machine data to the local.
The invention has the beneficial effects that: the cloud rendering platform can obtain real-time change data of the node machine in a delay of 0, timeliness and authenticity of the data of the platform are improved, and throughput of the system is improved. Meanwhile, the method is beneficial to the administrator to timely perform relevant processing according to the node machine information of the platform, and the rendering work efficiency is improved.
The present invention is not limited to the above preferred embodiments, and any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (2)

1. A node machine information synchronization method based on a long polling mechanism comprises the following steps:
step 1, a client initiates a long polling request to a server every n seconds; the long polling request comprises the ID of each node machine and a first MD5 value obtained by carrying out hash algorithm processing on node data of each node machine stored locally;
step 2, after receiving the long polling request, the server collects the latest node machine data of each node machine, and carries out hash algorithm processing on the latest node machine data once to obtain a second MD5 value corresponding to each node machine;
step 3, the server compares the first MD5 value and the second MD5 value corresponding to each node machine; if the two are the same, the server side keeps a monitoring state, the step 2 is circulated, the MD5 value is compared, and an empty result is returned to the client side until the timeout time is reached; if the first MD5 value is detected to be not equal to the second MD5 value in the circulation process, the ID of the node machine is returned to the client;
and 4, the client sends a long polling request to the server again according to the returned node machine ID, pulls the latest node machine data of the node machine, and updates the latest node machine data to the local.
2. The node machine information synchronization method based on the long polling mechanism as claimed in claim 1, wherein in step 1, upon receiving the response from the server, a new request is sent to the server immediately.
CN202210334737.1A 2022-03-31 2022-03-31 Node machine information synchronization method based on long polling mechanism Pending CN114584573A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210334737.1A CN114584573A (en) 2022-03-31 2022-03-31 Node machine information synchronization method based on long polling mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210334737.1A CN114584573A (en) 2022-03-31 2022-03-31 Node machine information synchronization method based on long polling mechanism

Publications (1)

Publication Number Publication Date
CN114584573A true CN114584573A (en) 2022-06-03

Family

ID=81778468

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210334737.1A Pending CN114584573A (en) 2022-03-31 2022-03-31 Node machine information synchronization method based on long polling mechanism

Country Status (1)

Country Link
CN (1) CN114584573A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115333940A (en) * 2022-08-11 2022-11-11 以萨技术股份有限公司 Method and system for realizing configuration monitoring based on ETCD

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090254589A1 (en) * 2008-04-07 2009-10-08 International Business Machines Corporation Client side caching of synchronized data
CN103597465A (en) * 2011-06-15 2014-02-19 微软公司 Efficient state reconciliation
CN103620576A (en) * 2010-11-01 2014-03-05 七网络公司 Caching adapted for mobile application behavior and network conditions
CN113434282A (en) * 2021-07-20 2021-09-24 支付宝(杭州)信息技术有限公司 Issuing and output control method and device for stream computing task
CN113691616A (en) * 2021-08-23 2021-11-23 上海浦东发展银行股份有限公司 Micro-service synchronization method and device based on long polling and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090254589A1 (en) * 2008-04-07 2009-10-08 International Business Machines Corporation Client side caching of synchronized data
CN103620576A (en) * 2010-11-01 2014-03-05 七网络公司 Caching adapted for mobile application behavior and network conditions
CN103597465A (en) * 2011-06-15 2014-02-19 微软公司 Efficient state reconciliation
CN113434282A (en) * 2021-07-20 2021-09-24 支付宝(杭州)信息技术有限公司 Issuing and output control method and device for stream computing task
CN113691616A (en) * 2021-08-23 2021-11-23 上海浦东发展银行股份有限公司 Micro-service synchronization method and device based on long polling and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115333940A (en) * 2022-08-11 2022-11-11 以萨技术股份有限公司 Method and system for realizing configuration monitoring based on ETCD

Similar Documents

Publication Publication Date Title
US11729260B2 (en) Internet-of-things resource access system and method
CN103370917B (en) Message treatment method and server
CN109960634B (en) Application program monitoring method, device and system
CN107688489B (en) Method and system for scheduling tasks
CN114584573A (en) Node machine information synchronization method based on long polling mechanism
CN109257335A (en) It keeps back the method for source link, return source method, relevant apparatus and storage medium
CN103108000A (en) Task synchronization method and system and host node and work nodes in system
CN111400041A (en) Server configuration file management method and device and computer readable storage medium
CN112614002A (en) Data acquisition system, method, device, electronic equipment and computer storage medium
CN114185582A (en) Automobile software online upgrading system and method based on QUIC protocol
CN116886286A (en) Big data authentication service self-adaption method, device and equipment
CN109684051B (en) Method and system for asynchronously submitting hybrid big data task
CN114900449B (en) Resource information management method, system and device
CN113612811B (en) Method, system, equipment and medium for client mounting in multiple channels
CN114116178A (en) Cluster framework task management method and related device
CN1878177A (en) System and method of responding to a full TCP queue
CN111431951A (en) Data processing method, node equipment, system and storage medium
CN112637068B (en) Network data forwarding method, computer device, computer network and storage medium
CN113282660B (en) Method and system for synchronizing data in cluster, electronic equipment and storage medium
CN113301136B (en) Service request processing method and device
CN113242307B (en) Service request processing method, device, server and storage medium
JP5655687B2 (en) Analysis processing apparatus, analysis processing program, and analysis processing method
CN116909720A (en) Intelligent inspection monitoring method, device, equipment and medium
Amarasinghe et al. A Framework for Peer to Peer General Purpose GPU Distributed Computing
CN115460226A (en) Data synchronization management system, method, equipment, medium and product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination