CN104636135B - A kind of node visit method and system, Client Agent and client - Google Patents
A kind of node visit method and system, Client Agent and client Download PDFInfo
- Publication number
- CN104636135B CN104636135B CN201410857075.1A CN201410857075A CN104636135B CN 104636135 B CN104636135 B CN 104636135B CN 201410857075 A CN201410857075 A CN 201410857075A CN 104636135 B CN104636135 B CN 104636135B
- Authority
- CN
- China
- Prior art keywords
- node
- child node
- information
- event
- batch
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 63
- 238000012544 monitoring process Methods 0.000 claims abstract description 75
- 238000007792 addition Methods 0.000 claims abstract description 30
- 238000012217 deletion Methods 0.000 claims abstract description 29
- 230000037430 deletion Effects 0.000 claims abstract description 29
- 238000013507 mapping Methods 0.000 claims abstract description 29
- 230000008859 change Effects 0.000 claims description 21
- 238000010586 diagram Methods 0.000 description 16
- 230000006870 function Effects 0.000 description 16
- 230000008901 benefit Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000001035 drying Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Landscapes
- Computer And Data Communications (AREA)
- Information Transfer Between Computers (AREA)
Abstract
An embodiment of the present invention provides a kind of node visit method and system, Client Agent and client, method therein specifically includes:The information of batch node is obtained from message queue, wherein, the batch node includes multiple child nodes;The monitoring event of the child node is registered in server-side, wherein, the monitoring event of the child node includes at least the additions and deletions event of child node;Receive the monitoring event of the child node of the server-side notice and corresponding event content;And the corresponding event content of additions and deletions event according to the child node, the sequence of information of the generation comprising the batch node and the mapping relations of child node set, and the sequence is write into shared drive.The embodiment of the present invention can realize the access function of batch node.
Description
Technical field
The present invention relates to field of communication technology, more particularly to a kind of node visit method and system, Client Agent and
Client.
Background technology
Zookeeper is a reliable coordination software for being directed to distributed system, it can be used between each server altogether
Enjoy data.
For example, in centralized configuration management system, server can be on zookeeper in the form of node (node)
The configuration information of application program is stored, wherein, a node can represent a configuration item, and nodal information described in multiple nodes has
Body can include:Nodename (path) and nodal value (data), and it is possible to the form according to key-value pair (key-value)
Tissue, index and storage are carried out to the nodename (path) and nodal value (data).
At present, zookeeper only supports once to obtain the function of a nodal value, without supporting batch to obtain nodal value
Function, in this way, for client, its needs obtains multiple nodal values by repeatedly asking, and which costs client
Flow, and add the running cost of client user.
The content of the invention
In view of the above problems, it is proposed that the present invention overcomes the above problem in order to provide one kind or solves at least in part
State a kind of node visit method and system, Client Agent and the client of problem.
According to one aspect of the present invention, there is provided a kind of node visit method, including:
The information of batch node is obtained from message queue, wherein, the batch node includes multiple child nodes;
The monitoring event of the child node is registered in server-side, wherein, the monitoring event of the child node includes at least
The additions and deletions event of child node;
Receive the monitoring event of the child node of the server-side notice and corresponding event content;And
According to the corresponding event content of additions and deletions event of the child node, information of the generation comprising the batch node and son
The sequence of the mapping relations of node set, and the sequence is write into shared drive.
Alternatively, the method is performed by Client Agent.
Alternatively, it is described the monitoring event of the child node is registered in server-side the step of, including:
Event registration request is sent to the server-side, the monitoring of the child node is carried in the event registration request
Event and the pointer for adjusting back parameter, so that when the server-side occurs in the monitoring event of the child node, using described
Pointer calls the readjustment parameter to carry out the monitoring event of the child node and the notice of corresponding event content.
Alternatively, the monitoring event of the child node further includes:The change events of child node respective value;
Then the method further includes:
According to the corresponding event content of change events of the child node respective value, the last look of the child node is obtained,
And the last look of the child node is write into the shared drive.
Alternatively, the letter that the information of batch node writes for client in the first inquiry failure in the message queue
Breath, wherein, first inquiry is saved to carry out the first inquiry in shared drive according to the information of batch node with obtaining batch
The corresponding child node set of information of point.
According to another aspect of the present invention, there is provided a kind of node visit method, applied to a client, the method bag
Include:
Information according to batch node carries out the first inquiry in shared drive, corresponding to obtain the information of batch node
Child node set, wherein, the mapping of the information comprising the batch node and child node set is stored with the shared drive
The sequence of relation;And
In the described first inquiry failure, the information of the batch node is write into message queue.
Alternatively, the method further includes:Carried out according to each child node in the child node set in the shared drive
Second inquiry, to obtain the value of each child node in the child node set.
Alternatively, the method further includes:In the described second inquiry failure, the client will correspond to the letter of child node
Breath writes the message queue.
According to another aspect of the invention, there is provided a kind of Client Agent, including:
Data obtaining module, for obtaining the information of batch node from message queue;Wherein, the batch node includes
Multiple child nodes;
Event registration module, for registering the monitoring event of the child node in server-side;Wherein, the child node
Monitoring event includes at least the additions and deletions event of child node;
Event receiving module, the monitoring event and corresponding event of the child node notified for receiving the server-side
Content;
Sequence generating module, for the corresponding event content of additions and deletions event according to the child node, generation is comprising described
The sequence of the information of batch node and the mapping relations of child node set;And
Sequence writing module, for the sequence to be write shared drive.
Alternatively, the event registration module, specifically for sending event registration request, the event to the server-side
The monitoring event of the child node is carried in registration request and adjusts back the pointer of parameter, so that in the server-side in institute
When stating the monitoring event generation of child node, the pointer is used to call the monitoring event of the readjustment parameter progress child node
And the notice of corresponding event content.
Alternatively, the monitoring event of the child node further includes:The change events of child node respective value;
Then the Client Agent further includes:
Update module, for acting on behalf of the corresponding event content of change events according to the child node respective value, obtains institute
State the last look of child node;
It is worth writing module, for the last look of the child node to be write the shared drive.
Alternatively, the letter that the information of batch node writes for client in the first inquiry failure in the message queue
Breath, wherein, first inquiry is saved to carry out the first inquiry in shared drive according to the information of batch node with obtaining batch
The corresponding child node set of information of point.
According to another aspect of the present invention, there is provided a kind of client, including:
First enquiry module, for carrying out the first inquiry in shared drive according to the information of batch node, to be criticized
Measure the corresponding child node set of information of node;Wherein, the information for including the batch node is stored with the shared drive
With the sequence of the mapping relations of child node set;And
First writing module, in the described first inquiry failure, the client to be by the information of the batch node
Write message queue.
Alternatively, the client further includes:
Second enquiry module, is looked into for carrying out second in the shared drive according to each child node in the child node set
Ask, to obtain the value of each child node in the child node set.
Alternatively, the client further includes:
Second writing module, for when in the described second inquiry failure, the client will to correspond to the information of child node
Write the message queue.
According to another aspect of the present invention, there is provided a kind of node visit system, including:Server-side, foregoing client
Agency and foregoing client.
A kind of node visit method and system, Client Agent and client according to embodiments of the present invention, visitor therein
The monitoring event that the child node can be registered in server-side is acted on behalf of at family end, and the monitoring event of the child node can at least wrap
Include:The additions and deletions event of child node, according to the corresponding event content of additions and deletions event of the child node of server-side notice, generation bag
The sequence of information and the mapping relations of child node set containing the batch node, and the sequence is write into shared drive;This
Sample, can cause information of the client according to batch node in node visit flow to carry out the first inquiry in shared drive,
To obtain the corresponding child node set of the information of batch node, therefore it can realize the access function of batch node.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention,
And can be practiced according to the content of specification, and in order to allow above and other objects of the present invention, feature and advantage can
Become apparent, below especially exemplified by the embodiment of the present invention.
Brief description of the drawings
By reading the detailed description of hereafter optional embodiment, it is various other the advantages of and benefit it is common for this area
Technical staff will be clear understanding.Attached drawing is only used for showing the purpose of optional embodiment, and is not considered as to the present invention
Limitation.And in whole attached drawing, identical component is denoted by the same reference numerals.In the accompanying drawings:
Fig. 1 shows a kind of step flow diagram of node visit method according to an embodiment of the invention;
Fig. 2 shows an exemplary a kind of structure diagram for node visit system according to the present invention;
Fig. 3 shows a kind of step flow diagram of node visit method according to an embodiment of the invention;
Fig. 4 shows a kind of step flow diagram of node visit method according to an embodiment of the invention;
Fig. 5 shows a kind of step flow diagram of node visit method according to an embodiment of the invention;
Fig. 6 shows a kind of structure diagram of Client Agent according to an embodiment of the invention;
Fig. 7 shows a kind of structure diagram of client according to an embodiment of the invention;And
Fig. 8 shows a kind of structure diagram of node visit system according to an embodiment of the invention.
Embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
Limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
Completely it is communicated to those skilled in the art.
Reference Fig. 1, shows a kind of step flow diagram of node visit method according to an embodiment of the invention,
Specifically it may include steps of:
Step 101, from message queue obtain batch node information, wherein, the batch node can specifically include
Multiple child nodes;
The embodiment of the present invention can be used for the browsing process to memory node in server-side, wherein, individual node can be both provided
Access function, and the access function of batch node can be provided.
The method of the present embodiment can be performed by Client Agent.With reference to Fig. 2, one exemplary one according to the present invention is shown
The structure diagram of kind node visit system, it can specifically include:Client 201, Client Agent 202 and server-side 203,
Wherein, client 201 and Client Agent 202 can run on the machine of client, and Client Agent 202 is responsible for and server-side
Node and nodal value are write shared drive by 203 communications to obtain node and nodal value, and client 201 can be shared interior
Deposit middle queried access and ask corresponding value, and server-side 203 is known nothing, also, after shared drive hit failure, client
The information of access request can be write message queue by end.
In the concrete realization, and Client Agent 202 can keep long with the zookeeper disposed in server-side 203 and connect
Connect, to obtain node and nodal value from zookeeper.The client 202 can provide a user SDK (software development kit,
Software Development Kit), it is each which can provide C/C++, Java, PHP, Python, Lua, Go, Shell etc.
The various interfaces of kind language, these interfaces can be used for the access function for realizing individual node or batch node.
In one kind application example of the present invention, multiple nodes can form tree hierarchy structure, then above-mentioned to be used for realization
The interface of the access function of batch node can specifically include:
Qconf::GetBatchConf ($ key, $ idc=NULL);// the interface is used to obtain present node next stage
The value of nodename and child node
Qconf::GetBatchKeys ($ key, $ idc=NULL);// the interface is used to obtain present node next stage
The title of node
Assuming that the root node of tree-like hierarchical structure is a, the child node of a includes:The child node of b and c, c include e, f, g and h,
It is possible to pass through above-mentioned Qconf::GetBatchKeys ($ key, $ idc=NULL) interface obtains the next stage child node of a
It is entitled:B and c, alternatively, above-mentioned Qconf can be passed through::GetBatchConf ($ key, $ idc=NULL) interface obtains a
Next stage child node it is entitled:B and c, while the value of b and c can also be obtained.Certainly, above-mentioned interface and its it is used for realization
Batch access function be intended only as example, those skilled in the art can also set other interfaces according to the actual requirements, such as use
In the title for all child nodes for obtaining a and the interface etc. of child node value, the embodiment of the present invention is to specific interface and its use
It is not any limitation as in the batch access function of realization.
When the above-mentioned interface of client call is to realize the access function of batch node, following node visit stream can be triggered
Journey:Client carries out the first inquiry according to the information of batch node in shared drive, to obtain the information of batch node correspondence
Child node set, and in the described first inquiry failure, the information of the batch node is write message by the client
Queue.Information for the batch node do not inquired about, in shared drive and is not present corresponding child node set, therefore client
Need the information of the batch node writing message queue;Wherein, the information of the batch node can be used for representing and accessing
The relevant information of demand, such as " title of the next stage child node of a " or, " the title and child node of the next stage child node of a
Value " etc..That is, the information of batch node can be that client writes in the first inquiry failure in the message queue
Information, wherein, first inquiry is that the information of foundation batch node carries out the first inquiry to obtain batch in shared drive
The corresponding child node set of information of node.
In practical applications, Client Agent can scan message queue according to the scan period, in message queue is found
When having new content, the information of newest batch node can be obtained from message queue, the embodiment of the present invention is to specific scanning
Cycle is not any limitation as.
Step 102, the monitoring event for registering in server-side the child node, wherein, the monitoring event of the child node
It can at least include:The additions and deletions event of child node;
Step 103, the monitoring event for receiving the child node that the server-side notifies and corresponding event content;
Assuming that the information of the batch node is:" title of next stage child node and the value of child node of a ", then, visitor
The monitoring event that " the next stage child node of a " can be registered in server-side is acted on behalf of at family end, in this way, when " the next stage section of a
When point " changes and (has such as increased node i newly, or deleted node b etc.), server-side can notify in time change events and
Corresponding event content.
In a kind of alternative embodiment of the present invention, the Client Agent registers the prison of the child node in server-side
Assume office part the step of, can specifically include:Client Agent sends event registration request, the event registration to the server-side
The monitoring event of the child node is carried in request and adjusts back the pointer of parameter, so that in the server-side in the son
When the monitoring event of node occurs, the readjustment parameter is called to carry out the monitoring event of the child node and right using the pointer
The notice for the event content answered.
Step 104, the corresponding event content of additions and deletions event according to the child node, generation include the batch node
The sequence of information and the mapping relations of child node set, and the sequence is write into shared drive.
Assuming that the information of the batch node is:" title of next stage child node and the value of child node of a ", due to client
End agency have registered the additions and deletions event of the next stage child node of a in server-side, and therefore, Client Agent can be at the first time
The additions and deletions event of the next stage child node of a and corresponding event content are obtained, so as to the additions and deletions thing according to the child node
The corresponding event content of part, the sequence of information of the generation comprising the batch node and the mapping relations of child node set, and will
The sequence writes shared drive, in this way, in the node visit flow of client, can be total to according to the information of batch node
Enjoy and the first inquiry is carried out in memory, to obtain the corresponding child node set of the information of batch node, to realize the visit of batch node
Ask function.
In the concrete realization, the sequence of information and the mapping relations of child node set comprising the batch node can be with table
It is now the form of key-value pair.In this way, two kinds of key-value pair data can be safeguarded in shared drive, a type of key-value pair
Data can be used for describing the information of the batch node and the mapping relations of child node set, available in node visit flow
First inquiry;A type of key-value pair data can be used for the mapping relations of description node and nodal value, available for client
The second inquiry in node visit flow.
To sum up, the Client Agent of the embodiment of the present invention registers the monitoring event of the child node in server-side, described
The monitoring event of child node can at least include:The additions and deletions event of child node, the increasing according to the child node of server-side notice
The corresponding event content of event is deleted, generation includes the sequence of the information of the batch node and the mapping relations of child node set,
And the sequence is write into shared drive;In this way, it can cause letter of the client according to batch node in node visit flow
Breath carries out the first inquiry in shared drive, to obtain the corresponding child node set of the information of batch node, therefore can realize
The access function of batch node.
Reference Fig. 3, shows a kind of step flow diagram of node visit method according to an embodiment of the invention,
Specifically it may include steps of:
Step 301, Client Agent obtain the information of batch node from message queue, wherein, the batch node tool
Body can include multiple child nodes;
Step 302, Client Agent register the monitoring event of the child node in server-side, wherein, the child node
Monitoring event can at least include:The additions and deletions event of child node and the change events of child node respective value;
Step 303, Client Agent receive the monitoring event of the child node of the server-side notice and corresponding thing
Part content;
The corresponding event content of additions and deletions event of step 304, Client Agent according to the child node, generation is comprising described
The sequence of the information of batch node and the mapping relations of child node set, and the sequence is write into shared drive;
The corresponding event content of change events of step 305, Client Agent according to the child node respective value, obtains institute
The last look of child node is stated, and the last look of the child node is write into the shared drive.
Relative to embodiment illustrated in fig. 1, the monitoring event of the child node of the present embodiment is except the additions and deletions thing including child node
Outside part, the change events of child node respective value can also be included, correspondingly, Client Agent can be corresponded to according to the child node
The corresponding event content of change events of value, obtains the last look of the child node, and the last look of the child node is write
The shared drive;In this way, in the node visit flow of client, the information of batch node can be first depending on shared interior
The middle inquiry of progress first is deposited, to obtain the corresponding child node set of the information of batch node, then according to the child node set
In each child node the shared drive carry out second inquiry, to obtain the last look of each child node in the child node set,
Can be while the access function of batch node be realized, to each child node last look of user feedback.
Reference Fig. 4, shows a kind of step flow diagram of node visit method according to an embodiment of the invention,
Specifically it may include steps of:
Step 401, client carry out the first inquiry according to the information of batch node in shared drive, are saved with obtaining batch
The corresponding child node set of information of point, wherein, the information comprising the batch node and son are stored with the shared drive
The sequence of the mapping relations of node set;
Step 402, in the described first inquiry failure, the client is by the information of batch node write-in message team
Row.
In practical applications, the interface that client can be provided by server-side triggers the node visit of the embodiment of the present invention
Flow.Assuming that the root node of tree-like hierarchical structure is a, the child node of a includes:The child node of b and c, c include e, f, g and h, that
, above-mentioned Qconf can be passed through::GetBatchKeys ($ key, $ idc=NULL) interface obtains the next stage child node of a
It is entitled:B and c.
Due to being stored with the mapping relations of the information comprising the batch node and child node set in the shared drive
Sequence, therefore first inquiry can provide a user the corresponding child node set of information of batch node, to realize batch
The access function of node;Also, in the described first inquiry failure, the client disappears the information write-in of the batch node
Queue is ceased, so that Client Agent obtains the information of newest batch node from message queue, for newest batch section
The sequence of information of the information generation comprising the batch node and the mapping relations of child node set of point, and the sequence is write
Enter shared drive, so as to ensure that client successful query in shared drive obtains the information correspondence of the newest batch node
Child node set.
Reference Fig. 5, shows a kind of step flow diagram of node visit method according to an embodiment of the invention,
Specifically it may include steps of:
Step 501, client carry out the first inquiry according to the information of batch node in shared drive, are saved with obtaining batch
The corresponding child node set of information of point, wherein, the information comprising the batch node and son are stored with the shared drive
The sequence of the mapping relations of node set;
Step 502, client carry out the second inquiry according to each child node in the child node set in the shared drive,
To obtain the value of each child node in the child node set;
Step 503, in the described first inquiry failure, the client is by the information of batch node write-in message team
Row.
Embodiment relative to Fig. 4, embodiment adds client according to each child node in the child node set
The second inquiry is carried out in the shared drive, the step of to obtain the value of each child node in the child node set, this is increased
Step can provide a user the child node while information that provides a user batch node corresponding child node set
The value of each child node in set.
In practical applications, the interface that client can be provided by server-side triggers the node visit of the embodiment of the present invention
Flow.Assuming that the root node of tree-like hierarchical structure is a, the child node of a includes:The child node of b and c, c include e, f, g and h, that
, above-mentioned Qconf can be passed through::GetBatchConf ($ key, $ idc=NULL) interface obtains the next stage child node of a
It is entitled:B and c, while the value of b and c can also be obtained.
In a kind of alternative embodiment of the present invention, the method can further include:In the described second inquiry failure, institute
State client and the information of corresponding child node is write into the message queue.This alternative embodiment enables to Client Agent from disappearing
The information of newest child node is obtained in breath queue, the corresponding value of information of the newest child node is obtained from server-side and writes
Enter shared drive, thus ensure client successful query in shared drive obtain the newest child node information it is corresponding
Value.
For embodiment of the method, in order to be briefly described, therefore it is all expressed as to a series of combination of actions, but this area
Technical staff should know, the embodiment of the present invention and from the limitation of described sequence of movement, because implementing according to the present invention
Example, some steps can use other orders or be carried out at the same time.Secondly, those skilled in the art should also know, specification
Described in embodiment belong to alternative embodiment, necessary to the involved action not necessarily embodiment of the present invention.
With reference to Fig. 6, show a kind of structure diagram of Client Agent according to an embodiment of the invention, specifically may be used
With including following module:
Data obtaining module 601, for obtaining the information of batch node from message queue;Wherein, the batch node
Multiple child nodes can specifically be included;
Event registration module 602, for registering the monitoring event of the child node in server-side;Wherein, the sub- section
The monitoring event of point can at least include:The additions and deletions event of child node;
Event receiving module 603, for the monitoring event of the child node that receives server-side notice and corresponding
Event content;
Sequence generating module 604, for the corresponding event content of additions and deletions event according to the child node, generation includes institute
State the sequence of the information of batch node and the mapping relations of child node set;And
Sequence writing module 605, for the sequence to be write shared drive.
In practical applications, Client Agent can keep long connection with server-sides such as zookeeper, to ensure from service
End smoothly receives the monitoring event of the child node of the server-side notice and corresponding event content;Meanwhile client generation
Reason also needs to the change of monitoring message queue, therefrom to obtain the information of newest batch node.
Shared drive blank when tentatively reaching the standard grade for the function of firm batch node, the information of a large amount of batch nodes, which is thrown into, to disappear
Cease in queue, and Client Agent is relatively slow from server-side value, message queue overstocks the phenomenon being finally fully written, client generation
Reason can create separate threads, which is responsible in message queue reading the information of batch node in memory.
In practical applications, the information of batch node can be client in the first inquiry failure in the message queue
The information of write-in, wherein, first inquiry is that the information of foundation batch node carries out the first inquiry to obtain in shared drive
To the corresponding child node set of information of batch node.
In a kind of alternative embodiment of the present invention, the event registration module 602, can be specifically used for the server-side
Event registration request is sent, the monitoring event of the child node is carried in the event registration request and adjusts back parameter
Pointer, so that when the server-side occurs in the monitoring event of the child node, calls the readjustment to join using the pointer
Number carries out the monitoring event of the child node and the notice of corresponding event content.
In another alternative embodiment of the present invention, the monitoring event of the child node can also include:Child node pair
The change events that should be worth;
Then the Client Agent can also include:
Update module, for acting on behalf of the corresponding event content of change events according to the child node respective value, obtains institute
State the last look of child node;
It is worth writing module, for the last look of the child node to be write the shared drive.
For Client Agent embodiment, since it is substantially similar to embodiment of the method, so the comparison of description is simple
Single, the relevent part can refer to the partial explaination of embodiments of method.
With reference to Fig. 7, show a kind of structure diagram of client according to an embodiment of the invention, can specifically wrap
Include following module:
First enquiry module 701, for carrying out the first inquiry in shared drive according to the information of batch node, to obtain
The corresponding child node set of information of batch node;Wherein, the letter for including the batch node is stored with the shared drive
Breath and the sequence of the mapping relations of child node set;And
First writing module 702, in the described first inquiry failure, the client to be by the letter of the batch node
Breath write-in message queue.
In a kind of alternative embodiment of the present invention, the client can also include:
Second enquiry module, is looked into for carrying out second in the shared drive according to each child node in the child node set
Ask, to obtain the value of each child node in the child node set.
In another alternative embodiment of the present invention, the client can also include:
Second writing module, for when in the described second inquiry failure, the client will to correspond to the information of child node
Write the message queue.
For client embodiment, since it is substantially similar to embodiment of the method, so fairly simple, the phase of description
Part is closed referring to the part of embodiment of the method to illustrate.
Present invention also offers a kind of node visit system, it can specifically include:Server-side, foregoing Client Agent
With foregoing client.
With reference to Fig. 8, a kind of structure diagram of node visit system according to an embodiment of the invention is shown, it has
Body can include:Server-side 801, Client Agent 802 and client 803;
Wherein, the Client Agent 802 can specifically include following module:
Data obtaining module 821, for obtaining the information of batch node from message queue;Wherein, the batch node
Multiple child nodes can specifically be included;
Event registration module 822, for registering the monitoring event of the child node in server-side;Wherein, the sub- section
The monitoring event of point can at least include:The additions and deletions event of child node;
Event receiving module 823, for the monitoring event of the child node that receives server-side notice and corresponding
Event content;
Sequence generating module 824, for the corresponding event content of additions and deletions event according to the child node, generation includes institute
State the sequence of the information of batch node and the mapping relations of child node set;And
Sequence writing module 825, for the sequence to be write shared drive;
The client 803 can specifically include following module:
First enquiry module 831, for carrying out the first inquiry in shared drive according to the information of batch node, to obtain
The corresponding child node set of information of batch node;Wherein, the letter for including the batch node is stored with the shared drive
Breath and the sequence of the mapping relations of child node set;And
First writing module 832, in the described first inquiry failure, the client to be by the letter of the batch node
Breath write-in message queue.
Algorithm and display be not inherently related to any certain computer, virtual system or miscellaneous equipment provided herein.
Various general-purpose systems can also be used together with teaching based on this.As described above, required by constructing this kind of system
Structure be obvious.In addition, the present invention is not also directed to any certain programmed language.It should be understood that it can utilize various
Programming language realizes the content of invention described herein, and the description done above to language-specific is to disclose this hair
Bright preferred forms.
In the specification that this place provides, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention
Example can be put into practice in the case of these no details.In some instances, known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help to understand one or more of each inventive aspect,
Above in the description to the exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:I.e. required guarantor
The application claims of shield features more more than the feature being expressly recited in each claim.It is more precisely, such as following
Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore,
Thus the claims for following embodiment are expressly incorporated in the embodiment, wherein each claim is in itself
Separate embodiments all as the present invention.
Those skilled in the art, which are appreciated that, to carry out adaptively the module in the equipment in embodiment
Change and they are arranged in one or more equipment different from the embodiment.Can be the module or list in embodiment
Member or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or
Sub-component.In addition at least some in such feature and/or process or unit exclude each other, it can use any
Combination is disclosed to all features disclosed in this specification (including adjoint claim, summary and attached drawing) and so to appoint
Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power
Profit requires, summary and attached drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation
Replace.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included some features rather than further feature, but the combination of the feature of different embodiments means in of the invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed
One of meaning mode can use in any combination.
The all parts embodiment of the present invention can be with hardware realization, or to be run on one or more processor
Software module realize, or realized with combinations thereof.It will be understood by those of skill in the art that it can use in practice
Microprocessor or digital signal processor (DSP) realize node visit method and system according to embodiments of the present invention, visitor
Act on behalf of some or all functions with some or all components in client in family end.The present invention is also implemented as being used for
Perform method as described herein some or all equipment or program of device (for example, computer program and calculating
Machine program product).Such program for realizing the present invention can store on a computer-readable medium, or can have one
Or the form of multiple signals.Such signal can be downloaded from Internet platform and obtained, or be provided on carrier signal,
Or provided in the form of any other.
It should be noted that the present invention will be described rather than limits the invention for above-described embodiment, and ability
Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference symbol between bracket should not be configured to limitations on claims.Word "comprising" or " comprising " are not arranged
Except there are element or step not listed in the claims.Word "a" or "an" before element does not exclude the presence of more
A such element.The present invention can be by means of including the hardware of some different elements and by means of properly programmed calculating
Machine is realized.In if the unit claim of equipment for drying is listed, several in these devices can be by same
Hardware branch embodies.The use of word first, second, and third does not indicate that any order.Can be by these word solutions
It is interpreted as title.
The invention discloses A1, a kind of node visit method, including:
The information of batch node is obtained from message queue, wherein, the batch node includes multiple child nodes;
The monitoring event of the child node is registered in server-side, wherein, the monitoring event of the child node includes at least
The additions and deletions event of child node;
Receive the monitoring event of the child node of the server-side notice and corresponding event content;And
According to the corresponding event content of additions and deletions event of the child node, information of the generation comprising the batch node and son
The sequence of the mapping relations of node set, and the sequence is write into shared drive.
A2, the method as described in A1, the method are performed by Client Agent.
A3, the method as described in A1, it is described the monitoring event of the child node is registered in server-side the step of, including:
Event registration request is sent to the server-side, the monitoring of the child node is carried in the event registration request
Event and the pointer for adjusting back parameter, so that when the server-side occurs in the monitoring event of the child node, using described
Pointer calls the readjustment parameter to carry out the monitoring event of the child node and the notice of corresponding event content.
A4, the method as described in A1, the monitoring event of the child node further include:The change events of child node respective value;
Then the method further includes:
According to the corresponding event content of change events of the child node respective value, the last look of the child node is obtained,
And the last look of the child node is write into the shared drive.
A5, the method as described in A1 or A2 or A3 or A4, the information of batch node exists for client in the message queue
The information that writes during the first inquiry failure, wherein, first inquiry be according to batch node information in shared drive into
Row first is inquired about to obtain the corresponding child node set of information of batch node.
The invention also discloses B6, a kind of node visit method, applied to a client, the described method includes:
Information according to batch node carries out the first inquiry in shared drive, corresponding to obtain the information of batch node
Child node set, wherein, the mapping of the information comprising the batch node and child node set is stored with the shared drive
The sequence of relation;And
In the described first inquiry failure, the information of the batch node is write into message queue.
B7, the method as described in B6, the method further include:According to each child node in the child node set described common
Enjoy memory and carry out the second inquiry, to obtain the value of each child node in the child node set.
B8, the method as described in B7, the method further include:In the described second inquiry failure, the client will be right
The information of child node is answered to write the message queue.
The invention also discloses C9, a kind of Client Agent, including:
Data obtaining module, for obtaining the information of batch node from message queue;Wherein, the batch node includes
Multiple child nodes;
Event registration module, for registering the monitoring event of the child node in server-side;Wherein, the child node
Monitoring event includes at least the additions and deletions event of child node;
Event receiving module, the monitoring event and corresponding event of the child node notified for receiving the server-side
Content;
Sequence generating module, for the corresponding event content of additions and deletions event according to the child node, generation is comprising described
The sequence of the information of batch node and the mapping relations of child node set;And
Sequence writing module, for the sequence to be write shared drive.
C10, the Client Agent as described in C9, the event registration module, specifically for sending thing to the server-side
Part registration request, carries the monitoring event of the child node and adjusts back the pointer of parameter in the event registration request, with
Make, when the server-side occurs in the monitoring event of the child node, to call the readjustment parameter to carry out institute using the pointer
State the monitoring event of child node and the notice of corresponding event content.
C11, the device as described in C9, the monitoring event of the child node further include:The change events of child node respective value;
Then the Client Agent further includes:
Update module, for acting on behalf of the corresponding event content of change events according to the child node respective value, obtains institute
State the last look of child node;
It is worth writing module, for the last look of the child node to be write the shared drive.
C12, the device as described in C9 or C10 or C11, the information of batch node is client the in the message queue
The information write during one inquiry failure, wherein, first inquiry is that the information of foundation batch node carries out in shared drive
First inquires about to obtain the corresponding child node set of information of batch node.
The invention also discloses D13, a kind of client, including:
First enquiry module, for carrying out the first inquiry in shared drive according to the information of batch node, to be criticized
Measure the corresponding child node set of information of node;Wherein, the information for including the batch node is stored with the shared drive
With the sequence of the mapping relations of child node set;And
First writing module, in the described first inquiry failure, the client to be by the information of the batch node
Write message queue.
D14, the client as described in D13, the client further include:
Second enquiry module, is looked into for carrying out second in the shared drive according to each child node in the child node set
Ask, to obtain the value of each child node in the child node set.
D15, the client as described in D14, the client further include:
Second writing module, for when in the described second inquiry failure, the client will to correspond to the information of child node
Write the message queue.
The invention also discloses E16, a kind of node visit system, including:Server-side, foregoing Client Agent and foregoing
Client.
Claims (14)
1. a kind of node visit method, including:
The information of batch node is obtained from message queue, wherein, the batch node includes multiple child nodes;The message team
The information that the information of batch node writes for client in the first inquiry failure in row, wherein, first inquiry is foundation
The information of batch node carries out the first inquiry to obtain the corresponding child node set of information of batch node in shared drive;
The monitoring event of the child node is registered in server-side, wherein, the monitoring event of the child node includes at least son and saves
The additions and deletions event of point;
Receive the monitoring event of the child node of the server-side notice and corresponding event content;And
According to the corresponding event content of additions and deletions event of the child node, generation includes the information and child node of the batch node
The sequence of the mapping relations of set, and the sequence is write into shared drive.
2. the method as described in claim 1, it is characterised in that the method is performed by Client Agent.
3. the method as described in claim 1, it is characterised in that the monitoring event that the child node is registered in server-side
The step of, including:
Event registration request is sent to the server-side, the monitoring thing of the child node is carried in the event registration request
Part and the pointer for adjusting back parameter, so that when the server-side occurs in the monitoring event of the child node, use the finger
Pin calls the readjustment parameter to carry out the monitoring event of the child node and the notice of corresponding event content.
4. the method as described in claim 1, it is characterised in that the monitoring event of the child node further includes:Child node corresponds to
The change events of value;
Then the method further includes:
According to the corresponding event content of change events of the child node respective value, the last look of the child node is obtained, and will
The last look of the child node writes the shared drive.
5. a kind of node visit method, applied to a client, the described method includes:
Information according to batch node carries out the first inquiry in shared drive, to obtain the corresponding sub- section of the information of batch node
Point set, wherein, the mapping relations of the information comprising the batch node and child node set are stored with the shared drive
Sequence;And
In the described first inquiry failure, the information of the batch node is write into message queue.
6. method as claimed in claim 5, it is characterised in that the method further includes:According to each in the child node set
Child node carries out the second inquiry in the shared drive, to obtain the value of each child node in the child node set.
7. method as claimed in claim 6, it is characterised in that the method further includes:In the described second inquiry failure, institute
State client and the information of corresponding child node is write into the message queue.
8. a kind of Client Agent, including:
Data obtaining module, for obtaining the information of batch node from message queue;Wherein, the batch node includes multiple
Child node;
Event registration module, for registering the monitoring event of the child node in server-side;Wherein, the monitoring of the child node
Event includes at least the additions and deletions event of child node;The information of batch node is lost for client in the first inquiry in the message queue
The information write when losing, wherein, first inquiry is that the information of foundation batch node carries out the first inquiry in shared drive
To obtain the corresponding child node set of the information of batch node;
Event receiving module, in the monitoring event of the child node that receives server-side notice and corresponding event
Hold;
Sequence generating module, for the corresponding event content of additions and deletions event according to the child node, generation includes the batch
The sequence of the information of node and the mapping relations of child node set;And
Sequence writing module, for the sequence to be write shared drive.
9. Client Agent as claimed in claim 8, it is characterised in that the monitoring event of the child node further includes:Son section
The change events of point respective value;
Then the Client Agent further includes:
Update module, for acting on behalf of the corresponding event content of change events according to the child node respective value, obtains the son
The last look of node;
It is worth writing module, for the last look of the child node to be write the shared drive.
10. Client Agent as claimed in claim 8, it is characterised in that the event registration module, specifically for described
Server-side sends event registration request, and the monitoring event and readjustment of the child node are carried in the event registration request
The pointer of parameter, so that when the server-side occurs in the monitoring event of the child node, using described in pointer calling
Adjust back parameter and carry out the monitoring event of the child node and the notice of corresponding event content.
11. a kind of client, including:
First enquiry module, for carrying out the first inquiry in shared drive according to the information of batch node, is saved with obtaining batch
The corresponding child node set of information of point;Wherein, the information comprising the batch node and son are stored with the shared drive
The sequence of the mapping relations of node set;And
First writing module, in the described first inquiry failure, the client to write the information of the batch node
Message queue.
12. client as claimed in claim 11, it is characterised in that the client further includes:
Second enquiry module, for carrying out the second inquiry in the shared drive according to each child node in the child node set,
To obtain the value of each child node in the child node set.
13. client as claimed in claim 12, it is characterised in that the client further includes:
Second writing module, for when in the described second inquiry failure, the client to write the information of corresponding child node
The message queue.
14. a kind of node visit system, including:In server-side, preceding claims 8 to 10 any Client Agent and
Any client in preceding claims 11 to 13.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410857075.1A CN104636135B (en) | 2014-12-31 | 2014-12-31 | A kind of node visit method and system, Client Agent and client |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410857075.1A CN104636135B (en) | 2014-12-31 | 2014-12-31 | A kind of node visit method and system, Client Agent and client |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104636135A CN104636135A (en) | 2015-05-20 |
CN104636135B true CN104636135B (en) | 2018-05-04 |
Family
ID=53214936
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410857075.1A Expired - Fee Related CN104636135B (en) | 2014-12-31 | 2014-12-31 | A kind of node visit method and system, Client Agent and client |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104636135B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108664337A (en) * | 2018-03-23 | 2018-10-16 | 北京奇艺世纪科技有限公司 | A kind of the message decompression method and device of distributed system |
CN108762822B (en) * | 2018-03-23 | 2021-11-16 | 中国银联股份有限公司 | Data loading method and device |
CN110166528B (en) * | 2019-04-16 | 2022-03-18 | 平安科技(深圳)有限公司 | Method and device for preventing node change notification from being lost and computer equipment |
CN110248409B (en) * | 2019-06-27 | 2022-04-15 | 海能达通信股份有限公司 | Terminal registration method and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102571418A (en) * | 2008-02-04 | 2012-07-11 | 华为技术有限公司 | Method, terminal, device and system for equipment management |
CN102591934A (en) * | 2011-12-23 | 2012-07-18 | 国网电力科学研究院 | Zookeeper-based method for realizing automatic expansion and switching of multiple Solr Shards |
CN102736946A (en) * | 2011-04-11 | 2012-10-17 | 阿里巴巴集团控股有限公司 | Batch application node deploying method and device |
CN103500111A (en) * | 2013-10-11 | 2014-01-08 | 北京奇虎科技有限公司 | Information configuration method and device based on zookeeper |
CN104202434A (en) * | 2014-09-28 | 2014-12-10 | 北京奇虎科技有限公司 | Node access method and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9063939B2 (en) * | 2011-11-03 | 2015-06-23 | Zettaset, Inc. | Distributed storage medium management for heterogeneous storage media in high availability clusters |
-
2014
- 2014-12-31 CN CN201410857075.1A patent/CN104636135B/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102571418A (en) * | 2008-02-04 | 2012-07-11 | 华为技术有限公司 | Method, terminal, device and system for equipment management |
CN102736946A (en) * | 2011-04-11 | 2012-10-17 | 阿里巴巴集团控股有限公司 | Batch application node deploying method and device |
CN102591934A (en) * | 2011-12-23 | 2012-07-18 | 国网电力科学研究院 | Zookeeper-based method for realizing automatic expansion and switching of multiple Solr Shards |
CN103500111A (en) * | 2013-10-11 | 2014-01-08 | 北京奇虎科技有限公司 | Information configuration method and device based on zookeeper |
CN104202434A (en) * | 2014-09-28 | 2014-12-10 | 北京奇虎科技有限公司 | Node access method and device |
Also Published As
Publication number | Publication date |
---|---|
CN104636135A (en) | 2015-05-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10846706B2 (en) | Method and apparatus for autonomous services composition | |
US8819617B1 (en) | System and method for providing access to data in a plurality of software development systems | |
US8984046B2 (en) | Process management using representation state transfer architecture | |
US7844912B2 (en) | System and method using transformation nodes with enhancement layers | |
US11755461B2 (en) | Asynchronous consumer-driven contract testing in micro service architecture | |
CN105531688B (en) | The service of resource as other services is provided | |
CN104572968B (en) | A kind of method for updating pages and device | |
US20120254109A1 (en) | Distributed component runtime | |
CN104636135B (en) | A kind of node visit method and system, Client Agent and client | |
CN104335524B (en) | Public web for the processing of the client-side page may have access to data storage | |
US10379826B1 (en) | Determining inputs to an integration flow component | |
CN108415710A (en) | The method and system of API is issued, called in Intelligent dialogue development platform | |
CN109906597A (en) | To with data set that restricted data set and untethered system are stored and fetched from cloud network | |
CN108062243A (en) | Generation method, task executing method and the device of executive plan | |
US20220198362A1 (en) | Generation of dashboard templates for operations management | |
US20120272190A1 (en) | Method and System for Graphically Enabled Service Oriented Architecture | |
Ntentos et al. | Assessing architecture conformance to coupling-related patterns and practices in microservices | |
CN104270403A (en) | Cloud platform information web monitoring system based on struts2 framework | |
CN108809704A (en) | Data deduplication statistical method based on dynamic time windows and device | |
CN109726038A (en) | Method and apparatus for managing virtual machine | |
US20170330151A1 (en) | Normalized object exposure for collaborative platforms | |
Mohamed et al. | SaaS dynamic evolution based on model-driven software product lines | |
WO2013050060A1 (en) | Method and system for client side user interface generation | |
US20170329498A1 (en) | Polymorph rendering for collaborative platforms | |
US20230086307A1 (en) | Data transformation and quality checking |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180504 Termination date: 20181231 |