CN110213074A - The anomalous structure mthods, systems and devices of distributed protocol - Google Patents

The anomalous structure mthods, systems and devices of distributed protocol Download PDF

Info

Publication number
CN110213074A
CN110213074A CN201910171946.7A CN201910171946A CN110213074A CN 110213074 A CN110213074 A CN 110213074A CN 201910171946 A CN201910171946 A CN 201910171946A CN 110213074 A CN110213074 A CN 110213074A
Authority
CN
China
Prior art keywords
message
exception
distributed
network message
network
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
Application number
CN201910171946.7A
Other languages
Chinese (zh)
Other versions
CN110213074B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910171946.7A priority Critical patent/CN110213074B/en
Publication of CN110213074A publication Critical patent/CN110213074A/en
Application granted granted Critical
Publication of CN110213074B publication Critical patent/CN110213074B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/145Network analysis or design involving simulating, designing, planning or modelling of a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer And Data Communications (AREA)

Abstract

This application involves a kind of anomalous structure mthods, systems and devices of distributed protocol, which comprises when monitoring feature message, determines the corresponding link of feature message;According to preset exception-triggered opportunity, the network message that persistent cache passes through link transmission;According to preset rehearsal scene, construction meets the exception on exception-triggered opportunity;After coming into force extremely, the caching to the network message by link transmission, and the network message of transmission buffer are released.Scheme provided by the present application, which realizes, reliably constructs any one possible abnormal scene to distributed protocol, avoids the very high problem of random configuration exception scene repeatability, substantially increases cacoplastic efficiency.

Description

The anomalous structure mthods, systems and devices of distributed protocol
Technical field
This application involves field of computer technology, more particularly to a kind of anomalous structure method of distributed protocol, system, Device, computer readable storage medium and computer equipment.
Background technique
Distributed cluster system is the system for including multiple distributed nodes, each distributed node in distributed cluster system Be it is relatively independent, communicated based on distributed protocol between each distributed node and dependent on network.Usual network Connectivity and quality of connection can not at a time determine, lead to any one distributed node in distributed cluster system The Distributed Application process of upper operation may at a time break down.Therefore, when designing distributed cluster system, it is Above situation is avoided, needs sufficiently to test a large amount of abnormal scenes that above situation may cause.
Currently, the method generallyd use is randomly when constructing the abnormal scene that distributed cluster system is likely encountered The structural anomaly in distributed cluster system, although any possible abnormal scene occurred can be simulated, due to randomness Too big, efficiency is extremely low.
Summary of the invention
Based on this, it is necessary to for existing to the cacoplastic extremely low technical problem of mode efficiency of distributed protocol, mention For anomalous structure method, system, device, computer readable storage medium and the computer equipment of a kind of distributed protocol.
A kind of anomalous structure method of distributed protocol, comprising:
When monitoring feature message, the corresponding link of the feature message is determined;
The network message for passing through the link transmission according to preset exception-triggered opportunity, persistent cache;
According to preset rehearsal scene, construction meets the exception on the exception-triggered opportunity;
After the exception comes into force, release to the caching of the network message by the link transmission, and transmission buffer The network message.
A kind of anomalous structure system of distributed protocol, including rehearsal terminal and distributed node;
The distributed node is used for when monitoring feature message, determines the corresponding link of the feature message;According to By the rehearsal terminal preset exception-triggered opportunity, the network message that persistent cache passes through the link transmission;According to logical The preset rehearsal scene of rehearsal terminal is crossed, construction meets the exception on the exception-triggered opportunity;After the exception comes into force, Release the caching to the network message by the link transmission, and the network message of transmission buffer;
The rehearsal terminal is used to obtain each distributed node and is directed to the response results that the network message generates;Root Determine on each distributed node based on the Distributed Application process of the distributed protocol according to the response results described It can be operated normally under rehearsal scene.
A kind of anomalous structure device of distributed protocol, described device include:
Network message monitoring module, for when monitoring feature message, determining the corresponding link of the feature message;
Network message cache module, for according to preset exception-triggered opportunity, persistent cache to pass through the link transmission Network message;
Anomalous structure module, for according to preset rehearsal scene, construction to meet the exception on the exception-triggered opportunity;
Caching releases module, for releasing to the network message by the link transmission after exception comes into force Caching, and the network message of transmission buffer.
A kind of computer readable storage medium is stored with computer program, when the computer program is executed by processor, So that the processor executes the step of anomalous structure method of above-mentioned distributed protocol.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the calculating When machine program is executed by the processor, so that the processor executes the step of the anomalous structure method of above-mentioned distributed protocol Suddenly.
Anomalous structure method, system, device, computer readable storage medium and the computer equipment of above-mentioned distributed protocol In, can effectively construct any one abnormal scene, realize accurately and reliably triggered under some exception-triggered opportunity it is different Often.When monitoring feature message, the corresponding link of feature message is determined, and according to preset exception-triggered opportunity, persistently delay The network message by the link transmission is deposited, then according to preset rehearsal scene, construction meets exception-triggered opportunity immediately Exception, persistent cache can guarantee that the exception of construction can be accurately preset different by the network message of the link transmission Normal trigger timing comes into force.After coming into force extremely, so that it may released immediately to the caching of network message and the network report of transmission buffer Text.Since feature message can be set as any one network message based on the distributed protocol on demand, can it is accurate, Any one possible abnormal scene reliably is constructed to the distributed protocol, it is very high to avoid random configuration exception scene repeatability The problem of, substantially increase cacoplastic efficiency.
Detailed description of the invention
Fig. 1 is the applied environment figure of the anomalous structure method of distributed protocol in one embodiment;
Fig. 2 is the flow diagram of the 3PC agreement provided in one embodiment;
Fig. 3 is the flow diagram of the anomalous structure method of distributed protocol in one embodiment;
Fig. 4 is the schematic diagram of the network message based on 3PC agreement in one embodiment;
Fig. 5 is the block schematic illustration of distributed node in one embodiment;
Fig. 6 is the exception for disposing distributed protocol provided herein in one embodiment on each distributed node The timing diagram of constructing apparatus;
Fig. 7 is the flow diagram of the anomalous structure method based on 3PC agreement in one embodiment;
Fig. 8 is the flow diagram of the anomalous structure method based on 3PC agreement in another embodiment;
Fig. 9 is to cancel to dispose the different of distributed protocol provided herein on each distributed node in one embodiment The timing diagram of normal constructing apparatus;
Figure 10 is the flow diagram of the anomalous structure method of distributed protocol in a specific embodiment;
Figure 11 is the configuration diagram of the anomalous structure system of distributed protocol in one embodiment;
Figure 12 is the configuration diagram of the anomalous structure system of distributed protocol in another embodiment;
Figure 13 is the structural block diagram of the anomalous structure device of distributed protocol in one embodiment;
Figure 14 is the structural block diagram of the anomalous structure device of distributed protocol in another embodiment;
Figure 15 is the structural block diagram of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, and It is not used in restriction the application.
Fig. 1 is the applied environment figure of the anomalous structure method of distributed protocol in one embodiment.Referring to Fig.1, the distribution The anomalous structure method of formula agreement is applied to the anomalous structure system of distributed protocol.The anomalous structure system of the distributed protocol Including rehearsal terminal 110 and distributed type assemblies 120, distributed type assemblies 120 include three distributed nodes, the respectively first distribution Formula node 120a, the second distributed node 120b and third distributed node 120c.Distributed type assemblies 120 can in reality scene To include a large amount of distributed node, only illustrated herein with three.It drills in terminal 110 and distributed type assemblies 120 Each distributed node passes through network connection.Each distributed node can structural anomaly in accordance with the following steps: when monitoring feature When message, the corresponding link of feature message is determined;According to preset exception-triggered opportunity, the net that persistent cache passes through link transmission Network message;According to preset rehearsal scene, construction meets the exception on exception-triggered opportunity;After coming into force extremely, release to passing through The caching of the network message of link transmission, and the network message of transmission buffer.Rehearsal terminal is that abnormal rehearsal executor is used Equipment, rehearsal terminal 110 can determine on each distributed node the response results of network message according to each distributed node Can the Distributed Application process based on distributed protocol operate normally in the case where drilling scene.
Rehearsal terminal 110 specifically can be terminal console or mobile terminal, and mobile terminal specifically can be with mobile phone, plate electricity At least one of brain, laptop etc..Each distributed node in distributed type assemblies 120 can use independent server The either server cluster of multiple servers composition is realized.
It should be noted that distributed protocol involved in the application refers to needing the multiple network of multiple distributed nodes The rule of communication that a business is relied on is completed in interaction collaboration, and distributed protocol can be developer according to business demand oneself The primary agreement realized, the distributed protocol realized in the distributed library that is also possible to increase income, open source distributed component, such as 2PC (Two Phase Commitment Protocol, two-phase commitment protocol), 3PC (Three Phase Commitment Protocol, three-phase commitment protocol), Raft agreement (a kind of distributed consensus agreement), a kind of (the message broadcast of ZAB agreement The atomic broadcasting agreement that process uses), Paxos agreement (a kind of consistency protocol based on message transmission) etc..Distribution is answered It is then the application program on the different distributions formula node of being distributed in based on distributed protocol with process, is run on each distributed node Distributed Application process by network come common finishing service.
As shown in Fig. 2, for the entire flow schematic diagram of the 3PC agreement provided in one embodiment.Referring to Fig. 2,3PC agreement The submission process of affairs is divided into CanCommit, PreCommit, DoCommit three phases to handle.Interactive process The middle distributed node needed as coordinator carries out network interaction with the distributed node as participant, completes affairs jointly Submission.In the CanCommit stage, the distributed node as coordinator is issued to all distributed nodes as participant CanCommit request comprising affairs content, asks whether that affairs can be submitted, and wait all distributions as participant The answer of node;Distributed node as participant is after receiving CanCommit request, if it is considered to affairs behaviour can be executed Make, then feed back YES and enter the PreCommit stage, otherwise feeds back NO.Distribution in the PreCommit stage, as coordinator Node issues PreCommit request, all distributed nodes as participant to all distributed nodes as participant Feeding back ACK response can then enter the DoCommit stage after receiving PreCommit request, if any one distribution as participant Formula node feeding back NO response, or as coordinator distributed node wait time-out be not received by it is all as participant's When distributed node is fed back, then the submission process of affairs can be interrupted.Distributed node in the DoCommit stage, as coordinator DoCommit request is issued to all distributed nodes as participant, all distributed nodes as participant are receiving Feeding back ACK response can then complete the submission of affairs after PreCommit request, if any one is anti-as the distributed node of participant NO response is presented, or the distributed node as coordinator waits time-out to be not received by all distribution sections as participant When point feedback, then the submission process of affairs can be interrupted.
As shown in figure 3, in one embodiment, providing a kind of anomalous structure method of distributed protocol.The present embodiment Mainly illustrated in this way applied to any one distributed node included by distributed type assemblies 120 in above-mentioned Fig. 1.
Referring to Fig. 3, the anomalous structure method of the distributed protocol specifically comprises the following steps:
S302 determines the corresponding link of feature message when monitoring feature message.
Distributed type assemblies can be restrained sometime there is abnormal scene are as follows: be occurred before some network interaction abnormal It is exactly before the transmission of some network message, at some before some network interaction with the appearance exception after some network interaction It is exactly after the transmission of some network message, therefore, when monitoring some feature message, after execution S302 after network interaction The step of, the abnormal scene that distributed type assemblies often occur can be constructed.
Wherein, feature message is the network message and exception institute needle to be constructed for the network message feature for meeting setting Pair network message.Link is the corresponding data transmission channel of feature message.In order to reliably for based on distributed association Some network message structural anomaly scene of view, distributed node just need interacting based on distributed protocol to transmission Network message is monitored, and when monitoring feature message, determines link corresponding to feature message.
In one embodiment, network message feature can be preset on distributed node by drilling terminal, be distributed Formula node can be monitored network message according to the network message feature of setting.Each distributed node is entire distributed Function in cluster may be different, different network message features can be arranged for the distributed node of different function, with structure Make the exception for heterogeneous networks interaction.Can also to multiple network message features are arranged on current distributed node, in this way, It, can be respectively to these network message structural anomalies when distributed node monitoring monitors corresponding network message respectively.
For example, for 3PC agreement, can for " CanCommit request message ", " CanCommit response message ", " PreCommit request message ", " PreCommit response message ", " DoCommit request message ", " DoCommit response report Corresponding network message feature is respectively set in text ", " Abort message " and corresponding " Ack message " etc..That is, different The network message of type has corresponded to different network message features, in this way, in monitoring network message, so that it may according to network report Literary feature judges type of message, so that it is determined that monitoring feature message.
In one embodiment, when monitoring feature message, the step of determining feature message corresponding link, is specifically wrapped It includes: the network message that monitoring is transmitted based on distributed protocol;The determining and preset network message characteristic matching from network message Feature message;According in feature message source address and destination address determine corresponding link.
Wherein, network message mentioned by method provided herein refers to interacting based on distributed protocol Network message, the message that the intercommunication of distributed node generates when without including executing method provided herein.Net Network message characteristic may thereby determine that the network for determining distributed protocol and type of message belonging to the network message of monitoring Whether message is characterized message.
Specifically, distributed node can be monitored to based on the network message that distributed protocol transmits, and according to pre- If network message feature feature message is determined from the network message of monitoring, according to the message format of feature message, extract report The content of text, obtains the source address and destination address in feature message, uses so as to be determined according to source address and destination address In the link of transmission this feature message.The link is another distribution section in current distributed node and distributed type assemblies The link that point interacts.
As shown in figure 4, for the schematic diagram of the network message based on 3PC agreement in one embodiment.Referring to Fig. 4, number 1 is arrived 12 network message is all based on the message that 3PC agreement interacts.As the distributed node of coordinator, as participant A Distributed node and distributed node as participant B these network messages can be monitored, thus at this Structural anomaly before and after the transmission of a little network messages also can reliably simulation 3PC agreement go out in each stage of network interaction Now abnormal scene.
In some embodiments, the network message feature of setting includes: IP address, port, message length, message length model It encloses.For non-encrypted network message, the network message feature of setting can also include message content;For the network report of encryption Text, the network message feature of setting can also include the temporal signatures such as frequency, sequencing that message is sent.
Wherein, IP address and port, which are used to determine, runs on distributed node and the node that network message is originated from Distributed Application process, or determine the distribution run on the network message distributed node and the node that will be sent to Application process, so that it is determined that distributed protocol corresponding to the network message.Specifically, distributed node can extract monitoring The IP address of network message and port match the IP address of extraction and port with preset IP address and port, can be with Judge whether the network message is the network message based on some distributed protocol.
Byte number shared by general different type message is different, has different message lengths, therefore message length, message Length range can be used for further judging the type of message of the network message.Distributed node can be further calculated and be monitored Network message message length, it is matched with preset message length, successful match then illustrates that the network message is Feature message.
Be not enough to distinguish the network message of type of message for message length, message length range, network message not by In the case where encryption, distributed node can also extract some or all of network message message content, will be in the message of extraction Appearance is matched with preset message content, and successful match then illustrates that the network message is characterized message.Added in network message In the case where close, frequency, the sequencing etc. that distributed node can be sent with statistics network message, by the frequency of statistics, successively Sequence is matched to preset corresponding message characteristic, and successful match then illustrates that the network message is feature message.
S304, according to preset exception-triggered opportunity, the network message that persistent cache passes through link transmission.
Since are sometime there is abnormal scene and can converge to occur before some network interaction in distributed type assemblies Exception and the appearance exception after some network interaction, therefore, in order to reliably be constructed according to preset exception-triggered opportunity Abnormal scene needs distributed node persistent cache it is necessary to prevent distributed node from normally interacting before Pending The Entry Into Force in exception The network message transmitted between distributed node corresponding with determining link.The network message of transmission is another including being sent to The network message that the network message of distributed node and another distributed node to be received are sent.It is, by generation to The network message elder generation persistent cache of transmission, wouldn't be sent to another distributed node;Network message to be received is first buffered in It is local, the Distributed Application process of local runtime wouldn't be transferred to.
Exception-triggered opportunity is cacoplastic opportunity when monitoring feature message, can be to by determining in step S302 The message transmitted between link is cached to guarantee to construct when monitoring feature message according to preset exception-triggered opportunity It is abnormal.Preset exception-triggered opportunity includes being triggered before transmitting message after triggering and transmitting message.The network message of caching is logical The network message of determining link transmission is crossed, that is, does not include that distributed node executes method phase provided herein The message of mutual communication transmission, can guarantee the smooth execution of method provided herein.
In one embodiment, exception-triggered opportunity can be preset on distributed node by drilling terminal, be distributed Formula node can be cached according to the exception-triggered opportunity of setting to by the network message of link transmission.Different distributions formula Preset exception-triggered opportunity can be configured according to rehearsal purpose of the reality when drilling extremely on node.For same class The feature message of type different distributed nodes can be set different exception-triggered opportunitys, also can be set identical different Normal trigger timing.For same distributed node, multiple and different abnormal touchings can be set for same type of feature message Hair opportunity triggers after being also possible to transmitting message it is, triggering before can be transmitting message.
For example, the network message feature of setting is feature corresponding with A message, setting for same distributed node Exception-triggered opportunity is to trigger before receiving feature message, then can start to cache message before receiving A message, will receive extremely It is triggered before A message;For another example, the network message feature of setting is feature corresponding with B message, the exception-triggered opportunity of setting For receive feature message after trigger, then can start after receiving B message caching message, will be extremely after receiving B message Triggering.Here A message and B message can be same type of network message, be also possible to different types of network message.
In one embodiment, according to preset exception-triggered opportunity, the network message that persistent cache passes through link transmission The step of specifically include: when preset exception-triggered opportunity be transmitting message before trigger when, then persistent cache includes feature message Inside, network message by link transmission;When being triggered after preset exception-triggered opportunity is transmitting message, then persistently delay Deposit network message not including feature message, by link transmission.
Specifically, when triggering before preset exception-triggered opportunity is transmitting message, then the spy arrived in transmission of monitoring is needed Levy structural anomaly before message, therefore, it is necessary to persistent cache including the feature message monitored, passed by above-mentioned link Defeated network message, that is, first by feature packet buffer, could construct to meet in step S306 and " be touched before transmitting message The exception of hair ".If this feature message is the network message pending seen off generated, it can be realized and sent out in this feature message Structural anomaly before seeing off can be realized the distribution in local runtime if this feature message is network message to be received Formula application process receives structural anomaly before this feature message.
When being triggered after preset exception-triggered opportunity is transmitting message, then the feature message that needs to arrive in transmission of monitoring it Structural anomaly afterwards, therefore, it is necessary to persistent cache not including the feature message monitored, net by above-mentioned link transmission Network message, that is, after transmission feature message just starts to cache message, could construct to meet in step S306 and " is passing Triggered after defeated message " exception.If this feature message is the network message pending seen off generated, can be realized in the spy Structural anomaly can be realized if this feature message is network message to be received in local after sign message is transmitted The Distributed Application process of operation receives structural anomaly after this feature message.
In the above-described embodiments, it can be avoided and constructing by the feature message of above-mentioned link transmission by persistent cache Abnormal Pending The Entry Into Force in the case where normal communication between distributed node, enable the exception of construction accurately in certain exception It comes into force under scene.
Biography when in some embodiments, in order to directly be based on distributed protocol progress network interaction between distributed node Defeated network message is distinguished with the message generated when method provided herein is in communication with each other is executed, and improves buffer network report Network interface card that Distributed Application process uses and provided herein can be arranged in the efficiency of text on each distributed node Network interface card used in the anomalous structure device of distributed protocol.Also, after distinguishing message, in monitoring feature message, it is only necessary to The network message for the network interface card transmission that Distributed Application process uses is monitored, can be improved and monitor spy from network message The efficiency for levying message, to improve the efficiency of structural anomaly scene.
As shown in figure 5, for the block schematic illustration of distributed node in one embodiment.Referring to Fig. 5, in distributed node Operation has the Distributed Application process 502 realized based on distributed protocol on 500, further includes based on method provided herein The anomalous structure device 504 of the distributed protocol of realization, further includes network protocol stack 510, and network protocol stack 510 includes realizing to divide The protocol stack code of the anomalous structure device 504 of the protocol stack code and realization distributed protocol of cloth application process 502.Point Cloth node 500 further includes the business network interface card 506 for being used for transmission the network message of Distributed Application process generation, further includes distribution The rehearsal network interface card 508 that the anomalous structure device 504 of formula agreement uses, rehearsal network interface card 508 are used for transmission each distributed node and are holding The message that row method provided herein generates when needing to be in communication with each other.For example, the first distributed node passes through rehearsal network interface card Notify the cacoplastic message of the second distributed node.In some embodiments, it is also possible to rehearsal network interface card 508 is not needed, it is only right Business network interface card 506 is cached by the network message of determining link transmission.
S306, according to preset rehearsal scene, construction meets the exception on exception-triggered opportunity.
Wherein, rehearsal scene is the abnormal scene of simulation.Drilling scene may include network partition exception scene, for surveying The network partition fault-tolerance of distributed protocol is tried, the exception that network partition exception scene can construct includes: network delay, network Shake, network interruption, message loss, message delay, message shake, message error, network interruption and network interface card damage etc..Grinder Scape can also include hard disk exception scene, be used for testing hard disk fault tolerance, the exception that can be constructed under hard disk exception scene It include: relatively slow hard disk corruptions, hard disk Out of Memory, hard disk reading speed, fixed disk file damage, fixed disk file size more than system Limitation and fixed disk file loss etc..Drilling scene can also include distributed node exception scene, be used for test distributed agreement The offline fault-tolerance of node, the exception that can be constructed under distributed node exception scene includes: point run on distributed node Cloth application process is killed, CPU on distributed node power down and distributed node (Central Processing Unit, Central processing unit) damage etc..In the present embodiment, rehearsal scene can be designed according to the purpose drilled extremely, reality scene The failure of middle appearance all can serve as rehearsal scene in the case where drilling conditions permit extremely.
Specifically, the exception that the available rehearsal scene being locally located of distributed node needs the exception constructed corresponding Script file loads the exception that exception script file construction meets above-mentioned exception-triggered opportunity.In fact, in step S304 In, after the network message by above-mentioned link transmission is cached according to preset exception-triggered opportunity, institute's structure in step S306 The exception made can closely conform to above-mentioned exception-triggered opportunity.
In one embodiment, it can be being preset on distributed node by drilling terminal when monitoring feature message The rehearsal scene of required construction, distributed node can be according to the rehearsal scenes of the required construction of setting, and construction meets different The exception of normal trigger timing.In some embodiments, the rehearsal scene of setting may include multiple, it is, distributed node is supervised The exception of required construction may include multiple when measuring feature message, can be improved the efficiency drilled abnormal scene.
In one embodiment, the anomalous structure method of above-mentioned distributed protocol is further comprising the steps of: eventually by rehearsal End is being arranged network message feature, setting exception-triggered opportunity and is being arranged when monitoring feature message on each distributed node The rehearsal scene of required construction.
As shown in fig. 6, being mentioned by disposing the application on each distributed node by rehearsal terminal in one embodiment The timing diagram of the anomalous structure device of the distributed protocol of confession.Abnormal rehearsal is needed before construction drills scene referring to Fig. 6 Executor disposes the anomalous structure device of distributed protocol by drilling terminal on each distributed node.It needs to illustrate It is that the sequencing for disposing the anomalous structure device of distributed protocol on each distributed node is not restricted, only needs Rehearsal terminal can pass through another network link normal communication with each distributed node after the completion of disposing.
In step S306, the rehearsal scene on distributed node is arranged on demand, and cacoplastic mode is also can With what is be arranged on demand, distributed node can notify other distributed node constructions to meet the exception on exception-triggered opportunity, may be used also To meet the exception on exception-triggered opportunity in locally construction.
In one embodiment, according to preset rehearsal scene, construction meets the abnormal step tool on exception-triggered opportunity Body includes: to obtain pre-set rehearsal scene corresponding with feature message;Determine the exception of the required construction in the case where drilling scene; The corresponding construction instruction of determining exception is sent to the distributed node that need to be interacted;Construction instruction is used to indicate distributed node and exists Exception that is local construction determination and meeting exception-triggered opportunity.
Specifically, distributed node can determine link corresponding with this feature message, so after monitoring feature message Afterwards according to preset exception-triggered opportunity, persistent cache obtains pre-set grinder by the network message of link transmission Scape, under the rehearsal scene there are many exceptions of required construction, distributed node, which can be determined therefrom, is monitoring feature message When required construction exception, then need interactive distributed node to send for determining abnormal structure into distributed type assemblies Instruction is made, so that this distributed node that need to be interacted meets the different of exception-triggered opportunity in locally construction according to construction instruction Often.
For example, the first distributed node monitors the net after the network message A for receiving the transmission of the second distributed node When network message is characterized message, the first distributed node is with regard to the network message that transmits between persistent cache and the second distributed node B (i.e. by the message of the link transmission determined according to feature message), and pass through another network link to the second distributed node The corresponding construction instruction of the exception constructed required for sending, the second distributed node can be after receiving construction instruction, at this Ground structural anomaly.It is in the second distributed section in the present embodiment, it is possible to guarantee the exception constructed on the second distributed node It is constructed after o'clock sending network message A to the first distributed node.
As shown in fig. 7, for the schematic diagram of the anomalous structure method based on 3PC agreement in one embodiment.It, should referring to Fig. 7 Distributed type assemblies include coordinator's node 702, first participant's node 704 and second participant's node 706.Dotted line institute in Fig. 7 The step of mark, is performed when being the Distributed Application process progress network interaction on each distributed node based on 3PC agreement The step of step, solid line is identified is the step of method provided herein executes.
Referring to Fig. 7, network message feature is arranged by drilling terminal in rehearsal executor abnormal first on coordinator's node, The network message feature of setting is used to detect the CanCommit response message of second participant's node transmission, and abnormal rehearsal is held It is " triggering after receiving message " that passerby, which also passes through rehearsal exception-triggered opportunity for being arranged on coordinator's node of terminal, to be constructed Exception is " killing Distributed Application process ".From figure 7 it can be seen that receiving second participant's node feeding back in coordinator's node CanCommit response message after, monitor the received message and network message feature successful match, i.e., the message is spy Message is levied, since exception-triggered opportunity is " triggering after receiving message ", which will be transferred to local by coordinator's node Start the persistent cache not network message including this feature message after Distributed Application process, that is, caching generate to It is sent to the PreCommit message of second participant's node.Then coordinator's node notifies the second ginseng by another network link With the exception of person's joint structure " killing Distributed Application process ", second participant's node after receiving the notice, kill by execution The instruction of dead local Distributed Application process, and the notice to run succeeded to coordinator's node feeding back.In this way, being achieved that logical Crossing coordinator's node, reliably construction meets the exception on exception-triggered opportunity on second participant's node.
In one embodiment, according to preset rehearsal scene, construction meets the abnormal step tool on exception-triggered opportunity Body includes: to obtain pre-set rehearsal scene corresponding with feature message;Determine the exception of the required construction in the case where drilling scene; In exception that is locally construction determination and meeting exception-triggered opportunity.
Specifically, distributed node can determine link corresponding with feature message when monitoring feature message, according to Preset exception-triggered opportunity starts the network message that persistent cache passes through the link transmission, then obtains pre-set rehearsal Scene, under the rehearsal scene there are many exceptions of required construction, distributed node, which can be determined therefrom, is monitoring feature report Then the exception of required construction when literary meets the exception on exception-triggered opportunity in locally construction.
As shown in figure 8, for the schematic diagram of the anomalous structure method based on 3PC agreement in another embodiment.Reference Fig. 8, Network message feature, the network report of setting is arranged by drilling terminal in rehearsal executor abnormal first on second participant's node Literary feature is used to detect the CanCommit response message of second participant's node transmission, and abnormal rehearsal executor, which also passes through, to drill Practicing the exception-triggered opportunity that terminal is arranged on second participant's node is " triggering after sending message ", and the exception to be constructed is " killing Distributed Application process ".From figure 8, it is seen that generating in second participant's node for CanCommit message After CanCommit response message, monitors the CanCommit response message and network message feature successful match, i.e., should CanCommit response message is characterized message, and since exception-triggered opportunity is " triggering after sending message ", coordinator's node will The message is sent to after coordinator's node and starts the persistent cache not network message including this feature message, that is, is slow Deposit the PreCommit message of coordinator's node transmission.Then second participant's node is held according to the rehearsal scene of setting locally Row kills the instruction of Distributed Application process, that is, the structural anomaly after sending CanCommit response message, in this way, just real The exception for reliably constructing on second participant's node and meeting exception-triggered opportunity is showed.
S308 releases the caching to the network message by link transmission, and the network of transmission buffer after coming into force extremely Message.
When the exception of construction is in the exception that distributed node locally constructs, distributed node can directly determine that exception is No to come into force, abnormal when notifying the exception of another distributed node construction that need to be interacted when construction, then distributed node can be with Obtain the notice that the exception of distributed node feedback comes into force.Specifically, after the exception of construction comes into force, distributed node is no longer Caching by the network message of determining link transmission, and by the network message cached by the link transmission of above-mentioned determination extremely Corresponding another distributed node.
In the present embodiment, the network message buffered to the caching of network message and transmission is released, can be simulated After the exception of construction enters into force, can the Distributed Application process that run on distributed node continue it is anticipated that normal hand over Mutually.
For example, in Fig. 7, coordinator's node after receiving second participant's node feeding back anomalous structure and successfully notifying, The PreCommit message for being sent to second participant's node of caching is sent to second participant's node.Due to the second ginseng Be killed with the Distributed Application process run on person's node, if there is not exception in first participant's node, according to point Expected results of the cloth agreement under this abnormal scene, second participant's node cannot be corresponding to coordinator's node feeding back PreCommit response message (i.e. ACK message), first participant's node is in the PreCommit for receiving the transmission of coordinator's node The step of " write redo, undo log, lock resource, execute operation but do not submit " is needed to be implemented when message, and saved to coordinator Point feeding back ACK message.If actual result not it is anticipated that, such as second participant's node still fed back it is corresponding PreCommit response message, or fed back the message of other mistakes or first participant's node is not carried out and " writes Redo, undo log, lock resource execute operation but do not submit " the step of, also not to coordinator's node feeding back ACK message, Then the distributed type assemblies in explanatory diagram 7 dependent on distributed protocol cannot normally handle this exception of construction, need to improve base In the application program that the distributed protocol is realized.
For another example, in fig. 8, caching is obtained after the exception that confirmation locally constructs comes into force in second participant's node The PreCommit message that coordinator's node is sent, due to the Distributed Application process that is run on second participant's node by It kills, if exception does not occur in first participant's node, according to expected results of the distributed protocol under this abnormal scene, respectively Distributed node should be operated normally according to distributed protocol, for example, second participant's node cannot be to coordinator's node feeding back Corresponding PreCommit response message (i.e. ACK message), first participant's node are receiving the transmission of coordinator's node The step of " write redo, undo log, lock resource, execute operation but do not submit " is needed to be implemented when PreCommit message, and to Coordinator's node feeding back ACK message.If actual result not it is anticipated that, in explanatory diagram 8 dependent on distributed protocol point Cloth cluster cannot normally handle this exception of construction, need to improve the application program realized based on the distributed protocol.
The anomalous structure method of above-mentioned distributed protocol can effectively construct any one abnormal scene, realize Accurately and reliably triggering is abnormal under some exception-triggered opportunity.When monitoring feature message, the corresponding chain of feature message is determined Road, and according to preset exception-triggered opportunity, persistent cache passes through the network message of the link transmission, then drills according to preset Practice scene, construction meets the exception on exception-triggered opportunity immediately, and persistent cache can be with by the network message of the link transmission Guarantee that the exception of construction can accurately come into force on preset exception-triggered opportunity.After coming into force extremely, so that it may release immediately To the caching of network message and the network message of transmission buffer.This point is based on since feature message can be set as any one on demand Therefore the network message of cloth agreement accurately and reliably can construct any one possible anomalous field to the distributed protocol Scape avoids the very high problem of random configuration exception scene repeatability, substantially increases cacoplastic efficiency.
In one embodiment, after coming into force extremely, the caching to the network message by link transmission is released, and transmit The network message of caching includes: to release the caching to the network message by link transmission after coming into force extremely;It obtains local slow The network message to be received deposited;Alternatively, sending the network message to be sent of local cache to the distributed node that need to be interacted; Method further include: obtain the response results that each distributed node is directed to network message generation by drilling terminal;Response results are used The energy in the case where drilling scene of the Distributed Application process on each distributed node based on distributed protocol is determined in instruction rehearsal terminal No normal operation.
Specifically, after the exception of construction comes into force, distributed node can be released to the link by determining in step 302 The network message of transmission, including network message to be received and network message to be sent.When the network message of caching is waiting When the network message of receipts, then the network message to be received of local cache is obtained by the Distributed Application process of local runtime, When the network message of caching is network message to be sent, then by the Distributed Application process of local runtime by the net of caching Network message is sent to other distributed nodes that need to be interacted, and the response knot for the network message can be generated in each distributed node Fruit, rehearsal terminal can determine the distribution realized on each distributed node based on distributed protocol according to the response results of acquisition Application process can be it is anticipated that reliably working under the rehearsal scene of construction.If cannot, illustrate Distributed Application process mesh Before cannot normally handle the exception of construction, if can, illustrate that Distributed Application process can be operated normally when occurring extremely.
In one embodiment, the anomalous structure method of above-mentioned distributed protocol further include: obtain for abnormal revocation Instruction;According to the exception of cancel an order revocation building;By rehearsal terminal determine the Distributed Application based on distributed protocol into Can journey operate normally after the exception of revocation building.
Before including anomalous structure due to the rehearsal process of complete abnormal scene, it is abnormal come into force and abnormal revocation after, it is abnormal Each distributed node may also will not be it is anticipated that operate normally, in order to determine to each distribution after abnormal revocation after revocation The Distributed Application process run on section can it is anticipated that operate normally, need to cancel constructed on each distributed node it is different Often.
Specifically, the available abnormal cancel an order for construction of distributed node, which can be logical Know what cacoplastic another distributed node obtained, is also possible to from rehearsal terminal acquisition.Distributed node is according to revocation The exception that instruction revocation locally constructs.For example, when the exception of construction is " kill Distributed Application process ", then distributed node It needs to execute the operation for restarting Distributed Application process according to the cancel an order of acquisition.After the exception of revocation construction, Ke Yitong It crosses rehearsal terminal and obtains the operating condition of Distributed Application process on each distributed node after revocation extremely, therefore, it is determined that Can Distributed Application process it is anticipated that operate normally after the exception of revocation building.
As shown in figure 9, disposing the application institute on each distributed node to cancel in one embodiment by rehearsal terminal The timing diagram of the anomalous structure device of the distributed protocol of offer.It is needed different after the rehearsal of abnormal scene terminates referring to Fig. 9 Often rehearsal executor passes through the logical of the anomalous structure device for drilling terminal to each distributed node execution revocation distributed protocol Know, each distributed node is made to be restored to normal condition.It should be noted that cancelling the distributed association on each distributed node The sequencing of the anomalous structure device of view is not restricted, it is only necessary to which each distributed node can be by network just after revocation Normal open letter.
As shown in Figure 10, in a specific embodiment, the anomalous structure method of distributed protocol specifically includes following Step:
Network message feature, exception-triggered opportunity are arranged on each distributed node and monitors feature message by S1002 When need the rehearsal scene that constructs.
S1004 monitors the network message transmitted based on distributed protocol;The determining and preset network report from network message The feature message of literary characteristic matching;According in feature message source address and destination address determine corresponding link.
S1006, when triggering before preset exception-triggered opportunity is transmitting message, then persistent cache includes that feature message exists Network message interior, by link transmission.
S1008, when triggering after preset exception-triggered opportunity is transmitting message, then persistent cache does not include feature message Inside, network message by link transmission.
S1010 obtains pre-set rehearsal scene corresponding with feature message;Determine the required construction in the case where drilling scene Exception;The corresponding construction instruction of determining exception is sent to the distributed node that need to be interacted;Alternatively, determining in locally construction And meet the exception on exception-triggered opportunity.
S1012 releases the caching to the network message by link transmission after coming into force extremely.
S1014 obtains the network message to be received of local cache;Alternatively, sending this to the distributed node that need to be interacted The network message to be sent of ground caching.
S1016 obtains the response results that each distributed node is directed to network message generation by drilling terminal;According to response Can the Distributed Application process on each distributed node of result judgement based on distributed protocol operate normally in the case where drilling scene.
S1018 is obtained for abnormal cancel an order;According to the exception of cancel an order revocation building.
S1020 determines the Distributed Application process based on distributed protocol in the exception of revocation building by rehearsal terminal After can operate normally.
Figure 10 is the flow diagram of the anomalous structure method of distributed protocol in one embodiment.It should be understood that Although each step in the flow chart of Figure 10 is successively shown according to the instruction of arrow, these steps be not it is inevitable according to The sequence of arrow instruction successively executes.Unless expressly stating otherwise herein, there is no stringent sequences for the execution of these steps Limitation, these steps can execute in other order.Moreover, at least part step in Figure 10 may include multiple sub-steps Rapid perhaps multiple these sub-steps of stage or stage are not necessarily to execute completion in synchronization, but can be in difference At the time of execute, the execution in these sub-steps or stage sequence, which is also not necessarily, successively to be carried out, but can be with other steps Either the sub-step of other steps or at least part in stage execute in turn or alternately.
In one embodiment, as shown in figure 11, a kind of anomalous structure system 1100 of distributed protocol is provided, including Drill terminal 1102 and distributed node 1104, in which:
Distributed node 1104 is used for when monitoring feature message, determines the corresponding link of feature message;According to passing through Drill the preset exception-triggered opportunity of terminal 1102, the network message that persistent cache passes through link transmission;According to whole by rehearsal 1102 preset rehearsal scenes are held, construction meets the exception on exception-triggered opportunity;After coming into force extremely, releases and passed to by link The caching of defeated network message, and the network message of transmission buffer;
Rehearsal terminal 1102 is used to obtain each distributed node 1104 and is directed to the response results that network message generates;According to sound Answer on each distributed node 1104 of result judgement that can the Distributed Application process based on distributed protocol just in the case where drilling scene Often operation.
In one embodiment, distributed node 1104 is also used to monitor the network message based on distributed protocol transmission; The determining feature message with preset network message characteristic matching from network message;According to the source address and mesh in feature message Address determine corresponding link.
In one embodiment, distributed node 1104 is also used to when through rehearsal 1102 preset exception-triggered of terminal Machine is before transmitting message when triggering, then persistent cache including feature message, network message by link transmission;When logical When spending the preset exception-triggered opportunity of rehearsal terminal 1102 to trigger after transmitting message, then persistent cache does not include that feature message exists Network message interior, by link transmission.
In one embodiment, distributed node 1104 is also used to obtain pre-set rehearsal corresponding with feature message Scene;Determine the exception of the required construction in the case where drilling scene;It is corresponding that determining exception is sent to the distributed node that need to be interacted Construction instruction;Construction instruction be used to indicate the distributed node that need to interact locally construction it is determining and meet exception-triggered opportunity Exception.
In one embodiment, distributed node 1104 is also used to obtain pre-set rehearsal corresponding with feature message Scene;Determine the exception of the required construction in the case where drilling scene;In exception that is locally construction determination and meeting exception-triggered opportunity.
In one embodiment, distributed node 1104 is also used to after coming into force extremely, is released to by link transmission The caching of network message;Obtain the network message to be received of local cache;Alternatively, sending this to the distributed node that need to be interacted The network message to be sent of ground caching;It is raw for network message that rehearsal terminal 1102 is also used to obtain each distributed node 1104 At response results;The Distributed Application process based on distributed protocol is being drilled on each distributed node of result judgement according to response Can practice operate normally under scene.
In one embodiment, distributed node 1104 is also used to obtain the removing for exception that rehearsal terminal 1102 is sent Pin instruction;According to the exception of cancel an order revocation building;Rehearsal terminal 1102 is also used to determine base on each distributed node 1104 It can be operated normally after the exception of revocation building in the Distributed Application process of distributed protocol.
It as shown in figure 12, is the anomalous structure system of the distributed protocol in one embodiment including three distributed nodes Schematic diagram.Referring to Fig.1 2, distributed node is respectively host 1201, host 1202 and host 1203, abnormal to drill Executor 1204 can be by drilling terminal 1205, the network report that the Distributed Application process run on each distributed node generates Text can be transmitted by business network interface card by message relay device 1206, and each distributed node is provided herein in execution The message generated when method needs to be in communication with each other can be transmitted by drilling network interface card, that is, the deployment on each distributed node Distributed protocol anomalous structure device can by drill network interface card be communicated.
The anomalous structure system 1100 of above-mentioned distributed protocol can effectively construct any one abnormal scene, realize Accurately and reliably triggering is abnormal under some exception-triggered opportunity.When monitoring feature message, determine that feature message is corresponding Link, and according to preset exception-triggered opportunity, persistent cache passes through the network message of the link transmission, then according to default Rehearsal scene, construction meets the exception on exception-triggered opportunity immediately, and persistent cache passes through the network message of the link transmission It can guarantee that the exception of construction can accurately come into force on preset exception-triggered opportunity.After coming into force extremely, so that it may immediately It releases to the caching of network message and the network message of transmission buffer.It is based on since feature message can be set as on demand any one Therefore the network message of the distributed protocol accurately and reliably can construct any one possible exception to the distributed protocol Scene avoids the very high problem of random configuration exception scene repeatability, substantially increases cacoplastic efficiency.
In one embodiment, as shown in figure 13, a kind of anomalous structure device 1300 of distributed protocol, the dress are provided It sets and releases mould including network message monitoring module 1302, network message cache module 1304, anomalous structure module 1306 and caching Block 1308, in which:
Network message monitoring module 1302, for when monitoring feature message, determining the corresponding link of feature message;
Network message cache module 1304, for according to preset exception-triggered opportunity, persistent cache to pass through link transmission Network message;
Anomalous structure module 1306, for according to preset rehearsal scene, construction to meet the exception on exception-triggered opportunity;
Caching releases module 1308, for releasing the caching to the network message by link transmission after coming into force extremely, And the network message of transmission buffer.
In one embodiment, network message monitoring module 1302 is also used to monitor the network based on distributed protocol transmission Message;The determining feature message with preset network message characteristic matching from network message;According to the source in feature message Location and destination address determine corresponding link.
In one embodiment, network message cache module 1304 is also used to when preset exception-triggered opportunity be transmission report Before literary when triggering, then persistent cache including feature message, network message by link transmission;When preset abnormal touching Hair opportunity is after transmitting message when triggering, then persistent cache not including feature message, network report by link transmission Text.
In one embodiment, anomalous structure module 1306 is also used to obtain pre-set corresponding with feature message drill Practice scene;Determine the exception of the required construction in the case where drilling scene;It is corresponding that determining exception is sent to the distributed node that need to be interacted Construction instruction;Construction instruction be used to indicate distributed node locally construction it is determining and meet exception-triggered opportunity it is different Often.
In one embodiment, anomalous structure module 1306 is also used to obtain pre-set corresponding with feature message drill Practice scene;Determine the exception of the required construction in the case where drilling scene;Locally construction it is determining and meet exception-triggered opportunity it is different Often.
In one embodiment, caching releases module 1308 and is also used to after coming into force extremely, releases to passing through link transmission Network message caching;Obtain the network message to be received of local cache;Alternatively, being sent to the distributed node that need to be interacted The network message to be sent of local cache;The 1300 response results analysis module of anomalous structure device of distributed protocol, is used for The response results that each distributed node is directed to network message generation are obtained by drilling terminal;Result judgement is respectively distributed according to response Can the Distributed Application process on formula node based on distributed protocol operate normally in the case where drilling scene.
In one embodiment, the anomalous structure device 1300 of distributed protocol further includes abnormal revocation module, for obtaining It takes for abnormal cancel an order;According to the exception of cancel an order revocation building;Determined by rehearsal terminal based on distributed association Can the Distributed Application process of view operate normally after the exception of revocation building.
As shown in figure 14, the module composition signal of the anomalous structure device of the distributed protocol provided in implementing for one Figure.Referring to Fig.1 4, including communication module 1402, network message monitoring module 1302, network message cache module 1304, abnormal structure Modeling block 1306 and caching release module 1308, in which:
Communication module 1402 is used for and the Distributed Application process based on distributed protocol realization on other distributed nodes It is communicated, is also used to be communicated with rehearsal terminal, rehearsal terminal can supervise network message by communication module 1402 in this way It surveys module 1302 and network message feature is set, the exception to be constructed is arranged to anomalous structure module 1306.
Network message monitoring module 1302 for monitoring network message and being matched with network message feature, if matching at Then determination monitors feature message to function, then the caching of network message cache module 1304 is notified to pass through the chain determining according to feature text The network message of road transmission;It is also used to notify anomalous structure module 1306 according to preset rehearsal scene, construction meets abnormal touching The exception on hair opportunity.
The anomalous structure device 1300 of above-mentioned distributed protocol can effectively construct any one abnormal scene, realize Accurately and reliably triggering is abnormal under some exception-triggered opportunity.When monitoring feature message, determine that feature message is corresponding Link, and according to preset exception-triggered opportunity, persistent cache passes through the network message of the link transmission, then according to default Rehearsal scene, construction meets the exception on exception-triggered opportunity immediately, and persistent cache passes through the network message of the link transmission It can guarantee that the exception of construction can accurately come into force on preset exception-triggered opportunity.After coming into force extremely, so that it may immediately It releases to the caching of network message and the network message of transmission buffer.It is based on since feature message can be set as on demand any one Therefore the network message of the distributed protocol accurately and reliably can construct any one possible exception to the distributed protocol Scene avoids the very high problem of random configuration exception scene repeatability, substantially increases cacoplastic efficiency.
Figure 15 shows the internal structure chart of computer equipment in one embodiment.The computer equipment specifically can be figure Any distributed node included by distributed type assemblies 120 in 1, for example can be the first distributed node 120a, the second distribution Formula node 120b either third distributed node 120c.As shown in figure 15, which includes the computer equipment packet Include processor, the memory, network interface connected by system bus.Wherein, memory include non-volatile memory medium and Built-in storage.The non-volatile memory medium of the computer equipment is stored with operating system, can also be stored with computer program, should When computer program is executed by processor, processor may make to realize the anomalous structure method of distributed protocol.The built-in storage In can also store computer program, when which is executed by processor, may make processor execute distributed protocol Anomalous structure method.
It will be understood by those skilled in the art that structure shown in Figure 15, only part relevant to application scheme The block diagram of structure, does not constitute the restriction for the computer equipment being applied thereon to application scheme, and specific computer is set Standby may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, the anomalous structure device of distributed protocol provided by the present application can be implemented as a kind of calculating The form of machine program, computer program can be run in computer equipment as shown in figure 15.In the memory of computer equipment The each program module for forming the anomalous structure device of the distributed protocol can be stored, for example, network message shown in Figure 13 is supervised It surveys module 1302, network message cache module 1304, anomalous structure module 1306 and caching and releases module 1308.Each program mould The computer program that block is constituted makes processor execute the distributed protocol of each embodiment of the application described in this specification Anomalous structure method in step.
For example, computer equipment shown in figure 15 can pass through the anomalous structure device of distributed protocol as shown in fig. 13 that In network message monitoring module 1302 execute step S302.Computer equipment can be executed by network message cache module 1304 Step S304.Computer equipment can execute step S306 by anomalous structure module 1306.Computer equipment can be solved by caching Except module 1308 executes step S308.
In one embodiment, a kind of computer equipment, including memory and processor are provided, memory is stored with meter Calculation machine program, when computer program is executed by processor, so that processor executes the anomalous structure method of above-mentioned distributed protocol The step of.The step of anomalous structure method of distributed protocol can be the different of the distributed protocol of above-mentioned each embodiment herein Step in normal building method.
In one embodiment, a kind of computer readable storage medium is provided, computer program, computer journey are stored with When sequence is executed by processor, so that the step of processor executes the anomalous structure method of above-mentioned distributed protocol.It is distributed herein The step of anomalous structure method of agreement, can be the step in the anomalous structure method of the distributed protocol of above-mentioned each embodiment Suddenly.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in a non-volatile computer and can be read In storage medium, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, provided herein Each embodiment used in any reference to memory, storage, database or other media, may each comprise non-volatile And/or volatile memory.Nonvolatile memory may include that read-only memory (ROM), programming ROM (PROM), electricity can be compiled Journey ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) directly RAM (RDRAM), straight Connect memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously The limitation to the application the scope of the patents therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art For, without departing from the concept of this application, various modifications and improvements can be made, these belong to the guarantor of the application Protect range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (15)

1. a kind of anomalous structure method of distributed protocol, comprising:
When monitoring feature message, the corresponding link of the feature message is determined;
The network message for passing through the link transmission according to preset exception-triggered opportunity, persistent cache;
According to preset rehearsal scene, construction meets the exception on the exception-triggered opportunity;
After the exception comes into force, the caching to the network message by the link transmission is released, and transmission buffer is described Network message.
2. determining the feature the method according to claim 1, wherein described when monitoring feature message The corresponding link of message includes:
Monitor the network message transmitted based on the distributed protocol;
The determining feature message with preset network message characteristic matching from network message;
According in the feature message source address and destination address determine corresponding link.
3. the method according to claim 1, wherein described according to preset exception-triggered opportunity, persistent cache Network message by the link transmission includes:
When being triggered before preset exception-triggered opportunity is transmitting message, then
Persistent cache including the feature message, network message by the link transmission;
When being triggered after preset exception-triggered opportunity is transmitting message, then
Persistent cache not including the feature message, network message by the link transmission.
4. construction meets described the method according to claim 1, wherein described according to preset rehearsal scene The exception on exception-triggered opportunity includes:
Obtain pre-set rehearsal scene corresponding with the feature message;
Determine the exception of the required construction under the rehearsal scene;
The corresponding construction instruction of the determining exception is sent to the distributed node that need to be interacted;
The construction instruction be used to indicate the distributed node locally construction it is determining and meet the exception-triggered opportunity The exception.
5. construction meets described the method according to claim 1, wherein described according to preset rehearsal scene The exception on exception-triggered opportunity includes:
Obtain pre-set rehearsal scene corresponding with the feature message;
Determine the exception of the required construction under the rehearsal scene;
In the exception that is locally construction determination and meeting the exception-triggered opportunity.
6. releasing is to by described the method according to claim 1, wherein described after the exception comes into force The caching of the network message of link transmission, and the network message of transmission buffer includes:
After the exception comes into force, the caching to the network message by the link transmission is released;
Obtain the network message to be received of local cache;Alternatively, sending local cache to the distributed node that need to be interacted The network message to be sent;
The method also includes:
The response results that each distributed node is directed to network message generation are obtained by drilling terminal;It is tied according to the response Fruit determines on each distributed node based on the Distributed Application process of the distributed protocol energy under the rehearsal scene No normal operation.
7. method according to any one of claims 1 to 6, which is characterized in that the method also includes:
It obtains and is directed to the abnormal cancel an order;
According to the exception of cancel an order revocation building;
Determine the Distributed Application process based on the distributed protocol after the exception of revocation building by rehearsal terminal It can operate normally.
8. a kind of anomalous structure system of distributed protocol, including rehearsal terminal and distributed node;
The distributed node is used for when monitoring feature message, determines the corresponding link of the feature message;According to passing through The rehearsal terminal preset exception-triggered opportunity, the network message that persistent cache passes through the link transmission;According to passing through The rehearsal preset rehearsal scene of terminal is stated, construction meets the exception on the exception-triggered opportunity;After the exception comes into force, release To the caching of the network message by the link transmission, and the network message of transmission buffer;
The rehearsal terminal is used to obtain each distributed node and is directed to the response results that the network message generates;According to institute Response results are stated to determine on each distributed node based on the Distributed Application process of the distributed protocol in the rehearsal It can be operated normally under scene.
9. system according to claim 8, which is characterized in that the distributed node is also used to monitor based on the distribution The network message of formula agreement transmission;The determining feature message with preset network message characteristic matching from network message;According to Source address and destination address in the feature message determine corresponding link.
10. system according to claim 8, which is characterized in that the distributed node is also used to when by the rehearsal Terminal preset exception-triggered opportunity is triggers before transmitting message when, then persistent cache is including the feature message, logical Cross the network message of the link transmission;When by the rehearsal terminal preset exception-triggered opportunity be transmitting message after trigger When, then persistent cache not including the feature message, network message by the link transmission.
11. system according to claim 8, which is characterized in that the distributed node is also used to come into force when the exception Afterwards, the caching to the network message by the link transmission is released;Obtain the network to be received of local cache Message;Alternatively, sending the network message to be sent of local cache to the distributed node that need to be interacted;
The rehearsal terminal is also used to obtain each distributed node and is directed to the response results that the network message generates;According to The response results determine that the Distributed Application process on each distributed node based on the distributed protocol is drilled described Can practice operate normally under scene.
12. system according to any one of claims 8 to 11, which is characterized in that the distributed node is also used to obtain What the rehearsal terminal was sent is directed to the abnormal cancel an order;According to the exception of cancel an order revocation building;
The rehearsal terminal be also used to determine on each distributed node the Distributed Application based on the distributed protocol into Can journey operate normally after the exception of revocation building.
13. a kind of anomalous structure device of distributed protocol, which is characterized in that described device includes:
Network message monitoring module, for when monitoring feature message, determining the corresponding link of the feature message;
Network message cache module, the net for passing through the link transmission according to preset exception-triggered opportunity, persistent cache Network message;
Anomalous structure module, for according to preset rehearsal scene, construction to meet the exception on the exception-triggered opportunity;
Caching releases module, for releasing the caching to the network message by the link transmission after exception comes into force, And the network message of transmission buffer.
14. a kind of computer readable storage medium is stored with computer program, when the computer program is executed by processor, So that the processor is executed such as the step of any one of claims 1 to 7 the method.
15. a kind of computer equipment, including memory and processor, the memory is stored with computer program, the calculating When machine program is executed by the processor, so that the processor executes the step such as any one of claims 1 to 7 the method Suddenly.
CN201910171946.7A 2019-03-07 2019-03-07 Distributed protocol exception construction method, system and device Active CN110213074B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910171946.7A CN110213074B (en) 2019-03-07 2019-03-07 Distributed protocol exception construction method, system and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910171946.7A CN110213074B (en) 2019-03-07 2019-03-07 Distributed protocol exception construction method, system and device

Publications (2)

Publication Number Publication Date
CN110213074A true CN110213074A (en) 2019-09-06
CN110213074B CN110213074B (en) 2022-03-11

Family

ID=67785041

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910171946.7A Active CN110213074B (en) 2019-03-07 2019-03-07 Distributed protocol exception construction method, system and device

Country Status (1)

Country Link
CN (1) CN110213074B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105871847A (en) * 2016-04-01 2016-08-17 国网江苏省电力公司电力科学研究院 Intelligent substation network abnormal flow detection method
CN106506243A (en) * 2016-12-19 2017-03-15 武汉虹信通信技术有限责任公司 A kind of webmaster method for diagnosing faults based on daily record data
CN108322291A (en) * 2018-02-06 2018-07-24 北京和利时电机技术有限公司 A kind of multiple-axis servo operation data monitoring method based on universal serial bus
CN108572955A (en) * 2017-03-07 2018-09-25 大唐移动通信设备有限公司 A kind of journal file generation method and device
CN108628694A (en) * 2017-03-20 2018-10-09 腾讯科技(深圳)有限公司 A kind of data processing method and device based on programmable hardware
CN108683553A (en) * 2018-03-30 2018-10-19 北京华为数字技术有限公司 The method and apparatus of direct fault location
CN109166141A (en) * 2018-08-10 2019-01-08 Oppo广东移动通信有限公司 Dangerous based reminding method, device, storage medium and mobile terminal

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105871847A (en) * 2016-04-01 2016-08-17 国网江苏省电力公司电力科学研究院 Intelligent substation network abnormal flow detection method
CN106506243A (en) * 2016-12-19 2017-03-15 武汉虹信通信技术有限责任公司 A kind of webmaster method for diagnosing faults based on daily record data
CN108572955A (en) * 2017-03-07 2018-09-25 大唐移动通信设备有限公司 A kind of journal file generation method and device
CN108628694A (en) * 2017-03-20 2018-10-09 腾讯科技(深圳)有限公司 A kind of data processing method and device based on programmable hardware
CN108322291A (en) * 2018-02-06 2018-07-24 北京和利时电机技术有限公司 A kind of multiple-axis servo operation data monitoring method based on universal serial bus
CN108683553A (en) * 2018-03-30 2018-10-19 北京华为数字技术有限公司 The method and apparatus of direct fault location
CN109166141A (en) * 2018-08-10 2019-01-08 Oppo广东移动通信有限公司 Dangerous based reminding method, device, storage medium and mobile terminal

Also Published As

Publication number Publication date
CN110213074B (en) 2022-03-11

Similar Documents

Publication Publication Date Title
Cinque et al. Microservices monitoring with event logs and black box execution tracing
Sasnauskas et al. KleeNet: discovering insidious interaction bugs in wireless sensor networks before deployment
WO2020029375A1 (en) Interface testing method and system, and computer device and storage medium
CN106911648B (en) Environment isolation method and equipment
US20060259542A1 (en) Integrated testing approach for publish/subscribe network systems
US9363145B2 (en) Programmatically simulating system conditions
CN109857751A (en) Cross-platform data update method, device and computer equipment based on block chain
CN108279986A (en) A kind of distributed transaction processing method and device
CN108234212A (en) Mixed cloud disaster recovery method, server and storage medium
CN104243230A (en) Method and device for obtaining monitoring data of Linux server
Nogueira et al. On the challenges of building a BFT SCADA
Chen et al. Tyr: Finding consensus failure bugs in blockchain system with behaviour divergent model
CN114926163A (en) Resource cross-chain transfer method and device
CN110474814A (en) Electric power local area network method for diagnosing faults, device
Iurman et al. Towards cross-layer telemetry
CN111431739B (en) QualNet-oriented dynamic fault setting method for simulation communication network
CN110213074A (en) The anomalous structure mthods, systems and devices of distributed protocol
US10289762B2 (en) Interconnection network simulator and method for simulating interconnection networks
CN114157468B (en) Cross-border payment message transmission method and device
CN106708488A (en) Multi-application debugging system and method
CN106936849A (en) Method is kidnapped in a kind of download of Android application program installation kit
Alvarenga et al. RIO: A denial of service experimentation platform in a Future Internet Testbed
JPH0856235A (en) Test method for router and terminal equipment for test
Min et al. An approach to intrusion tolerance for mission-critical services using adaptability and diverse replication
CN111752787A (en) Resource pool disaster tolerance drilling method, device 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