CN102368700B - Transmission method of massages in distributed system - Google Patents

Transmission method of massages in distributed system Download PDF

Info

Publication number
CN102368700B
CN102368700B CN201110328318.9A CN201110328318A CN102368700B CN 102368700 B CN102368700 B CN 102368700B CN 201110328318 A CN201110328318 A CN 201110328318A CN 102368700 B CN102368700 B CN 102368700B
Authority
CN
China
Prior art keywords
message
transmit leg
recipient
transmission
expection
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.)
Active
Application number
CN201110328318.9A
Other languages
Chinese (zh)
Other versions
CN102368700A (en
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.)
Dawning Information Industry Beijing Co Ltd
Dawning Information Industry Co Ltd
Original Assignee
Dawning Information Industry Beijing 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 Dawning Information Industry Beijing Co Ltd filed Critical Dawning Information Industry Beijing Co Ltd
Priority to CN201110328318.9A priority Critical patent/CN102368700B/en
Publication of CN102368700A publication Critical patent/CN102368700A/en
Application granted granted Critical
Publication of CN102368700B publication Critical patent/CN102368700B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention provides a high-reliability transmission method of messages in a distributed system. The transmission method can provide efficient and reliable message transmission to the distributed system and guarantee the reliability of the message transmission which is memorized into a memory level; meanwhile, the transmission method also can guarantee that the messages lost in a network transmission process can be retransmitted to a receiver in a recovering step after the network is malfunctioned, so that the reliability of the system is guaranteed.

Description

The transmission method of message in a kind of distributed system
Technical field
The present invention relates to the communication system of parallel file system, particularly the highly reliable transmission of messages field in a kind of distributed system.
Background technology
In distributed system, communication system, as the communication infrastructure between each node of system, has great importance.Due to the node in distributed system and the network equipment separate, all may break down at any time, message path between node relates to a plurality of parts simultaneously, the message buffer that comprises communication system, the message of system sends buffering area, the hardware buffer of network interface card and switch, the reception buffer zone of system, the reception buffer zone of communication system, when system breaks down, cannot determine where communication information is positioned at.
In the once communication of a distributed system, be divided into communication initiator and communication receiver, the operation of communication initiator's initiating communication, communication receiver's receipt message is also processed for message content, and send and to finish dealing with message to communication initiator, notify communication initiator to finish dealing with.Communication information sends to message receiver from message sender need to pass through message sender, and communication layers sends buffering, network interface card hardware buffer, and exchange hardware input, output buffering, network interface card hardware buffer, communication layers receives buffering, finally arrives message receiver.The message of finishing dealing with that the traffic operation that communication initiator sends and communication receiver reply all needs through said communication paths.When system breaks down, communication information may be present in any one place, may be present in transmit path, and in recipient buffering area, or received side has processed, but complete to process, does not reply.Also may be that recipient receives and finishes dealing with, response message be lost, and response message is in communication layers buffering area, in the hardware buffer district of network interface card or switch.After system breaks down, general reliability processing mode, for communicating reconstruction, then resends the incorrect message of processing.But for the communication that can not repeat, because communication request side cannot know whether communication information is received and carry out by communication service side, if now communication initiator sends identical communication information again, can cause communication receiver to occur unknown system mode, thereby make distributed system occur inconsistent state.Traditional solution, for to process in application layer, makes the communication of application layer become complicated.
Meanwhile, the succession of transmission of messages is extremely important in distributed system, in order to guarantee the succession of communication, generally in application layer, realizes the order that guarantees communication.After network breaks down, maintain this succession and become very complicated, a kind of reliable network layer need to be provided, provide reliable transmission of messages sequentially to ensure.
On the other hand, owing to there is fault in the transmission channel of intra-node, even if transmission over networks has guaranteed reliability, can not guarantee to apply the data consistency end to end of one-level, need the reliable news transmission mechanism of memory-to-memory level in a kind of communication process.Under this background, this patent has proposed a kind of highly reliable method for message transmission, and having guaranteed, under the prerequisite of transmission of messages interface terseness of application layer, provides memory-to-memory level reliable transmission of messages.
Summary of the invention
The object of the invention is to solve the integrity problem of transmission of messages in distributed system, method for message transmission highly reliable in a kind of distributed system is provided.
In order to solve in the system failure, the problem of communication initiator to the Status unknown of a traffic operation, the present invention proposes a kind of based on error control mechanism and verification scheme end to end, the state of message be can in fault, determine, and succession and the correctness of Internet Transmission message guaranteed.
A transmission method for message in distributed system,
At the two ends of communication path, safeguard respectively a message sequence number and expection message SN, when connecting foundation for the first time, first communicating pair is 0 by control message synchronization message sequence number, and communicating pair synchronously expects that message SN is 0 simultaneously;
For the message of each transmission, first obtain the message sequence number of connection, this message sequence number is filled in the control message head that sends message, send after message success, upgrade the transmitting time that sends message, this message is put into transmission message queue to be confirmed, wait for the confirmation from recipient;
Recipient, after receiving message, checks whether the message sequence number on message header mates with current expection message sequence number;
The acknowledge message that transmit leg is receiving recipient and returns, according to message number, message number in queue to be sent is less than or equal to the message of this message number, confirmation is sent completely, and notice upper strata is sent completely, and the message number to be confirmed of simultaneously upgrading side to be sent is acknowledge message number; If acknowledge message number does not find message to be confirmed in queue to be sent, think that this message is identified, directly abandons this acknowledge message;
If the request in the queue to be sent of transmit leg is not answered in the set time, thinks and resend this message by transmission information drop-out, wait acknowledge message;
After breaking down, transmit leg and recipient consult message number to be confirmed and send message number, if find that recipient's message number to be confirmed is greater than the message number to be confirmed of transmit leg, represent to exist to receive, but the unacknowledged message number of transmit leg, the message number to be confirmed that the synchronous message number to be confirmed of transmit leg is recipient expects that recipient the message that message number and transmit leg send between message number-1 retransmits by message number in message queue to be sent simultaneously.
Preferably, when whether the message sequence number on checking message header mates with current expection message sequence number,
If message sequence number is less than expection message sequence number, think that this message is sent completely, abandon the message of receiving, and return to acknowledge message to transmit leg, confirmation number is current expection message sequence number-1;
If message sequence number is greater than expection message sequence number, this message is inserted in message queue to be received, wait for expection message;
If message sequence number equals to expect message number, this message is submitted to recipient and processed, search for message queue to be received, continuous message after existence expection message number whether, if existed, submit in the lump recipient and process, upgrade the latest news N+1 of up-to-date expection message number for submitting to; The most backward transmit leg returns to acknowledge message, and acknowledge message number is the up-to-date message number N submitting to.
Preferably, described transmit leg, between message sends, is used message checking algorithm to calculate message check value, and this check value is appended to and sent in message header, carries out message transmission.
Preferably, described checking algorithm adopts MD5 or CRC.
Preferably, described recipient is after receiving message, until after message receives the internal memory of reception buffer zone completely, just start to calculate the check value of message, if find that the transmit leg check value carrying in the middle of the message check value calculate and message header does not mate, think message error of transmission on bang path, directly this message is abandoned, do not carry out the reception operation in error control step, send NAK message to transmit leg, carry this wrong message number.
Preferably, described transmit leg is receiving NAK message, knows that recipient receives this message error, in transmission message queue to be confirmed, finds the message that message number is identical, carries out message retransmission, the message authentication of the message to be sent such as continuation.
Highly reliable method for message transmission in a kind of distributed system that the present invention proposes, the transmission of messages of high efficient and reliable can be provided for distributed system, guarantee the reliability of other transmission of messages of memory-to-memory level, simultaneously after network breaks down, the message that can guarantee the loss in Internet Transmission is again transferred to recipient in recovering step, has guaranteed the reliability of system.
Accompanying drawing explanation
Below, describe by reference to the accompanying drawings embodiments of the invention in detail, wherein:
Fig. 1 is message transmit path schematic diagram;
Fig. 2 is scene schematic diagram corresponding to highly reliable transmission of messages mechanism;
Embodiment
Below in conjunction with the drawings and specific embodiments, method of the present invention is described.
The thought of error control mechanism is end to end: employing message request sequence number+reply (ACK)+retransmit the mode of (NAK)+overtime repeating transmission, guarantees that message sends to target side processed.Concrete grammar is:
Step S1, at the two ends of communication path, safeguard respectively a message sequence number and expection message SN, the message sequence number of transmit leg is send_msg_sn, expection message sequence number is send_ack_sn, recipient's message number is recv_msg_sn, expection message number is recv_ack_sn, and it is msg_sn that message header carries message number, and acknowledge message number is ack_sn.When connecting foundation for the first time, first communicating pair is 0 by control message synchronization message sequence number, and communicating pair synchronously expects that message SN is 0. simultaneously
Step S2, message for each transmission, first obtain the message sequence number send_msg_sn of connection, this message sequence number is filled in the control message head msg_sn that sends message, send after message success, upgrade the transmitting time that sends message, this message is put into transmission message queue to be confirmed, wait for the confirmation from recipient
Step S3, recipient, after receiving message, checks whether the message sequence number on message header mates with current expection message sequence number, has following three kinds of situations:
(1) if message sequence number msg_sn is less than expection message sequence number recv_ack_sn, think that this message is sent completely, abandon the message of receiving, and return to acknowledge message to transmit leg, confirmation number is current expection message sequence number recv_ack_sn-1.
(2) if message sequence number msg_sn is greater than expection message sequence number recv_ack_sn, this message is inserted in message queue to be received, waited for expection message
(3) if message sequence number msg_sn equals to expect message number recv_ack_sn, this message being submitted to recipient processes, search for message queue to be received, continuous message after existence expection message number whether, if existed, submit in the lump recipient and process, upgrade the latest news N+1 of up-to-date expection message number for submitting to.The most backward transmit leg returns to acknowledge message, and acknowledge message number is the up-to-date message number N submitting to.
Step S4, the acknowledge message that transmit leg is receiving recipient and returns, according to message number ack_sn, message number in queue to be sent is less than or equal to the message of this message number ack_sn, confirmation is sent completely, notice upper strata is sent completely, and the message number send_ack_sn to be confirmed that simultaneously upgrades side to be sent is ack_sn.If acknowledge message ack_sn does not find message to be confirmed in queue to be sent, think that this message is identified, directly abandons this acknowledge message
Step S4, if the request in the queue to be sent of transmit leg is not answered in the set time, thinks and uses step S1 to resend this message, wait acknowledge message by transmission information drop-out
Step S5, after breaking down, transmit leg and recipient consult message number to be confirmed and send message number, if find that recipient's message number to be confirmed is greater than the message number to be confirmed of transmit leg, represent to exist to receive, but the unacknowledged message number of transmit leg, the message number to be confirmed that the synchronous message number to be confirmed of transmit leg is recipient.Message number in message queue to be sent is expected to the message that message number recv_ack_sn and transmit leg send between message number send_msg_sn-1 retransmits recipient simultaneously, so just can guarantee reliably orderly transmission message
Message verification scheme is:
Step S1, transmit leg, between message sends, is first used message checking algorithm modes such as () MD5/CRC to calculate message check value, and this check value is appended to sends in message header, carries out message transmission
Step S2, recipient is after receiving message, until after message receives the internal memory of reception buffer zone completely, just start to calculate the check value of message, if find that the transmit leg check value carrying in the middle of the message check value calculate and message header does not mate, think message error of transmission on bang path, directly this message is abandoned, do not carry out the reception operation in error control step, send NAK message to transmit leg, carry this wrong message number.
Step S3, transmit leg is receiving NAK message, knows that recipient receives this message error, in transmission message queue to be confirmed, finds the message that message number is identical, carries out message retransmission, the message authentication of the message to be sent such as continuation.
The path of a message transmission as shown in Figure 1, is mainly divided into following several step:
Step S1, the operation of application initiator initiating communication, transfers to communication layers to process
Step S2, communication layers is carried out message transmit operation, and communication layers may buffer memory communication information
Step S3, communication network card sends message, and may there is hardware buffer district in communication network card
Step S4, data send in communication network, and may there is exchange hardware buffering area in the switch of communication network
Step S5, communication network card receipt message, there is hardware buffer district in communication network card
Step S6, communication layers is carried out the reception operation of message, transfers to apply receiving layer and process after finishing receiving, and in communication layers, may buffer unit divide the communication information of reception,
Step S7, application receiving layer receives communication information, processes operation
The possible situation of highly reliable transmission of messages mechanism is as shown in Figure 2:
Situation S1, transmit leg initiates a message, and recipient normally receives the confirmation message, and sends response message ACK,
Situation S2, transmit leg initiates a message, and recipient receives message, by calculation check value, finds to cause message error in transmitting procedure, abandons, and uses NAK mode to notify transmit leg to carry out message retransmission
Situation S3, transmit leg initiates a message, but within the set time, does not receive recipient's response message, and resend message, waits for that recipient, after receiving message, carries out message authentication.

Claims (3)

1. a transmission method for message in distributed system, is characterized in that:
At the two ends of communication path, safeguard respectively a message sequence number and expection message SN, when connecting foundation for the first time, first communicating pair is 0 by control message synchronization message sequence number, and communicating pair synchronously expects that message SN is 0 simultaneously;
For the message of each transmission, first obtain the message sequence number of connection, this message sequence number is filled in the control message head that sends message, send after message success, upgrade the transmitting time that sends message, this message is put into transmission message queue to be confirmed, wait for the confirmation from recipient;
Recipient, after receiving message, checks whether the message sequence number on message header mates with current expection message SN;
The acknowledge message that transmit leg is receiving recipient and returns, according to acknowledge message number, message number on transmission message queue to be confirmed is less than or equal to the message of this acknowledge message number, confirmation is sent completely, and notice upper strata is sent completely, and the expection message SN that simultaneously upgrades transmit leg is acknowledge message number; If acknowledge message number does not find message to be confirmed on transmission message queue to be confirmed, think that this message is identified, directly abandons this acknowledge message;
If the request in the transmission message queue to be confirmed of transmit leg is not answered in the set time, thinks and resend this message by transmission information drop-out, wait acknowledge message;
After breaking down, transmit leg and recipient consult to expect message SN and send message sequence number, if find that recipient's expection message SN is greater than the expection message SN of transmit leg, represent to exist to receive, but the unacknowledged message number of transmit leg, transmit leg synchronously expects that message SN is recipient's expection message SN, message number in transmission message queue to be confirmed is expected to the message that message SN and transmit leg send between message sequence number-1 retransmits recipient simultaneously;
The message sequence number of recipient on checking message header whether when current expection message SN mates,
If message sequence number is less than expection message SN, think that this message is sent completely, abandon the message of receiving, and return to acknowledge message to transmit leg, confirmation number is current expection message SN-1;
If message sequence number is greater than expection message SN, this message is inserted in message queue to be received, wait for expection message;
If message sequence number equals to expect message SN, this message being submitted to recipient processes, search for message queue to be received, continuous message after existence expection message SN whether, if existed, submit in the lump recipient and process, upgrade the latest news N+1 of up-to-date expection message SN for submitting to; The most backward transmit leg returns to acknowledge message, and acknowledge message number is the up-to-date message number N submitting to;
Described transmit leg, before message sends, is used message checking algorithm to calculate message check value, and this check value is appended to and sent in message header, carries out message transmission;
Described recipient is after receiving message, until after message receives the internal memory of reception buffer zone completely, just start to calculate the check value of message, if find that the message check value and the middle transmit leg check value carrying of message header that calculate do not mate, think and directly this message is abandoned message error of transmission on bang path, do not carry out the reception operation in error control step, send NAK message to transmit leg, carry this wrong message number.
2. the method for claim 1, is characterized in that: described checking algorithm adopts MD5 or CRC.
3. the method for claim 1, it is characterized in that: described transmit leg is receiving NAK message, know that recipient receives this message error, in transmission message queue to be confirmed, find the message that message number is identical, carry out message retransmission, the message authentication of the message to be sent such as continuation.
CN201110328318.9A 2011-10-25 2011-10-25 Transmission method of massages in distributed system Active CN102368700B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110328318.9A CN102368700B (en) 2011-10-25 2011-10-25 Transmission method of massages in distributed system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110328318.9A CN102368700B (en) 2011-10-25 2011-10-25 Transmission method of massages in distributed system

Publications (2)

Publication Number Publication Date
CN102368700A CN102368700A (en) 2012-03-07
CN102368700B true CN102368700B (en) 2014-10-22

Family

ID=45761250

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110328318.9A Active CN102368700B (en) 2011-10-25 2011-10-25 Transmission method of massages in distributed system

Country Status (1)

Country Link
CN (1) CN102368700B (en)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104348874B (en) * 2013-08-06 2019-04-05 中国电信股份有限公司 The method and apparatus that message is transmitted between cloud platform component
KR101476748B1 (en) * 2013-08-07 2014-12-26 삼성에스디에스 주식회사 Apparatus and method for transmitting and receiving messages
CN105450356B (en) * 2014-09-03 2019-10-11 中兴通讯股份有限公司 Lose the recovery processing method and processing device of data
CN105162838A (en) * 2015-07-30 2015-12-16 青岛海尔智能家电科技有限公司 Message pushing method, and method and device for receiving pushed message
CN106201735A (en) * 2016-06-27 2016-12-07 北京票之家科技有限公司 Method for message transmission and system
CN106027379A (en) * 2016-07-28 2016-10-12 贵州中科汉天下信息技术有限公司 Push message receiving processing method
CN110928944B (en) * 2018-08-30 2024-04-02 阿里巴巴集团控股有限公司 Data processing method and device
CN109299193A (en) * 2018-09-25 2019-02-01 深圳市佰仟金融服务有限公司 Method of data synchronization and relevant device
CN109684128B (en) * 2018-11-16 2020-12-08 深圳证券交易所 Cluster overall fault recovery method of message middleware, server and storage medium
CN109714392A (en) * 2018-11-26 2019-05-03 聚好看科技股份有限公司 Across the computer room method of data synchronization of one kind and device
CN109788026B (en) * 2018-12-13 2022-03-08 新华三大数据技术有限公司 Message processing method and device
CN110008037A (en) * 2019-02-28 2019-07-12 北京达佳互联信息技术有限公司 Message treatment method, device and storage medium
CN110109799A (en) * 2019-03-29 2019-08-09 北京奇安信科技有限公司 A kind of real time monitoring processing method and processing device of computing resource operation conditions
CN110727507B (en) * 2019-10-21 2022-09-09 广州欢聊网络科技有限公司 Message processing method and device, computer equipment and storage medium
CN112865927B (en) * 2019-11-27 2023-09-12 浙江大搜车软件技术有限公司 Message delivery verification method, device, computer equipment and storage medium
CN111708624B (en) * 2020-06-16 2023-09-29 北京百度网讯科技有限公司 Concurrency allocation method, device, equipment and storage medium based on multiple transmitters
CN112162875B (en) * 2020-10-12 2024-08-02 上交所技术有限责任公司 Method for transmitting highly reliable message in transaction system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1510964A (en) * 1998-08-27 2004-07-07 ض� Inputting/outputting chain circuit retry, fault in computer network, and restoring method and apparatus
CN1691571A (en) * 2004-04-21 2005-11-02 华为技术有限公司 Method for data synchronization in communication system and apparatus therefor
CN1753354A (en) * 2005-10-25 2006-03-29 华中科技大学 Base station TCP agency confirmation method based on ARQ information and its system
CN1889414A (en) * 2005-06-30 2007-01-03 华为技术有限公司 Method for transmitting status PDU based on missing PDU detection mechanism
CN101217346A (en) * 2007-01-05 2008-07-09 大唐移动通信设备有限公司 An AM mode state feedback method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1510964A (en) * 1998-08-27 2004-07-07 ض� Inputting/outputting chain circuit retry, fault in computer network, and restoring method and apparatus
CN1691571A (en) * 2004-04-21 2005-11-02 华为技术有限公司 Method for data synchronization in communication system and apparatus therefor
CN1889414A (en) * 2005-06-30 2007-01-03 华为技术有限公司 Method for transmitting status PDU based on missing PDU detection mechanism
CN1753354A (en) * 2005-10-25 2006-03-29 华中科技大学 Base station TCP agency confirmation method based on ARQ information and its system
CN101217346A (en) * 2007-01-05 2008-07-09 大唐移动通信设备有限公司 An AM mode state feedback method and system

Also Published As

Publication number Publication date
CN102368700A (en) 2012-03-07

Similar Documents

Publication Publication Date Title
CN102368700B (en) Transmission method of massages in distributed system
JP4858690B2 (en) Mobile communication system and data transmission method during handover
AU644800B2 (en) Data communication method and system
CN102025474B (en) Network data transmission method
EP1909468B1 (en) Method and apparatus for backing up TCP connection
CN101536417B (en) Method for eliminating redundant connections
KR100858472B1 (en) The method of data communication
CN102449944A (en) Method and apparatus for downlink data transmission control in multi-hop relay communication system
CN101848490A (en) In the mobile communication system according to the method for operation and the device of data duplicate retransmission
EP2613497A2 (en) Method of transporting data in a sub-segmented manner
CN101217350A (en) A detection and reporting method, system and receiving end of PDU
CN112738229B (en) Communication method for realizing automatic data continuous transmission
CN104113403A (en) Sliding window-based half-duplex communication method and system
WO2014194493A1 (en) Method, device and system for reducing confirmation packets at transmission control layer
CN112395237A (en) Method and system for communication between at least two controllers
JP2009212796A (en) Transmitter, data transfer system, data transfer method, and data transfer program
JP2006191368A (en) Network transmission device
WO2019128937A1 (en) Uplink data scheduling method and relevant device
CN105553613A (en) Partition time-triggered communication-based data integrity detection method
CN101399649A (en) Data transmission method, system and device
CN112187408B (en) Data processing method, system, device, storage medium and processor
CN111741013B (en) Data transmission method and device
WO2015096089A1 (en) Fault-tolerance method and device for phich channel transmission information
CN111464514A (en) TCP hot backup method and system
CN101094241A (en) Transmission method and device of hybrid automatic requesting retransmission

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20120307

Assignee: JIANGSU DAWN INFORMATION TECHNOLOGY Co.,Ltd.

Assignor: Dawning Information Industry (Beijing) Co.,Ltd.

Contract record no.: 2017320000013

Denomination of invention: Transmission method of massages in distributed system

Granted publication date: 20141022

License type: Exclusive License

Record date: 20170217

LICC Enforcement, change and cancellation of record of contracts on the licence for exploitation of a patent or utility model
TR01 Transfer of patent right

Effective date of registration: 20220725

Address after: 100193 No. 36 Building, No. 8 Hospital, Wangxi Road, Haidian District, Beijing

Patentee after: Dawning Information Industry (Beijing) Co.,Ltd.

Patentee after: DAWNING INFORMATION INDUSTRY Co.,Ltd.

Address before: 100084 Beijing Haidian District City Mill Street No. 64

Patentee before: Dawning Information Industry (Beijing) Co.,Ltd.

TR01 Transfer of patent right