CN110430282A - Data transmission method and device between distributed system node - Google Patents
Data transmission method and device between distributed system node Download PDFInfo
- Publication number
- CN110430282A CN110430282A CN201910760714.5A CN201910760714A CN110430282A CN 110430282 A CN110430282 A CN 110430282A CN 201910760714 A CN201910760714 A CN 201910760714A CN 110430282 A CN110430282 A CN 110430282A
- Authority
- CN
- China
- Prior art keywords
- data
- node
- follower
- calling data
- calling
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/55—Push-based network services
Abstract
The invention discloses the data transmission methods and device between a kind of distributed system node, and wherein the data transmission method includes: the calling data packet for receiving the Leader node push, and saves calling data summarization;Judge whether the calling data packet further includes calling data, and the calling data are corresponding with the calling data summarization;If it is not, then sending the first data inquiry request to multiple first object Follower nodes according to the first preset rules, for requiring multiple first object Follower querying nodes, whether its own includes the calling data to first data inquiry request;According to the second preset rules, the first response message returned to the first object Follower node is handled.The problem of present invention solves in the prior art, and under the scene of block chain application, the dynamics of Leader node propelling data can be bigger, easily becomes entire distributed system bottleneck.
Description
Technical field
The present invention relates to data communication applications technical fields, more particularly to the data between a kind of distributed system node
Transmission method and device.
Background technique
With the development of internet technology and universal, the covering crowd of Internet service is more and more extensive, covering scene is got over
Come more.Particularly, the development of development of Mobile Internet technology allows people that can enjoy Internet service whenever and wherever possible, while also in a steady stream
It is constantly be generated personal data.With the sharp increase of data volume, the computing capability of single computer has been unable to satisfy data processing and has wanted
It asks, computer starts to develop towards the direction of miniaturization and clustering.Computer in cluster is shared out the work and helped one another mutually, constitutes one
Distributed system, and the Data Consistency in distributed system is then the distributed computing technology matter of utmost importance to be solved.
In order to solve the Data Consistency in distributed system, that is, require each node in distributed system to data
Reach unified common recognition, is born and has developed a series of common recognition algorithm, these algorithms have different fault-tolerances, different performances
With different applicable scenes.Paxos algorithm (a kind of consistency algorithm based on message transmission) is to have very much in common recognition algorithm
It is initiative and representative, it can be difficult to understanding and realizing is its maximum disadvantage.Then, famous to be readily appreciated that and realize
Raft algorithm (a kind of common recognition algorithm) is suggested, and as Paxos algorithm, equally it can imperfectly be solved by formal proof
It certainly knows together problem.Raft algorithm require first it is all participate in common recognition nodes among elects a Leader node, then by
Leader node is responsible for data-pushing to other nodes, these nodes for receiving Leader node propelling data are referred to as
Follower.If the data of Follower node and the data that Leader node pushes are inconsistent, Follower node
It will receive and approve the data of Leader node push, to realize common recognition.The mode of this common recognition is, by Leader node
To all Follower node propelling datas, with the increase for the node for participating in common recognition, the network pressure of Leader node can be got over
Come bigger, becomes the bottleneck of whole system.When Raft algorithm is applied to block chain, Leader node is saved to Follower every time
The data of point push are the data of an intact block, and therefore, under the scene of block chain application, Leader node pushes number
According to dynamics can be bigger, this problems demand solves.
Summary of the invention
The embodiment of the present invention provides the data transmission method and device between a kind of distributed system node, existing to solve
In technology, under the scene of block chain application, the dynamics of Leader node propelling data can be bigger, easily becomes entire distribution
The problem of formula system bottleneck.
In order to solve the above technical problems, the first technical solution used in the embodiment of the present invention is as follows:
A kind of data transmission method between distributed system node, the distributed system include that mutually to carry out data logical
A Leader node and multiple Follower nodes for news comprising: receive the calling data of the Leader node push
Packet, and calling data summarization is saved, the calling data packet includes the calling data summarization;Judging the calling data packet is
No further includes calling data, and the calling data are corresponding with the calling data summarization;If it is not, then according to the first preset rules
The first data inquiry request is sent to multiple first object Follower nodes, first data inquiry request is more for requiring
Whether its own includes the calling data to a first object Follower querying node, plurality of first mesh
The sum for marking Follower node is less than the sum of the Follower node;According to the second preset rules, to first mesh
The first response message that mark Follower node returns is handled, and first response message includes the first object
Follower node contains the information for calling data;Wherein, the Leader node is periodically to described in whole
Follower node pushes the calling data packet, and whole Follower nodes receive the calling data and pluck
It wants, the only part Follower node receives the calling data.
Optionally, described according to the second preset rules, the first response that the first object Follower node is returned
Information is handled, comprising: makees a first object Follower node for returning to first response message at first
For the second target Follower node;Data call request, the data tune are sent to the second target Follower node
With request for requiring the second target Follower node to return to the calling data;Receive second target
The calling data that Follower node returns.
Optionally, before the transmission data call request to the second target Follower node, further includes: judgement
Whether second response message that the second target Follower node return is received, and second response message includes described
Second target Follower node includes the information for calling data;If so, being saved to the second target Follower
Point sends data call request, and the data call request includes that the second target Follower node is required to return to the tune
With the information of data.
Optionally, after the calling data for receiving the second target Follower node return, comprising: meter
Corresponding first cryptographic Hash of the calling data received;Corresponding second cryptographic Hash of the calling data summarization is obtained,
And judge whether first cryptographic Hash and second cryptographic Hash are identical;If so, saving the calling data received
To local.
Optionally, when first cryptographic Hash and not identical second cryptographic Hash, further includes: again pre- according to first
If rule sends first data inquiry request to multiple first object Follower nodes.
It optionally, then include: to save the calling data when the calling data packet received includes calling data,
And judge whether to receive first data inquiry request that multiple third target Follower nodes are sent, plurality of institute
The sum for stating third target Follower node is less than the sum of the Follower node;If so, to corresponding multiple institutes
It states third target Follower node and sends third response message, the third response message includes that sender includes the tune
With the information of data;Judge whether to receive the second data call request that the third target Follower node is sent, institute
Stating the second data call request includes that sender is required to return to the information for calling data;If so, to corresponding described
Three target Follower nodes send the calling data.
Optionally, the number for enabling the Follower node is N (N > 0), and enables and receive the part for calling data
The number of the Follower node is n, then N and n meets following relationship: as N≤2, n=N;As 2 < N≤11, n=(N-
2)/3+2;As N > 11, n=log2 (N-11)+5.
In order to solve the above technical problems, the second technical solution used in the embodiment of the present invention is as follows:
A kind of data transmission device between distributed system node, the distributed system include mutually carrying out data
A Leader node and multiple Follower nodes for communication comprising: receiving module, for receiving the Leader node
The calling data packet of push, and calling data summarization is saved, the calling data packet includes the calling data summarization;Judge mould
Block, for judging whether the calling data packet further includes calling data, the calling data and the calling data summarization phase
It is corresponding;Sending module, for when the calling data packet does not include calling data, according to the first preset rules to multiple first
Target Follower node sends the first data inquiry request, and first data inquiry request is for requiring multiple described first
Whether its own includes the calling data to target Follower querying node, the plurality of first object Follower
The sum of node is less than the sum of the Follower node;Processing module is used for according to the second preset rules, to described first
The first response message that target Follower node returns is handled, and first response message includes the first object
Follower node contains the information for calling data;Wherein, the Leader node is periodically to described in whole
Follower node pushes the calling data packet, and whole Follower nodes receive the calling data and pluck
It wants, the only part Follower node receives the calling data.
In order to solve the above technical problems, third technical solution used in the embodiment of the present invention is as follows:
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is performed reality
Now such as the data transmission method between above-mentioned distributed system node.
In order to solve the above technical problems, the 4th technical solution used in the embodiment of the present invention is as follows:
A kind of computer equipment comprising processor, memory and be stored on the memory and can be in the processing
The computer program run on device, the processor realize such as above-mentioned distributed system node when executing the computer program
Between data transmission method.
The beneficial effect of the embodiment of the present invention is: being in contrast to the prior art, the embodiment of the present invention is by receiving institute
The calling data packet for stating the push of Leader node, and saves calling data summarization, judge the calling data packet whether further include
Data are called, are asked if otherwise sending the first data query to multiple first object Follower nodes according to the first preset rules
It asks, finally according to the second preset rules, the first response message returned to the first object Follower node is handled,
It solves in the prior art, under the scene of block chain application, the dynamics of Leader node propelling data can be bigger, is easy to become
The problem of at entire distributed system bottleneck.
Detailed description of the invention
Fig. 1 is the implementation of one embodiment of data transmission method between the distributed system node of the embodiment of the present invention one
Flow chart;
Fig. 2 is the part of one embodiment of data transmission device between the distributed system node of the embodiment of the present invention two
Structural framing figure;
Fig. 3 is the part-structure frame diagram of one embodiment of computer readable storage medium of the embodiment of the present invention three;
Fig. 4 is the part-structure frame diagram of one embodiment of computer equipment of the embodiment of the present invention four.
Specific embodiment
Embodiment one
Referring to Fig. 1, Fig. 1 is the implementation stream of the data transmission method between the distributed system node of the embodiment of the present invention
Cheng Tu, data transmission method a kind of of the invention distributed system node between available in conjunction with Fig. 1, the distribution
System includes the mutual Leader node and multiple Follower nodes for carrying out data communication comprising:
Step S101: receiving the calling data packet of the Leader node push, and save calling data summarization, the tune
It include the calling data summarization with data packet.In this step, it is transmitted using one of Follower node as notebook data
The execution side of method is illustrated notebook data transmission method from the angle of a Follower node.
Step S102: judge whether the calling data packet further includes calling data, the calling data and the calling
Data summarization is corresponding.
Step S103: if the calling data packet does not include calling data, according to the first preset rules to multiple first
Target Follower node sends the first data inquiry request, and first data inquiry request is for requiring multiple described first
Whether its own includes the calling data to target Follower querying node, the plurality of first object Follower
The sum of node is less than the sum of the Follower node.
Step S104: according to the second preset rules, the first response that the first object Follower node returns is believed
Breath is handled, and first response message includes that the first object Follower node contains the letter for calling data
Breath.
Wherein, the Leader node periodically pushes the calling data packet to all Follower nodes,
And all the Follower node receives the calling data summarization, the only part Follower node receives
The calling data.
In the present embodiment, optionally, described according to the second preset rules, the first object Follower node is returned
The first response message returned is handled, comprising:
First, using one that the returns to first response message at first first object Follower node as second
Target Follower node.
The second target Follower node of second, Xiang Suoshu sends data call request, and the data call request is used for
It is required that the second target Follower node returns to the calling data.
Third receives the calling data that the second target Follower node returns.
In the present embodiment, optionally, described to request it to the second target Follower node transmission data call
Before, further includes:
First, judge whether to receive the second response message that the second target Follower node returns, described the
Two response messages include that the second target Follower node includes the information for calling data.
Second, if the second response message that the second target Follower node returns is received, to described second
Target Follower node sends data call request, and the data call request includes requiring the second target Follower
Node returns to the information for calling data.
In the present embodiment, optionally, the calling number for receiving the second target Follower node and returning
According to later, comprising:
First, calculate corresponding first cryptographic Hash of the calling data received.
Second, corresponding second cryptographic Hash of the calling data summarization is obtained, and judge first cryptographic Hash and described
Whether the second cryptographic Hash is identical;
Third saves the calling data received if first cryptographic Hash is identical with second cryptographic Hash
To local.
In the present embodiment, cryptographic Hash is also known as hash function (or hashing algorithm, also known as hash function, English: Hash
It Function) is a kind of method for creating small number " fingerprint " from any kind of data.Hash function is message or data
It is compressed into abstract, so that data volume becomes smaller, the format of data is fixed up.Data are upset mixing by the function, are re-created
One is called the fingerprint of hashed value (hash values, hash codes, hash sums or hashes).Hashed value is usually used
One short random letters is represented with the digital character string formed.Seldom there is hash punching in input domain in good hash function
It is prominent.In hash table and Data processing, does not inhibit conflict to carry out distinguishes data, data-base recording can be made to be more difficult to find.
In the present embodiment, optionally, when first cryptographic Hash and not identical second cryptographic Hash, further includes:
Again first data are sent to multiple first object Follower nodes according to the first preset rules to look into
Ask request.
In the present embodiment, optionally, when the calling data packet received include call data, then include:
First, the calling data are saved, and judge whether to receive what multiple third target Follower nodes were sent
The sum of first data inquiry request, the plurality of third target Follower node is saved less than the Follower
The sum of point.
Second, if receiving first data inquiry request that multiple third target Follower nodes are sent, to
Corresponding multiple third target Follower nodes send third response message, and the third response message includes sender
It include the information for calling data.
Third judges whether to receive the second data call request that the third target Follower node is sent, institute
Stating the second data call request includes that sender is required to return to the information for calling data.
4th, if the second data call request that the third target Follower node is sent is received, to correspondence
The third target Follower node send the calling data.
In the present embodiment, optionally, the number for enabling the Follower node is N (N > 0), and enables and receive the tune
Number with the part of the data Follower node is that n, then N and n meet following relationship: as N≤2, n=N;As 2 < N
When≤11, n=(N-2)/3+2;As N > 11, n=log2 (N-11)+5.
The following content is illustrating from Raft algorithm to the present invention program whole process:
In primary Raft algorithm, participate in there are three types of the communications only between node RPC (remote procedure call):
RequestVote (request ballot): when in systems there are no Leader node is determined, participating in node can be to
All participation nodes except oneself initiate this calling, request as oneself ballot.If one of node that participates in obtains
More than the ballot paper for participating in node total number half, then it will become the Leader node in system.If being not engaged in node to obtain
Obtaining is more than the ballot paper for participating in node total number half, then re-starting next round election.Participate in whether node votes to another ginseng
With node, there is determining condition to be constrained, guarantees system at any one time, only one most Leader node, and should
The data mode of Leader node is old unlike other any participation nodes.
AppendEntries (additional entries): after Leader node in systems determines, Leader node starts week
This calling is initiated to phase property to all participation nodes except oneself, by data-pushing to all participation nodes.Leader section
Point can safeguard the data synchronous regime of each Follower node, send suitable incremental data to each Follower node.
Each Follower node checks whether the data of oneself have with the incremental data received according to determining rule and conflicts, if
There is conflict, then by rollback colliding data, then using the data received.
InstallSnapshot (installation snapshot): a certain value of the data in system, may be run with system and
It updates repeatedly, then all history values of this can delete after saving the latest value of this, it is empty to save storage
Between.The set of all current values of data, the i.e. recent snapshot of system in system.All participation nodes in system can be with
Snapshot independently is carried out according to certain needs and rule are autonomous, and deletes all status datas before the snapshot.If
There is part Follower node in system because of certain reasons, data mode far lags behind the data mode of Leader node, that
Leader node can initiate this calling, and newest snapshot is directly pushed to these Follower nodes, is ignored therebetween
Historical data.The characteristics of due to block chain, snapshot functions are not realized in the application of block chain.
It can be seen that, Leader node to all Follower nodes by initiating from foregoing description
AppendEntries, which is called, carrys out propelling data, and with the increase for the sum for participating in node, the data volume of Leader node push will
It is linearly increasing therewith.Therefore, the present invention is in order to solve linearly increasing this problem of data volume that Leader node pushes, to Raft
Algorithm has carried out P2P extension, and P2P extension needs to modify the called side of AppendEntries calling and the processing logic by tune side,
In addition, it is necessary to increase two kinds of RPC newly.Concrete scheme is as follows:
First, it is the modification that AppendEntries calls processing logic, i.e., is called in data packet in AppendEntries,
Increase " data summarization " field newly, which saves the cryptographic Hash of the data to be pushed in this calling, and the field is
Mandatory field." data " field in original request, becomes optional from essential.Leader node is initiating AppendEntries tune
Used time calculates the value of " data summarization " field according to " data " field, a certain number of for " data " field
AppendEntries, which is called in data packet, can be attached to this field, remaining AppendEntries calls data packet to allow the field
It leaves a blank.For how many quantity AppendEntries call data packet can be attached to " data " field, then by certain rule Lai
It determines.Assuming that Follower number of nodes is N (N > 0), it is n that the AppendEntries of subsidiary " data " field, which calls number-of-packet,
So: if N≤2, n=N;If 2 < N≤11, n=(N-2)/3+2;If N > 11, n=log2 (N-11)+5.
Follower node saves " data summarization " field therein when receiving AppendEntries calling data packet,
If request has subsidiary " data " field, the data that push comes are saved by original logic, otherwise, data pass through P2P (point
To point) mode obtain.
Second, it increases QueryEntries (query entries) newly and calls, is i.e. QueryEntries is called by Follower node
It initiates, for the data that whether it has oneself to lack to other participation querying nodes.Follower node is at random to certain amount
Other participation nodes initiate request, request receiving node inquires the data for oneself whether having request required, then according to looking into
Result is ask to be responded.After request initiation node receives response, if indicating that it has corresponding missing data in response, send out
Playing node will request responsive node to transmit corresponding data.The QueryEntries disposably initiated calls data packet number and ginseng
The AppendEntries that foregoing description can be continued to use with the relationship of node total number, which is called, is attached to asking for " data " field in data packet
The relationship of the quantity and participation node total number asked.
Third increases TransferEntries (transmission entry) newly and calls, i.e. TransferEntries call by
Follower node is initiated, the data for requesting oneself to lack to other participation nodes.Follower node is receiving
After the significant response that QueryEntries is called, TransferEntries is initiated to responsive node and calls data packet.
TransferEntries calls data packet receiving node that corresponding data are attached into TransferEntries response and returns.
TransferEntries responds the cryptographic Hash that receiving node calculates data subsidiary in response, then saves with the value and locally
Corresponding " data summarization " field be compared, unanimously then by original logic save data, it is inconsistent, re-initiate
QueryEntries is called, and continues to attempt to get the data by way of P2P.
The embodiment of the present invention saves and data is called to pluck by receiving the calling data packet of the Leader node push
It wants, judges whether the calling data packet further includes calling data, if otherwise according to the first preset rules to multiple first objects
Follower node sends the first data inquiry request, finally according to the second preset rules, to the first object Follower
The first response message that node returns is handled, and is solved in the prior art, under the scene of block chain application, Leader section
The problem of dynamics of point propelling data can be bigger, easily becomes entire distributed system bottleneck.
The present invention guarantee Raft algorithm correctness and completeness under the premise of, common recognition data Follower node it
Between carry out (point-to-point) transmission of P2P, greatly reduce the network pressure of Leader node, Leader node avoided to become entire
The bottleneck of system, individually scheduling is carried out in transmission excessively frequently to cause shadow to the overall performance of system because of scheduling
It rings.In the application and extension of Raft algorithm, Leader node is made a summary to Follower node propelling data, and data itself are in institute
Have and participates in carrying out P2P transmission between node.
The present invention has carried out P2P extension to Raft algorithm, under the premise of guaranteeing the correctness and completeness of Raft algorithm,
Make to transmit data by the way of P2P between the node for participating in knowing together, reach following effect:
1, the overall data synchronization and common recognition efficiency of distributed system are promoted.
2, Leader meshed network pressure in distributed system is greatly reduced.
3, avoiding Leader node becomes the performance bottleneck of distributed system.
4, on the premise of ensuring performance, distributed system supports more participation nodes.
Embodiment two
Referring to Fig. 2, Fig. 2 is one embodiment party of data transmission device between the distributed system node of the embodiment of the present invention
The part-structure frame diagram of formula, data transmission device 100 a kind of distributed system node between available in conjunction with Fig. 2,
The distributed system includes the mutual Leader node and multiple Follower nodes for carrying out data communication comprising:
Receiving module 110 for receiving the calling data packet of the Leader node push, and saves and data is called to pluck
It wants, the calling data packet includes the calling data summarization.
Judgment module 120, for judging whether the calling data packet further includes calling data, the calling data and institute
It states and calls data summarization corresponding.
Sending module 130, for when the calling data packet does not include calling data, according to the first preset rules to more
A first object Follower node sends the first data inquiry request, and first data inquiry request is for requiring multiple institutes
Stating first object Follower querying node, whether its own includes the calling data, the plurality of first object
The sum of Follower node is less than the sum of the Follower node.
Processing module 140 is used for according to the second preset rules, to the first of first object Follower node return
Response message is handled, and first response message includes that the first object Follower node contains the calling data
Information.
Wherein, the Leader node periodically pushes the calling data packet to all Follower nodes,
And all the Follower node receives the calling data summarization, the only part Follower node receives
The calling data.
The embodiment of the present invention saves and data is called to pluck by receiving the calling data packet of the Leader node push
It wants, judges whether the calling data packet further includes calling data, if otherwise according to the first preset rules to multiple first objects
Follower node sends the first data inquiry request, finally according to the second preset rules, to the first object Follower
The first response message that node returns is handled, and is solved in the prior art, under the scene of block chain application, Leader section
The problem of dynamics of point propelling data can be bigger, easily becomes entire distributed system bottleneck.
Embodiment three
Referring to Fig. 3, can see with reference to Fig. 3, a kind of computer readable storage medium 10 of the embodiment of the present invention is described
Computer readable storage medium 10, such as: ROM/RAM, magnetic disk, CD are stored thereon with computer program 11, the calculating
Machine program 11 is performed the data transmission method realized between the distributed system node as described in embodiment one.Due to this point
Data transmission method between cloth system node is described in detail in embodiment one, is not repeated herein
It is bright.
The data transmission method between distributed system node that the embodiment of the present invention is realized, by receiving the Leader
The calling data packet of node push, and calling data summarization is saved, judge whether the calling data packet further includes calling data,
If otherwise according to the first preset rules to multiple first object Follower nodes send the first data inquiry request, finally according to
Second preset rules, the first response message returned to the first object Follower node are handled, are solved existing
In technology, under the scene of block chain application, the dynamics of Leader node propelling data can be bigger, easily becomes entire distribution
The problem of formula system bottleneck.
Example IV
Referring to Fig. 4, can see with reference to Fig. 4, a kind of computer equipment 20 of the embodiment of the present invention comprising processor
21, memory 22 and it is stored in the computer program 221 that can be run on the memory 22 and on the processor 21, it is described
Processor 21 realizes that the data between the distributed system node as described in embodiment one pass when executing the computer program 221
Transmission method.Since the data transmission method between the distributed system node is described in detail in embodiment one,
This will not be repeated here.
The data transmission method between distributed system node that the embodiment of the present invention is realized, by receiving the Leader
The calling data packet of node push, and calling data summarization is saved, judge whether the calling data packet further includes calling data,
If otherwise according to the first preset rules to multiple first object Follower nodes send the first data inquiry request, finally according to
Second preset rules, the first response message returned to the first object Follower node are handled, are solved existing
In technology, under the scene of block chain application, the dynamics of Leader node propelling data can be bigger, easily becomes entire distribution
The problem of formula system bottleneck.
Mode the above is only the implementation of the present invention is not intended to limit the scope of the invention, all to utilize this
Equivalent structure or equivalent flow shift made by description of the invention and accompanying drawing content is applied directly or indirectly in other relevant
Technical field is included within the scope of the present invention.
Claims (10)
1. the data transmission method between a kind of distributed system node, the distributed system includes mutually carrying out data communication
A Leader node and multiple Follower nodes characterized by comprising
The calling data packet of the Leader node push is received, and saves calling data summarization, the calling data packet includes
The calling data summarization;
Judge whether the calling data packet further includes calling data, and the calling data are opposite with the calling data summarization
It answers;
If it is not, then sending the first data inquiry request, institute to multiple first object Follower nodes according to the first preset rules
Stating the first data inquiry request, whether its own includes for requiring multiple first object Follower querying nodes
Calling data are stated, the sum of the plurality of first object Follower node is less than the sum of the Follower node;
According to the second preset rules, the first response message returned to the first object Follower node is handled, institute
Stating the first response message includes that the first object Follower node contains the information for calling data;
Wherein, the Leader node periodically pushes the calling data packet to all Follower nodes, and complete
Follower node described in portion receives the calling data summarization, and the only part Follower node receives described
Call data.
2. the data transmission method between distributed system node according to claim 1, which is characterized in that it is described according to
Second preset rules, the first response message returned to the first object Follower node are handled, comprising:
Using one that the returns to first response message at first first object Follower node as the second target
Follower node;
Data call request is sent to the second target Follower node, and data call request is for requiring described the
Two target Follower nodes return to the calling data;
Receive the calling data that the second target Follower node returns.
3. the data transmission method between distributed system node according to claim 2, which is characterized in that described to institute
State the second target Follower node send data call request before, further includes:
Judge whether to receive the second response message that the second target Follower node returns, second response message
It include the information for calling data including the second target Follower node;
If so, sending data call request to the second target Follower node, the data call request includes wanting
The second target Follower node is asked to return to the information for calling data.
4. the data transmission method between distributed system node according to claim 2, which is characterized in that the reception
After the calling data that the second target Follower node returns, comprising:
Calculate corresponding first cryptographic Hash of the calling data received;
Corresponding second cryptographic Hash of the calling data summarization is obtained, and judges first cryptographic Hash and second cryptographic Hash
It is whether identical;
If so, saving the calling data received to locally.
5. the data transmission method between distributed system node according to claim 4, which is characterized in that when described
When one cryptographic Hash and not identical second cryptographic Hash, further includes:
Again first data query is sent to multiple first object Follower nodes according to the first preset rules to ask
It asks.
6. the data transmission method between distributed system node according to claim 1, which is characterized in that when receiving
The calling data packet include call data, then include:
The calling data are saved, and judge whether to receive first number that multiple third target Follower nodes are sent
According to inquiry request, the sum of the plurality of third target Follower node is less than the sum of the Follower node;
If so, sending third response message, the third response to corresponding multiple third target Follower nodes
Information includes that sender includes the information for calling data;
Judge whether to receive the second data call request that the third target Follower node is sent, second data
Call request includes that sender is required to return to the information for calling data;
If so, sending the calling data to the corresponding third target Follower node.
7. the data transmission method between distributed system node according to claim 1, which is characterized in that described in order
The number of Follower node is N (N > 0), and enables the number for receiving the part Follower node for calling data
For n, then N and n meets following relationship:
As N≤2, n=N;
As 2 < N≤11, n=(N-2)/3+2;
As N > 11, n=log2 (N-11)+5.
8. the data transmission device between a kind of distributed system node, the distributed system includes mutually carrying out data to lead to
A Leader node and multiple Follower nodes for news characterized by comprising
Receiving module for receiving the calling data packet of the Leader node push, and saves calling data summarization, the tune
It include the calling data summarization with data packet;
Judgment module, for judging whether the calling data packet further includes calling data, the calling data and the calling
Data summarization is corresponding;
Sending module, for when the calling data packet does not include calling data, according to the first preset rules to multiple first
Target Follower node sends the first data inquiry request, and first data inquiry request is for requiring multiple described first
Whether its own includes the calling data to target Follower querying node, the plurality of first object Follower
The sum of node is less than the sum of the Follower node;
Processing module, for believing the first response that the first object Follower node returns according to the second preset rules
Breath is handled, and first response message includes that the first object Follower node contains the letter for calling data
Breath;
Wherein, the Leader node periodically pushes the calling data packet to all Follower nodes, and complete
Follower node described in portion receives the calling data summarization, and the only part Follower node receives described
Call data.
9. a kind of computer readable storage medium, which is characterized in that be stored thereon with computer program, the computer program quilt
The data transmission method between the described in any item distributed system nodes of claim 1~7 is realized when execution.
10. a kind of computer equipment, which is characterized in that it includes processor, memory and is stored on the memory and can
The computer program run on the processor, the processor realize claim 1~7 when executing the computer program
Data transmission method between described in any item distributed system nodes.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910760714.5A CN110430282B (en) | 2019-08-16 | 2019-08-16 | Data transmission method and device between nodes of distributed system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910760714.5A CN110430282B (en) | 2019-08-16 | 2019-08-16 | Data transmission method and device between nodes of distributed system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110430282A true CN110430282A (en) | 2019-11-08 |
CN110430282B CN110430282B (en) | 2022-03-01 |
Family
ID=68415143
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910760714.5A Active CN110430282B (en) | 2019-08-16 | 2019-08-16 | Data transmission method and device between nodes of distributed system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110430282B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111030930A (en) * | 2019-12-02 | 2020-04-17 | 北京众享比特科技有限公司 | Decentralized network data fragment transmission method, device, equipment and medium |
CN111324305A (en) * | 2020-02-16 | 2020-06-23 | 西安奥卡云数据科技有限公司 | Data writing/reading method in distributed storage system |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180089262A1 (en) * | 2016-09-26 | 2018-03-29 | Splunk Inc. | Dynamic resource allocation for common storage query |
CN109067849A (en) * | 2018-07-11 | 2018-12-21 | 杨国超 | Method of data synchronization based on block |
CN109327548A (en) * | 2018-11-27 | 2019-02-12 | 北京瑞卓喜投科技发展有限公司 | A kind of block chain update method and block chain more new system |
CN109379397A (en) * | 2018-08-31 | 2019-02-22 | 阿里巴巴集团控股有限公司 | Transaction common recognition processing method and processing device, electronic equipment based on block chain |
CN109522362A (en) * | 2018-10-17 | 2019-03-26 | 北京瑞卓喜投科技发展有限公司 | Incomplete markets synchronous method, system and equipment based on block chain data |
WO2019081917A1 (en) * | 2017-10-24 | 2019-05-02 | Copa Fin Limited | Data storage and verification |
US20190138638A1 (en) * | 2016-09-26 | 2019-05-09 | Splunk Inc. | Task distribution in an execution node of a distributed execution environment |
-
2019
- 2019-08-16 CN CN201910760714.5A patent/CN110430282B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180089262A1 (en) * | 2016-09-26 | 2018-03-29 | Splunk Inc. | Dynamic resource allocation for common storage query |
US20190138638A1 (en) * | 2016-09-26 | 2019-05-09 | Splunk Inc. | Task distribution in an execution node of a distributed execution environment |
WO2019081917A1 (en) * | 2017-10-24 | 2019-05-02 | Copa Fin Limited | Data storage and verification |
CN109067849A (en) * | 2018-07-11 | 2018-12-21 | 杨国超 | Method of data synchronization based on block |
CN109379397A (en) * | 2018-08-31 | 2019-02-22 | 阿里巴巴集团控股有限公司 | Transaction common recognition processing method and processing device, electronic equipment based on block chain |
CN109522362A (en) * | 2018-10-17 | 2019-03-26 | 北京瑞卓喜投科技发展有限公司 | Incomplete markets synchronous method, system and equipment based on block chain data |
CN109327548A (en) * | 2018-11-27 | 2019-02-12 | 北京瑞卓喜投科技发展有限公司 | A kind of block chain update method and block chain more new system |
Non-Patent Citations (2)
Title |
---|
CHRISTIAN FLURI: "Improving Raft When There Are Failures", 《2018 EIGHTH LATIN-AMERICA SYMPOSIUM ON DEPENDABLE COMPUTING》 * |
陈陆: "改进的Raft一致性算法及其研究", 《江苏科技大学学报(自然科学版)》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111030930A (en) * | 2019-12-02 | 2020-04-17 | 北京众享比特科技有限公司 | Decentralized network data fragment transmission method, device, equipment and medium |
CN111030930B (en) * | 2019-12-02 | 2022-02-01 | 北京众享比特科技有限公司 | Decentralized network data fragment transmission method, device, equipment and medium |
CN111324305A (en) * | 2020-02-16 | 2020-06-23 | 西安奥卡云数据科技有限公司 | Data writing/reading method in distributed storage system |
Also Published As
Publication number | Publication date |
---|---|
CN110430282B (en) | 2022-03-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5798644B2 (en) | Consistency within the federation infrastructure | |
WO2016177285A1 (en) | Data pushing method and device | |
US20080097994A1 (en) | Method of extracting community and system for the same | |
EP2527997A2 (en) | Peer-to-peer graphing interfaces and methods | |
CN111212085B (en) | Method for synchronously calling Internet of things platform, internet of things system and network equipment | |
CN103780679A (en) | Long time delay remote invocation method based on HTTP protocol | |
CN101516131B (en) | Method, system and device for data synchronization | |
CN111163148B (en) | Synchronization method and related equipment for consensus state of block chain system | |
CN110430282A (en) | Data transmission method and device between distributed system node | |
CN101316221A (en) | Notification message processing method and equipment | |
US20100211542A1 (en) | Methods and systems for halting synchronization loops in a distributed system | |
CN111611321B (en) | Data storage method, device and blockchain system | |
CN111277483B (en) | Multi-terminal message synchronization method, server and storage medium | |
JP2024517445A (en) | Blockchain-based data processing method, data processing device, computer device, and computer program | |
Elsässer et al. | The power of memory in randomized broadcasting | |
CN111444204A (en) | Synchronous processing method, device, equipment and medium | |
CN111124717A (en) | Message delivery method, system and computer storage medium | |
Bjurefors et al. | Interest dissemination in a searchable data-centric opportunistic network | |
CN116820795A (en) | Method and system for accelerating message processing speed and maintaining processing sequence | |
CN112749172A (en) | Data synchronization method and system between cache and database | |
Klappenecker et al. | Dynamic regular registers in systems with churn | |
CN115277707A (en) | Service processing method, device, electronic equipment and storage medium | |
CN112434111A (en) | Basic data synchronization method, device, equipment and storage medium | |
US20050135326A1 (en) | Smart poller for optical network management systems | |
CN115314510B (en) | Block chain node synchronization method, device, electronic equipment and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |