CN100581109C - Mutual exclusion system and method in dynamic peer-to-peer environment - Google Patents

Mutual exclusion system and method in dynamic peer-to-peer environment Download PDF

Info

Publication number
CN100581109C
CN100581109C CN200510064089A CN200510064089A CN100581109C CN 100581109 C CN100581109 C CN 100581109C CN 200510064089 A CN200510064089 A CN 200510064089A CN 200510064089 A CN200510064089 A CN 200510064089A CN 100581109 C CN100581109 C CN 100581109C
Authority
CN
China
Prior art keywords
client
copy product
request
response
logic copy
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
Application number
CN200510064089A
Other languages
Chinese (zh)
Other versions
CN1719771A (en
Inventor
Q·廉
S·林
Z·章
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.)
Microsoft Corp
Original Assignee
Microsoft Corp
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
Priority claimed from US10/886,794 external-priority patent/US7526672B2/en
Application filed by Microsoft Corp filed Critical Microsoft Corp
Publication of CN1719771A publication Critical patent/CN1719771A/en
Application granted granted Critical
Publication of CN100581109C publication Critical patent/CN100581109C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present invention provides a mutual exclusion techniques for use in a dynamic peer-to-peer environment. In an implementation, a method includes receiving, at each of a plurality of logical replicas, a request from a client. Each of the logical replicas includes a queue and is for exclusive association with one of the clients. The request is for accessing one of a plurality of resources. When a particular one of the logical replicas is exclusively associated with another one of the clients, the request is stored in the queue of the particular logical replica.

Description

Mutual exclusion system and method in the dynamic equivalence network environment
Related application
It is disclosed on February 25th, 2004 that the application requires, and in U.S. Provisional Patent Application number is 60/547457 the related priority of 35U.S.C. § 119 (e).
Technical field
The present invention relates generally to a kind of peer-to-peer network, relate more particularly to the mutual exclusion techniques in a kind of dynamic equivalence network environment.
Background technology
Peer-to-peer network more and more causes the concern of academia and business circles recently.Peer-to-peer network provides some desirable features, for example, adapts to, and self, load balance, fault-tolerant, low cost, high application, scalability, and can be disposed for providing a large amount of shared resources.Peer-to-peer network displays with the spread path of sharing mass data, for example realizes that by a reciprocity World Wide Web website equity of the associated song that can be used for downloading downloads.
When the resource of being used by multi-client is provided, can suffer from the situation that two or more clients need be visited a specific resources, promptly described " conflict ".Mutual exclusion techniques relates to the technology that can be used for shared resource, to such an extent as to need the different clients of this specific resources of visit can not conflict, also can not cause unnecessary reciprocation.Utilize mutual exclusion techniques, client can obtain to visit " authority " by the specified resource of used special mutual exclusion techniques.
An example of mutual exclusion techniques comprises the application of semaphore.Semaphore is that each client can detect the value of change then.Based on the value that finds, client can be utilized this resource or find that it is at use and retry.Typically, a client is utilized the semaphore detected value, then, if there is not other client profit using resource, then changes this value and used by client to reflect resource, thereby client in succession will " be known " resource of this appointment and use.Thereby when the identical resource of a plurality of clients competition, for example during the special file of one of share and access, this semaphore provides a kind of and is used to adjust and makes the synchronous technology of behavior.
In above-mentioned mutual exclusion techniques, the collision problem that causes between the client of thirsting for this allocated resource of use is extended the change owing to the greedy behavior of client.For example, a plurality of clients wish to visit a resource, have only one of them client " to win " right of visiting this resource by utilizing mutual exclusion techniques simultaneously.The client of " failure " can not be obtained the right of access resources, still, can attempt obtaining right by sending request constantly once more.The request that repeatedly sends has once more consumed to be equal to the hardware and software of resource resource is provided, and client attempts to reach the visit of resource simultaneously.Repeatedly send out the network bandwidth that also consumes between client and the peer again.This problem also can be along with the increase of number of the client of expectation access resources extendedization, thereby cause bigger poor efficiency.
In addition, may meet with the different communication stand-by period in a plurality of clients and the communication between a plurality of peer of peer-to-peer network, one by one.For example, because the variation of communication stand-by period between client and peer, the request of visiting a specific resources from a plurality of clients being used to of receiving may arrive different peer in the different time.
Therefore, there is a demand constantly of using mutual exclusion techniques a dynamic equivalence network environment.
Summary of the invention
The mutual exclusion techniques that is used for a dynamic network equity environment is described.For example, mutual exclusion techniques utilizes formation to solve the variation of the communication stand-by period between client and peer.When request was received, formation can be used to storage request by peer, thereby peer can obtain a coherent view, therefore provided visit to resource based on this formation.In another example, the request in the formation of being stored in of the applications exploiting of formation has reduced " greediness " behavior of client, thereby client needn't attempt sending out request constantly again and visits resource.
In one embodiment, a kind of method is included in each in a plurality of logic copy product, receives a request from client.Each logic copy product comprises a formation, is used to special-purpose of connecting in the client.This formation is used to visit in a plurality of resources.When one in the logic copy product of appointment by special-purpose when being connected in the client another, request is stored in the formation of logic copy product of this appointment.
In an other execution mode, a kind of method comprises by a client forming a request, is used for and the communication of a plurality of logic copy product.This request is used to one of them in a plurality of resources.Client receives a plurality of responses from a plurality of logic copy product, determine whether client is allowed to utilize this resource.When another client was allowed to utilize certain resource, client awaits another kind of a plurality of response and needn't be sent another request.
In another embodiment, a kind of method is included at least one in a plurality of clients, forms a request that is used to carry out a plurality of resources of communication and gives a plurality of logic copy product.In a plurality of clients of a plurality of logic copy product, a plurality of responses are received.Each client is according to a plurality of responses, and decision whether in a plurality of client is allowed to use a resource.When not having client to be allowed to utilize resource, form an output message by at least one client, be used for communication with one or more logic copy product.This output message be used for causing one or more logic copy product each form another response from a corresponding formation.This queue stores is from the request the preceding of one or more clients.
In another embodiment, this peer-to-peer network more comprise utilize a required majority agreement protocol and allow the logic copy product of resource access.
Further, in another embodiment, a system comprises a network, is connected in the calculation element of network a plurality of clients and a plurality of communication-types.A plurality of calculation elements comprise a plurality of logic copy product.Each logic copy product is configured to and can exclusively be connected in a plurality of clients one at any one special time.Each logic copy product also comprises a formation, and this formation is used to store one, when the logic copy product are connected in another client by special use, derives from the request in order to access resources of a client.
Description of drawings
Fig. 1 is in order to illustrate an exemplary embodiments that becomes to be used to provide the environment of peer-to-peer network in order to configurations shown.
Fig. 2 is in order to structure that a display client is described with in more detail as the exemplary embodiments of the system of the duplicate of Fig. 1.
Fig. 3 is in order to be described in the flow chart of a process in the exemplary embodiments.In this embodiment, client-requested is as shown in Figure 1 visited one by the resource that one or more peer provided in peer-to-peer network.
Fig. 4 is in order to be described in the flow chart of a process in the exemplary embodiments.In this embodiment, client decision whether the utilization of a specific resources in a plurality of resource be allowed to.
Fig. 5 is the flow chart in order to a process in the exemplary embodiments of the execution of an output function that is described in a demonstration such as Fig. 4.
Fig. 6 is in order to a calcspar by the mutual exclusion agreement implementation structure of client executing and relevant with Figure 4 and 5 as described in Figure 2 duplicate to be described.
Fig. 7 is the explanation of a typical calculation device.
In whole specification and accompanying drawing, use identical label to represent identical parts and feature.
Embodiment
General introduction
The mutual exclusion techniques that is used for the dynamic equivalence network environment is described.In an example, mutual exclusion techniques utilizes formation to solve the variation of the communication stand-by period between client and peer.As mentioned above, can arrive different peer in the different time separately according to the variation of the communication stand-by period between client and peer in order to the request that receives from a plurality of clients of visiting an allocated resource.Therefore, peer may not possess the view that links up of the client of request access resources, for example works as each client and has all asked such visit.Peer can utilize formation to store request, thereby statistics can obtain a coherent view when request is received, and based on the visit that provides resource.
In addition, formation has reduced client " greediness " behavior.For example, formation can be utilized to store the request that comes from client, thereby client need not attempt sending out request continuously again and visits resource.Thereby client can considered to be in " effectively wait for " state, be used for from a response of the request of peer.Can use a unshaped compensation arrangement, thereby if after a period of time of an appointment, request responding does not receive also, then client sends request once more.
Typical environment
Fig. 1 is the explanation of the exemplary embodiments of an environment 100 that becomes to be used to provide peer-to-peer network in order to configurations shown.This environment 100 comprises a plurality of clients 102 (a), and wherein " a " can be from 1 arbitrary integer to " A ", and its communication on network 106 is of coupled connections in a plurality of calculation elements 104 (1)-104 (B).In this embodiment, each in a plurality of clients 102 (a) and a plurality of calculation element 104 (1)-104 (B) is all represented a node in the network 106.A node can be understood that a tie point that is used to transmit data, and for example one provides the reallocation point of data to other nodes and/or the terminal point and/or the data source of a file destination.
A plurality of clients 102 (a) and a plurality of calculation element 104 (1)-104 (B) can dispose in many ways.For example, client 102 (a) and a plurality of calculation element 104 (1)-104 (B) can be configured to possess the computer set of communication function on network 106, a radio telephone (for example, calculation element 104 (1)) for example, a desktop computer is (for example, calculation element 104 (2)), a notebook computer (for example, calculation element 104 (3)), a table mo(u)ld top half computer is (for example, calculation element 104 (4)), server group (for example, calculation element 104 (5)-104 (6)), a host computer is (for example, calculation element 104 (B)), with other calculation elements, exchange for example, a kind of apparatus for entertainment, one set top box, or the like.The further description of a typical calculation device can be found in relevant Fig. 7.Thereby, a plurality of clients 102 (a) and a plurality of calculation element 104 (1)-104 (B) can extend to whole resource devices that possesses substantial memory and (for example handle resource, personal computer, the television recorder of hard disk is equipped with) give the low energy source device possess the limitation memory and/or carry out resource (for example, traditional set top box group).Client 102 (a) can relate to the integral body of individual and/or operated client.In other words, client 102 (a) can be described to a logical client end that comprises a user and/or a machine.
Network 106 can be configured to a peer-to-peer network.A peer-to-peer network allows the node in the network 106 to visit the shared resource that is positioned on each node (being a plurality of clients 102 (a) and a plurality of calculation element 104 (1)-104 (B)).The example of peer-to-peer network is known in the past and is used, and comprises following:
Free nets, by I.Clark, B.Wiley, O.Sanberg and T.Hong can report on the operating room design digest unknown with uncertain in the world, Springer Verlag, LNCS2009, " free nets: a kind of distributed unnamed message storage and retrieval system " in 2001.
String (chord), by I.Stoica, R.Morris, D.Karger, M.F.Kaashoek, H.Balakrishnan can newspaper goes up described " string, a kind of measurable be used for the equity that network diverts from one use to another and search device " at the ACM SIGCOMM ' 01 in calendar year 2001 California, USA Santiago.
CAN, by S.Ratnasamy, P.Francis, M.Handley, R.Karp and S.Shenker can go up described " a kind of measurement can be set the address contents network " by newspaper at the ACM SIGCOMM ' 01 in calendar year 2001 California, USA Santiago.
Cake (pastry), by A.Rowstron and P.Druschel described in the international talks of 2001 distributed system platform IFIP/ACM " cake: measurable, because the decentralized physical positioning and the wiring of large-scale measurement peer system " and
Kilim carpet (tapestry), by B.Y.Zhao, J.Kubiatowicz and A.D.Joseph be at the Berkeley of California, USA, and number is " kilim carpet: a kind of infrastructure that is used for fault-tolerant wide area location and wiring " described in the technical report of UCB/CSD-01-1141.
Peer-to-peer network can provide polytype feature, and is for example redundant and fault-tolerant.For example, the data that are stored in the peer-to-peer network can be duplicated by the node of peer-to-peer network and little by little propagate along with data.Thereby data can highly redundant in reciprocity networking, and that will cause the reliability of data and the increase of applicability.
Can utilize peer-to-peer network and exchange multiple resource.Data for example, processing cycle, storage or the like.Thereby peer-to-peer network can be used to the cohesion of a plurality of clients 102 (a) and a plurality of calculation element 104 (1)-104 (B) is played leverage.Peer-to-peer network is one and exchanges model, and each peer that is to say " member " therein, can directly communicate by letter with another member and/or passes through a medium server.
Network 106 comprises a distributed hashing platform (DHT) 108, and it takes on a role who sends the interface of information between a plurality of clients 102 (a) and a plurality of calculation element 104 (1)-104 (B).This DHT108 can be understood as one and is used for storage (keyword, the value) distributed model of the distributed hashing platform structure of (paris) in pairs.For example, this keyword can be corresponding to a filename and this value can be corresponding to the content of this document.Each peer in this network 106, for example calculation element 104 (1)-104 (B) is stored as right subclass.Therefore this DHT108 is utilized to find the reliable node corresponding to this keyword.In other words, this DHT108 shines upon this keyword and is used for transmission information between a plurality of clients 102 (a) and a plurality of calculation element 104 (1)-104 (B) for this node.Multiple device can construct on ready-made DHT108, file sharing device for example, and the archives storage device is (for example, network archives), database, naming system, picture reproducer, the application layer multileaving, event notice, chat apparatus, communication is set up in set, inquiry and index, data announces/subscription, or the like.
This DHT108 divides the resource that is offered a plurality of buckets (bucket) 110 (1)-110 (8) by a plurality of calculation elements 104 (1)-104 (B).In a plurality of buckets 110 (1)-110 (8) each can be considered as a resource area.For example, the aforesaid DHT108 connection resource that possesses keyword.This keyword is by hash, is used for searching specific in a plurality of buckets 110 (1)-110 (8) that utilize DHT108.A plurality of buckets 110 (1)-110 (8) can be provided in a variety of forms.For example, being provided by calculation element 104 (1) shown in illustration among Fig. 1 is provided bucket 110 (1).Same, bucket 110 (2), 110 (3), 110 (4), 110 (5), 110 (6) is provided by calculation element 104 (2), 104 (3), 104 (4), 104 (5), 104 (6) respectively.In addition, calculation element can offer the bucket more than., the bucket 110 (7), 110 (8) shown in the illustration of Fig. 1 is provided by calculation element 104 (B).
This environment 110 when being configured to use the peer-to-peer network of DHT108, provides one by participating in the Virtual Space that redundant peer group of distributing is filled.This Virtual Space can be provided, to such an extent as to it does not have " hole ", in the one section instantaneous time that changes in membership.For example, if calculation element 104 (6) becomes unavailable, for example owing to the mistake of hardware, software and/or network, the bucket 110 (6) that should be provided by calculation element 104 (6) may be provided by another calculation element, for example, calculation element 104 (B).Thereby network 106 is dynamic, thereby under the situation that does not have network to interrupt, node can enter or deviated from network.
Because DHT108 can be used to form a common logical space from a plurality of calculation elements 104 (1)-104 (B) that do not have to interrupt, one group of logic copy product 112 (1)-112 (4) (duplicate) can be implemented.For example, for given resource R, the calculation element CS (R) of its associating can be a logic.For example, have n duplicate here, their name is "/foo/bar:i " wherein i ∈ { 1..n}.These names can be obtained keyword by hash, and the major node of each keyword can be used as a duplicate.The decoupling of name and actual calculation device have caused a regulation that can be considered to " always " available " virtual calculation element ", but may in time cause the loss of memory at random point.In addition, the further detailed description relevant with Fig. 3 and 6 means that to the introduction of a plurality of duplicate the stand-by period between client and these duplicate changes, and therefore exerts an influence when carrying out.
Therefore, from the angle of client 102 (a), duplicate 112 (1)-112 (4) is available always, for example, is " online ".As mentioned above, however any one in the duplicate 112 (1)-112 (4) all might suffer a loss of memory completely again and again.For example, resetting and may cause at random: specific one the calculation element 104 (1)-104 (B) in being used to provide duplicate 112 (1)-112 (4) but in one become the time spent, it is replaced by in the calculation element 104 (1)-104 (B) another.
Duplicate 112 (1)-112 (4) will be when client attempts to visit identical resource, provides a mechanism to be used for controlling conflict between a plurality of clients 102 (a) two or more.For example, duplicate 112 (1)-112 (4) can utilize a mutual exclusion techniques that uses a required majority agreement protocol.This agreement is used to permit to visit in the client of the identical resource of a plurality of expectations visits, will be known as " key component " in the part of described identical resource discussion below, is expressed as in equation and accompanying drawing " CS ".Duplicate 112 (1)-112 (4) is considered to as the process (process) that helps client 102 (a) serialization access critical resource.Duplicate may be defined as virtual name, can be known by entire environment 100.If a duplicate has broken away from environment 100 (for example, accident), it is old that " new " duplicate will replace, and is assumed to identical virtual name simultaneously.In fact, so virtual name can be performed by a name server, relies on the DHT108 in the peer system, or the like.Because the device of so virtual name, the number of the duplicate in the system will be fixed by the life-span of system.The further discussion of the execution of the mutual exclusion techniques relevant with accompanying drawing 3-5 can be found.
Therefore, environment 100 will provide by client 102 (a) and be considered as " always " available duplicate 112 (1)-112 (4).Yet the inherent form of these logic copy product 112 (1)-112 (4) can be reseted at random.In addition, the number of the client 102 (a) in environment 100 also may be unexpected, perhaps may be very big.
Client 102 (a) can utilize information to communicate by letter in network 106 with duplicate 112 (1)-112 (4), for example asks and responds, and can find further description in relevant Fig. 6.In one embodiment, the network 106 that communication is connected in client 102 (a) and duplicate 112 (1)-112 (4) may be insecure, that is to say that information may be replicated and/or lose.In content of the discussions once, client 102 (a) and duplicate 112 (1)-112 (4) all are the peer in DHT108.But, in another embodiment, the peer that has only duplicate 112 (1)-112 (4) to be considered to be present among the DHT108.
Duplicate 112 (1)-112 (4) can be utilized to realize in many ways to allow the visit to the resource that is provided by calculation element 114 (1)-114 (M).For example, each in the duplicate 112 (1)-112 (4) all may be authorized to visit a specific resources on the basis of " pseudo--as to arrive first/service earlier ".In the duplicate 112 (1)-112 (4) each for example, can wherein be asked the order that is received from client 102 (a) by duplicate 112 (1)-112 (4) and is allowed to access certain resources based on one.When a duplicate was permitted (or voting) client, the latter was called as the former owner.In other words, duplicate is connected in client by special use, thereby when it is so had, can not be had by another client.The proprietorial client of having assembled a plurality of duplicate is called as the winner who carries out a required majority agreement protocol, and is allowed to visit this resource.The further discussion of the ownership of use by response and the ballot of duplicate can be found in Fig. 3 and 6.
Although seven calculation elements 104 (1)-104 (B) are illustrated, the calculation element of a wider type can be implemented in this environment.In addition, a plurality of clients 102 (a) also can be configured to " peer " in peer-to-peer network.
Mutual exclusion
Mutual exclusion (mutual exclusion) is to realize a kind of in the basic primitive of conventional system and application in being configured to use the network environment of a reciprocity DHT.So the primitive utilization is carried out on this equity DHT should be used for providing a kind of preliminary service in order to utilize, to protect one or more resources at random when being necessary.For example, mutual exclusion provides a concurrent control device to be used for a common distributed document system.In order to be supported in the change of the environment 100 among Fig. 1, thereby increase and/or mobile node, such primitive is carried out in reciprocity DHT.Therefore, this mutual exclusion agreement implementation is assigned with.
(for example, the environment 100 of Fig. 1) open and dynamic characteristic is brought various types of difficult problems to peer to peer environment.For example, former mutual exclusion agreement supposes that always has a closing type system fixing and node relative appropriate number.The communication in aforesaid system of these nodes, one is arrived another, unified to realize.But such settling mode is out of use under the situation of the client that unpredictable number is arranged and/or a large amount of clients.In the following discussion, a mutual exclusion techniques is described, and it locatees the great change of a network stand-by period between client and duplicate by a publicly-owned strategy is used in difference and the arguement of checking the stand-by period.Therefore measurability and stability have been realized.In addition, an information compensation device is described, and it rebuilds the state of duplicate intelligently, controls resetting at random of duplicate.
Typical protocol
Mutual exclusion agreement is described to can be used to solve the conflict to the request of a specific resources.For example, two or more in a plurality of clients 102 (a) want to utilize the client of a key component (CS) (for example, a specific resources) to send request to each duplicate 112 (1)-112 (4), and wait response.In the duplicate 112 (1)-112 (4) each is all ratified a rental period (lease), as long as it is not had by other client.Otherwise, each the refusal request in the duplicate 112 (1)-112 (4) but in client (unaccepted) client 102 (a) that notice is being asked which is current owner.The consistent technology of a required majority is used, thus one in n duplicate, have the individual client 102 (a) of m (wherein m be a legal numeral and n is the number of duplicate) be the victor of this bout, and be allowed to visit this key component (CS).This legal number can determine in many ways, for example, and m>n/2, or the like.Previous, be not allowed to the client of access critical part, that is to say that " loser " of that bout discharges acquired franchise (if the words that have), compensate and discharge this request.
Yet duplicate 112 (1)-112 (4) will meet with resetting at random, and it can forget decision before relevant its and open to new request after this.Be somebody's turn to do the destruction that " change view " can cause mutual exclusion.For example, the average life span of supposing a node is T, and the probability that this node collapses in one-period t is t/T.Any k the probability that reset of m ballot in the duplicate is as follows:
m k ( t T ) k ( 1 - t T ) m - k
Shown in above-mentioned equation, when having in time t more than or equal to 2m-n the generation that resets, safety is with destroyed, and the probability that this situation takes place is as follows:
Σ k = 2 m - n m m k ( t T ) k ( 1 - t T ) m - k
Therefore, for the duplicate of standing up to k resets, n=3k+1 and m=2k+1 will satisfy.Therefore, as the selection of design, the value of m must raise.
Fig. 2 is in order to illustrating in greater detail the exemplary embodiments of a system 200, and this system 200 shows that wherein, " i " can be arbitrarily from 1 integer to " I " as structure of the client 102 (a) of Fig. 1 and duplicate 112 (i).Client 102 (a) is illustrated as and comprises a client id 202 and a response array 204.This client id is used to utilize duplicate 112 (1) to come identify customer end 102 (a).Response array 204 is configured to storage a plurality of responses 206 (i) from a plurality of duplicate 112 (1)-112 (4) of Fig. 1.For example, response 206 (i) can be used to store a response of obtaining from " i position " duplicate, that is to say, duplicate 112 (i), and comprise in order to the data of indicating corresponding owner 208 (i) with in order to indication when this duplicate receive the related markers 210 (i) of the request of a response that is used to form 206 (i).
Duplicate 112 (i) keeps an ownership field 212 (i), in order to indicate in a plurality of clients 102 (a) which, if having, has this duplicate 112 (i).This ownership field 212 (i) can be expressed as " the C shown in Fig. 2 Owner".The value of " nil " of ownership field 212 (i) in order to indicate this duplicate 112 (i) not by voting for being used for of client 102 (a).In other words, duplicate 112 (i) is current is not exclusively to be associated with customer end A.Markers field 218 (a) " T Owner" after a request is replicated product 112 (i) and receives, store the markers of this request.
This duplicate 112 (i) comprises a formation 214 (i), in order to the request 216 (a) of storage reception from a plurality of clients 102 (a).Each is stored in request 216 (a) in the formation all corresponding to one in a plurality of clients 102 (a).This formation 214 (i) can be configured to the order that can both be received with each request 216 (a) and store this request 216 (a).For example, formation 214 (i) can utilize a clock, and for example the logical timer of Lamport comes to produce a markers 218 (a) for each request 216 (a).This formation 214 (i) will ask 216 (a) to organize based on markers 218 (a) separately then.In another example, each request oneself is got up with the time mark by client 102 (a).A plurality of duplicate 112 (1)-112 (4) of the example of the operation of a client and Fig. 1 can find in following execution mode.
Exemplary program
The mutual exclusion techniques of the structure execution that can utilize foregoing description has been described in following discussion.The various aspects of each program can be with hardware, firmware, or the mode of software or their combination realizes.This program is shown as a pack module of the specific operation that one or more devices execution can be arranged.
Fig. 3 is in order to be described in the flow chart of a process 300 in the exemplary embodiments.In this embodiment, client 102 (a) request is as shown in Figure 1 visited one by the resource that one or more peer provided in peer-to-peer network.At piece 302, client 102 (a) forms and transmits each that a request 304 is given in a plurality of duplicate 112 (1)-112 (4).In a plurality of resources that this request 304 identifications are provided by peer to peer environment specific one, and comprise the user ID of Fig. 2, thereby each in a plurality of duplicate 112 (1)-112 (4) can be distinguished client 102 (a) and another client.
At piece 306, duplicate 112 (1)-112 (4) is determined ownership.For example, each inquiry ownership field 212 (1)-212 (4) separately of duplicate 112 (1)-112 (4).Which value in ownership field 212 (1)-212 (4) indicates, if having, client has other duplicate 112 (1)-112 (4) of branch.For example, the ownership field 212 (1) of duplicate 112 (1) is had " nil " value by the imagination explanation, and it is not had by a client at present in order to indicate this duplicate 112 (1).Similarly, the ownership field 212 (2), 212 (3) of duplicate 112 (2), 112 (3) separately also is illustrated " nil " value that has separately.Therefore, duplicate 112 (1)-112 (3) is not used for ownership by specific client " ballot ".
The ownership field 212 (4) of duplicate 112 (4) still, is illustrated as the value that comprises in order to indicate this duplicate 112 (4) to be had by client 102 (1).Proprietorial definite based on this, duplicate 112 (4) request of in formation 214 (4), storing 304, thus client need not resend request, in Fig. 5 relevant more detailed description will be arranged.
At piece 308, duplicate 112 (1)-112 (4) forms and passes on a corresponding request 310-316 to give client 102 (a).Among the request 310-316 each comprises a proprietorial indication of duplicate 112 (1)-112 (4) separately.For example, each among the request 310-316 may comprise the ownership field (C from corresponding duplicate 112 (1)-112 (4) Owner) in the value that obtains.
At piece 310, client 102 (a) determines based on response 310-316 whether the visit of resource is allowed to.For example,, comprise the result of decision, do not had by another client in order to indication duplicate 112 (1) from the response 310 of duplicate 112 (1) at piece 306.Therefore, duplicate 112 (1) is had by client 102 (a) now, is illustrated by local box and the literal that is used for describing client 102 (a) in response in 312 in piece 310.Similarly, at piece 306, come from corresponding duplicate 112 (2), 112 (3) response 312,314 also comprises the result of corresponding decision.For example, response 312,314 all indicates corresponding duplicate 112 (2), 112 (3) not had by another client, therefore, duplicate 112 (2), 112 (3) are all had by client 102 (a).But response 316 comprises in piece 306 in order to indicate corresponding duplicate 112 (4) by another client, as client 102 (1), the result of the decision that is had.
Client 102 (a) utilizes multiple mutual exclusion techniques to determine whether that based on response 310-316 the utilization of resource is allowed to.For example, when " m " in client 102 (a) acquisition " n " individual duplicate 112 (1)-112 (4) is individual, client 102 (a) can use one therein client 102 (a) be allowed to use a required majority agreement protocol of resource, wherein m is legal number, n is the number of duplicate.In other words, duplicate 112 (1)-112 (4) was configured to a period, special-purpose any one that connects in the particular clients.This special-purpose connection can be utilized, thereby, with regard to ownership field (C as particular clients Owner) indicated, " ballot " that be used for each duplicate of client has current special use and connects.
This method is fixed a number and can be determined in many ways, for example, and m>n/2, or the like.Therefore, client 102 (a) as ask 304 corresponding response 310-316 indicated, determine whether the visit of specific resources is allowed to based on the ownership of duplicate 112 (1)-112 (4).In piece 308 illustrated examples, if m is set to smaller or equal to 3, then client 102 (a) has the proprietorial method fixed number of duplicate 112 (1)-112 (4), and therefore the utilization to resource is allowed to.In another example, if m is set to 4, client 102 (a) then is not allowed to access resources.Replace re-send request may 304 apace, yet at piece 306, client 102 (a) will be waited for and receive another response, because this request is stored in the formation 212 (4).Therefore, if not triumph of client 102 (a), this client just is added into a kind of because from " effectively waiting for " state of the additional response of duplicate 112 (1)-112 (4).In relevant Figure 4 and 5, to the use of formation and the further discussion effectively waited for found.
Therefore, as shown in the exemplary program 600, mutual exclusion techniques is configured to duplicate 112 (1)-112 (4) and does not come governing response by communication each other.For example, each duplicate will be purely based on it oneself local state and the response that sends it to client.The key component of having saved the time in the adjusting between duplicate like this and therefore can go through to visit quickly them for client offers an opportunity.Client, thereby can be participated on one's own initiative in the client selection course, rather than waiting for the decision that comes from duplicate passively.
Fig. 4 is in order to be described in the flow chart of a process 400 in the exemplary embodiments.In this embodiment, client decision whether the utilization of a specific resources in a plurality of resource be allowed to.At piece 402, client forms a request and utilizes of appointment in a plurality of resources.This request comprises one from clock (for example, the logical timer of Lamport) markers of obtaining and the ID of client (for example, the client id 202 of Fig. 2).At piece 404, client sends request and awards in a plurality of duplicate that specific resources is associated each, thereby each of duplicate receives request (piece 406).
At decision piece 408, whether accordingly each duplicate decision value of ownership field has " nil " value, that is to say that duplicate is not connected in the client of front by special use.If the value of ownership field is nil, then then at piece 410, the client id that comes from request is stored in ownership field (for example, the C of duplicate as this value Owner) in.In addition, the time target value in request is stored in markers field (for example, the T of duplicate Owner) in.If at piece 408, the value of ownership field is not " nil ", then should the request, comprise client id and the time be marked in, be inserted in the corresponding formation.After the described behavior that executes piece 410 or piece 412, process 400 proceeds to piece 414.
At piece 414, comprise the analog value of ownership field and the duplicate of markers field forms response by each.At piece 416, duplicate sends response to client.For example, each duplicate sends request in network shown in Figure 1 106.At piece 418, client is memory response, for example the response array 204 of Fig. 2 in a response array.At decision piece 420, made about whether there being enough responses to receive with the decision that is used for calculating the victor.This decision can be carried out in various mode.For example, whether client can determine to have enough responses to be received to be used for forming a method fixed number, whether all receives a request from the duplicate of each reception request, or the like.
If enough responses are received (piece 420), then then, client is calculated a victor (piece 422).The victor can calculate in various mode.For example, as mentioned above, client can determine the ownership whether client has obtained the method fixed number of duplicate, for example, and the m from n duplicate.
Whether about the victor is that the decision of this client is made by client at 424, one of pieces of decision.If the victor is this client (piece 424), a successful information is sent to this client (piece 426), thereby the visit that client " is known " allocated resource is allowed to.If the victor is not client (piece 424), then process 400 proceeds to decision piece 428 then.
Whether is that the decision of another client is made at 428, one of pieces of decision about the victor.If the victor is another client, process proceeds to piece 430.At piece 430, another response of client awaits, and also process 400 is returned piece 418.By this way, client is positioned in " effectively waiting for " state, thereby client needn't resemble the front desired re-send request may, thereby preserve the hardware and software resource of client and the logic copy product be provided and be used for the calculation element of the Internet resources of communication between client and calculation element.
If the victor is not another client (piece 428), then can not be found this " bout " victor.For example, if j Same+ n-j<m, wherein, j is the number of the request returned, the maximum of the same item among the j is j Same, then the client of request visit allocated resource " wins " permission of access resources.Thereby at piece 432, output function of client terminal start-up sends an output message to each duplicate that has client to have, thereby a victor can be found.The example of above-mentioned more detailed description will find in the execution mode below.
Fig. 5 is the flow chart in order to a process in the exemplary embodiments 500 of the execution that is described in a demonstration output function as shown in Figure 4.At piece 502, have the response of the ownership field value of given client end for each, an output message is sent to corresponding formation and passes on the duplicate of response.For example, the client 102 (a) of the piece in Fig. 3 318 can send an output message to the duplicate 112 (1)-112 (3) that sends corresponding request 310-314.This request indication has the client 102 (a) of (that is to say that special use is connected in) corresponding duplicate 112 (1)-112 (3).
At piece 504, receive output message by the duplicate that client had.This output message comprises the client id that sends the client of output message in order to identification.At decision piece 506, each duplicate determines the ID of client whether and the ownership field (C of corresponding duplicate Owner) value whether equate.In one embodiment, output message only is sent to the duplicate that is had by client, and decision piece 506 can provide and be used for detecting mistake.For example, if the value of client id and ownership field does not match, client (piece 508) is just delivered in an error message.In another embodiment, output message can be sent to all duplicate, thereby the execution of the decision of piece 505 can utilize by each duplicate, determines whether output message and that duplicate " corresponding ".
If the ID of client equates (piece 506) with the value of ownership field, then then at piece 510, the value of the value of ownership field and markers field is inserted in the formation.For example, the value of ownership field and markers field can be copied in the formation.At piece 512, the value of ownership field and markers field then is reset from " front end " of formation, is used for the corresponding inlet of set point simultaneously to be removed from formation.This formation for example, can be organized in inlet in the formation according to markers, thereby the oldest inlet is positioned in " front end " (for example, being that at first inlet reads) of formation, so that " service first/earlier " device of a standard is provided.Therefore, at piece 510,512, the value utilization that is used for ownership field and markers field is not the most recent, that is to say, and is the oldest, and is reset.The preceding value of inlet in the formation and ownership field and markers field is inserted in the formation.
At piece 514, each duplicate all forms a response that comprises corresponding ownership field value and markers field.At piece 516, this response sends to client by duplicate.Therefore, in fact the execution of output function is cooperated.The semanteme of this output function can be considered to " release+request ", and the ownership of duplicate is discharged by another client therein, and request is inserted in the formation.Can in relevant Fig. 6, find with the further discussion of solicit operation about discharging.Therefore, when duplicate received an output message, it was removed client from the seat of triumph, that is to say, is present in the value (C in the ownership field Owner), and be inserted in the formation.These stubbornness product are then selected client the earliest from formation, be denoted as the victor then.
This output function has caused reshuffling of formation.For example, the generation of the contention that the indication client is seen because there is not client " triumph " in Fig. 4.Like this, alternately means also that formation is established and the victor is inappropriate, for example because the network stand-by period.Rely on the issue output message, client provides a chance of setting up the view that links up to duplicate, from one to another, then select a victor.This process 500 may be repeated many times to know that a victor is calculated.
Typical case's mutual exclusion protocol architecture
Fig. 6 is in order to illustrate that one is carried out by client 102 (a) and the calcspar of an execution architecture 600 of the mutual exclusion agreement of relevant with Figure 4 and 5 as described in Figure 2 duplicate 112 (i).This structure 600 has been described in the client 102 (a) of Fig. 1 and the information exchange between the duplicate 112 (i) by the use of arrow.This structure 600 is described to be respectively applied for client 102 (a) and duplicate 112 (i) according to a message handler.Each typical operation will be discussed in conjunction with the typical pseudo-code of being carried out by corresponding device thereof.Although one or more in a plurality of operations are shown respectively and/or within other operation, these operations can with various or mode in conjunction with or rearrange.
Client 102 (a) and duplicate 112 (i) can be supported various operation that is used to provide aforesaid mutual exclusion separately.Below argumentation an order that typically is used to the conversion of the execution operated and information has been described, thereby communication between client 102 (a) and the duplicate 112 (i) is illustrated that with message handler it can have client and duplicate 112 (i) execution.
Client 102 (a) is supported following state variable, and " id " is the identifier (for example, the client id 202 of Fig. 2) of client 102 (a), and " resp " is what to be used to store from the response of duplicate, for example the response array 204 of Fig. 2.The operation of one of client 102 (a) initialization request 602 forms one and is used for the request that each is used to control the duplicate of resource access, and it will be carried out by following false code.
Request(CS){
timestamp:=GetLogicalClock();//lamport’s?clock
for?each?R[i]of?CS
SendRequest(R[i],id,timestamp);
}
Client 102 (a) expectation is visited one specific in a plurality of resources, with " CS " expression, that is to say key component in false code.R[i] be used to represent each in a plurality of duplicate, for example, and duplicate 112 (i), it is used to allow the visit to key component." SendRequest " 604 operations that this was illustrated as " divide operation " of request 602 operations are used to carry out the transmission to the request of each duplicate " R[i] ", comprise client " id " and come from the markers of clock.
Duplicate 112 (i) is supported aforesaid following state variable: C Owner, the owner of client; And T Owner, be C OwnerValue.A formation is used to the storage request.Based on the request that receives from client 102 (a), duplicate 112 (i) is carried out this OnRequest606 operation, the following expression of its false code:
OnRequest(C,timestamp){
If(C owner=nil){
C owner:=C;
T owner:=timestamp;
}
else
Queue.Insert(C,timestamp);
SendResponse(C,C owner,T owner);
}
As shown in the false code, duplicate 112 (i) receives and comprises client id, with the request of " C " expression with comprise markers from the request of client 102 (a).Whether this OnRequest606 operation determines the ownership field C of duplicate then OwnerBe empty, if client id is stored in the ownership field, and markers is stored in markers field T OwnerIn.If the ownership field of duplicate is not nil, client id " C " and markers are inserted in the formation by the insertion operation 608 of carrying out queue operation 610.At this OnRequest and/or after inserting the execution of operation 606,608, duplicate 112 (i) is carried out SendResponse operation 612 to client 102 (a), the value (C of " C " ownership field and markers field Owner, and T Owner).
Based on the one or more responses that receive from duplicate 112 (i), client 02 (a) initialization OnResponse614 operation, it can be expressed as follows:
OnResponse(R[i],owner,timestamp){
resp[i].owner:=owner;
resp[i].timestamp:=timestamp;
As shown in the false code, this OnResponse614 operation can be corresponding to the location storage response of the respective array of corresponding duplicate 112 (i) and markers that should response.
The OnResponse614 operation continues to calculate a victor then, shown in following false code:
if(enough?response?received){
winner:=Compute?Winner();
if(winner=self) //case1
return?success;
As front description relevant among Fig. 4 with as shown in the false code, client 102 (a) is at first calculated the permission whether client 102 (a) " wins " access resources.If have, client 102 (a) therefore is apprised of.If no, the execution of OnResponse614 operation continues as follows:
else?if(winner=nil){//case3
for?each?resp[i].owner?is?self{
SendYield(R[i],id);
Clear(resp[i]);//reset?the?state
}
}
//case2:some?one?else?wins,then?wait
}
}
Describe as the relevant front in the Figure 4 and 5, if there is not client to win visit to specific resource, that is to say, specific part (CS), this SendYield616 of client 102 (a) initialization operates and sends output message to the duplicate 112 (i) that is had by client 102 (a).This client 102 (a) is waited for if another client is won.The state that client 102 (a) is then reseted it receives extra response.
This duplicate 112 (i) is carried out an OnYield618 operation corresponding to output message, and this operation can be expressed as follows:
OnYield(C){
If(C=C owner){
Queue.Insert(C,T owner);
RespQueue();
}
}
RespQueue(){ //helper?routine
<C owner,T owner>:=Queue.Front();
SendResponse(C owner,C owner,T owner);
Queue.Remove(C owner);
}
As shown in the false code, if duplicate 112 (i) is had by client 102 (a), be inserted in the formation from the value of ownership and markers file, a new victor is calculated.This OnYield618 operation can one of initialization utilize the RespQueue of a set of queue operation 610 to operate.For example, a QueueFront620 operation is carried out to decide first and is done old inlet in the formation, for example, relies on the markers that detects each inlet.This SendResponse612 operation is performed then and is used for sending another response, to select the client of appointment from the formation of QueueFront620 operation.Moving 622 operations is performed then to be used for shifting the client that this has been selected from formation, to be used for being included in the C of duplicate 112 (i) OwnerAnd T OwnerField.
Client comprises that also one discharges 624 operations, can utilize following false code to represent:
Release(CS){
For?allR[i]of?CS
SendRelease(R[i],id);
}
This release 624 operations are performed to be used for the discharging ownership of duplicate or to shift the corresponding request that forms and sent by the client of formation.For example, duplicate, based on the reception of the information of release,, may carry out an OnRelease626 operation, can be expressed as follows:
OnRelease(C){
if(C=C owner){
C owner:=nil;
if(not?Queue.Empty())
RespQueue();
}
else?if(Queue.Contains(C))
Queue.Remove(C);
}
Shown in above false code, if duplicate 112 (i) is had by client 102 (a), this client 102 (i) is by from C OwnerAnd T OwnerRemove in the field.In addition, this QueueEmpty630 operation is performed to use and determines whether that formation is empty.If client 102 (a) is not the current owner of duplicate 112 (i), then this QueueContains632 operation is performed to determine whether that formation comprises the request from client 102 (a), if, then QueueRemove622 operation is performed to move this request, for example from the ID and the markers of the client of formation.
Duplicate also can be configured to be used for voting for sharing of corresponding available resources.For example, if all legal members from DHT, each member can change the communal space ballot to them into.Therefore, if this client aggregated gross score be all spaces of f=m/n, then most unanimities have just been reached.Therefore, when the identical right of reservation is adjusted clubbable variation, do not need the duplicate that specifies number.
Failure in environment
Mutual exclusion agreement described above can be used to addressing failure in the environment 100 of Fig. 1.For example, after conflict, a duplicate may be permitted ballot (that is to say, send a new response) and be given a new user, no matter for aforesaid client, how the fact realizes.Therefore, this ratio m/n can be raised to reduce the possibility that fail safe destroys.In another example, each inlet in formation may be lost, and that may cause response that will can not arrive of a client awaits.For the such example of addressing, the duplicate memory will be utilized an information compensation device of discussing and rebulid in following part.In further example, utilize the active client of specific resources, that is to say that CS is withdrawing from preceding collapse, this will cause " obstruction " of duplicate.Therefore, duplicate will be ratified having the authority of renewable client of renting.When lease expiration, duplicate is with the authority of the next client (if there is) in the approval queue.And in another example, a middle insecure communication also will cause identical problem with duplicate in client.
Information compensation
Information compensation is one and can be used to when not overloading another duplicate of not restarted, and rebuilds the device of a duplicate rebooting status.Based on a request, an expectation of duplicate prediction stand-by period T wAnd it is conveyed to client.This expectation stand-by period notice client that is to say in the wait long ago of another inlet, sends out request again.For example, T wA tester be T w=T CS* (P+1/2), wherein, P is the position of client in formation, T CSBeing the average duration of CS, according to the observation of duplicate, is the internal time between any two continuous releasing operations.The 1/2 current owner who is used to compensate duplicate in equation.In one embodiment, T wReception according to each inlet is upgraded.
The use of this information compensation device can be configured to " normally " operation that it does not interfere client and duplicate.For example, suppose the not collapse of this duplicate.If client received a response before predetermined inlet, minimum additional resource is utilized by client.In addition, if the client retry that is to say re-send request may, the T of this suggestion wMay be just inaccurate.Under these circumstances, client is upgraded T with retry wTherefore, if duplicate accomplishes that by reseting this formation just is reconstructed into and the similar order of previous order then.
Typical calculation equipment
Described here various parts and function are all performed by a plurality of independent computers.Fig. 7 shows the parts of the exemplary of a computing environment 700, comprises a computer, relates to relevant label 702.This computer 702 from a plurality of clients 102 (a) and a plurality of calculation element 104 (1)-104 (B) of Fig. 1 may be identical or different.At these parts shown in Fig. 7 only is example, can not be understood that the qualification to function of the present invention; The present invention must be based on feature shown in Figure 7.
Usually, multiple general or specially can be employed with computer system configurations.For example be suitable for being used for the known computing system invented, environment and/or configuration, but be not limited to, personal computer, server computer, portable or laptop devices, multiprocessing system, microprocessing systems, set top box, become electric equipment, network PC, the ready network equipment, minicom, mainframe computer comprises the distributed computing environment (DCE) of all said system and device, or the like.
The function of computer can embody in a lot of situations according to computer instruction, and for example software section is carried out by computer.Usually, software section comprises sequential, program, and object, element, data structure, or the like, can carry out specific task and carry out specific abstract data type.Task one can be carried out by the teleprocessing device that connects by communication network.In distributed computing environment (DCE), aforementioned as relevant Fig. 1 and 6, software section can be positioned on the Local or Remote computer-readable storage medium.
This instruction and/or software section can be stored in the different time can be computer any part and can be by on the diversified computer-readable medium that computer read.Program is typically distributed, for example, at floppy disc, CD-ROM, DVD, the perhaps communication media of various ways, for example a modulation signal.From here, they are mounted or are loaded in the second memory of computer.When carrying out, they partly are loaded in the original electrical storage of computer.
For convenience of explanation, program and other executable program parts, for example operating system is illustrated as discrete area here, although being considered to such program, it is present in the different memory units of computer in the different time with parts, and performed by the data processor of computer.
Computer 702 typical cases comprise multiple computer-readable medium.Computer-readable medium can be any usable medium that can be visited by computer 702, and comprises volatibility and non-volatile media, removable and removable medium not.By example, but be not limited to, computer-readable medium may comprise computer-readable storage medium and communication media." computer-readable storage medium " comprises volatibility and non-volatile, and removable and removable medium not can be by any stored information that is used for, computer-readable instruction for example, data structure, program module or other data, method or technology carry out.Computer-readable storage medium comprises, but be not limited to RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, Digital video disc (DVD) or other optical disc storage, magnetic holder, tape, magnetic disc store or other magnetic memory apparatus, or any other medium that can be used to store expectation information and can be visited by computer 702.Computer media is embodied in computer-readable instruction, data structure, and program block or other data in modulated data signal are as a carrier wave or other transmitting devices with comprise any information transmitting medium.This term " modulated data signal " means that has one or more its feature setting and signals that can change with the form according to the code information in the signal.By example, but be not limited to, communication media comprises wire medium, for example cable network or straight line connector and wireless medium, sound for example, RF, ultrared or other wireless medium.Above-mentioned combination arbitrarily is also contained in the scope of computer-readable medium.
System storage 706 comprises with volatibility and/or nonvolatile memory, for example the form of read-only memory (ROM) 710 and random asccess memory (RAM) 712 and the computer-readable storage medium that exists.A basic input/output 714 (BIOS) comprises the Basic application that helps transmission information between each parts in being present in computer 702, for example, when starting, is typically stored among the ROM710.RAM712 typically comprises data and/or software section, can be by zero access and/or soon by processing unit 704 processing.By example, but be not limited to, Fig. 7 has illustrated operating system 716, application program 718, software section 720 and routine data 722.
This computer 702 also may comprise other movably/immovable, the computer-readable storage medium of volatile, nonvolatile.Only pass through example, Fig. 7 has illustrated a hard disk drive 724, read or write immovable, non-volatile magnetizing mediums, a disc driver 726, read or write one movably, non-volatile disk 728 and a CD drive 730 read or write one movably, non-volatile CD 732, for example CD-ROM or other optical mediums.Other can in typical operating environment, use movably/immovable, volatibility/non-volatile computer-readable storage medium includes, but are not limited to cassette, flash card, general digital dish, digitlization video tape, solid-state RAM, solid-state ROM, or the like.This hard disk drive 724 is typically by a non-volatile memory interface, data media interfaces 734 and be connected in system bus 708 for example, simultaneously, disc driver 726 typically is connected with system bus 708 by a packaged type memory interface with CD drive 730.
This driver that above-described and Fig. 7 is illustrated and their related computer-readable storage medium are provided for the computer-readable instruction of computer 702, data structure, the storage of software section and other data.At Fig. 7, for example, hard disk drive 724 is illustrated as storage operating system 716 ', application program 718 ', software section 720 ' and routine data 722 '.Note, these parts can with operating system 716, application program 718, software section 720 and routine data 722 are identical or different.Operating system 716 ', application program 718 ', software section 720 ' has provided different numerical chracters here with routine data 722 ' and has illustrated, and they are different copies at least.The user can give computer 702 input commands and information by input unit.Input unit is keyboard 736 and indicating device (not shown) for example, is usually directed to mouse, tracking ball, or touch pad.Other input unit may comprise energy source device (for example, providing the loudspeaker 738 or the camera 740 of data flow), joystick, and game mat, satellite dish, scanner, or the like.The input equipment of these and other is connected to processing unit 702 by an input/output interface (I/O) that is coupled in data/address bus usually, but, also can be connected in other interfaces and bus structures, for example parallel port, game port, or universal serial bus structural (USB).The display unit of display 744 or other types also is connected to bus 708 by an interface, and for example video adapter 746.Except display 744, the translating equipment (for example, loud speaker) that computer can also comprise other and one or more printers that can be connected by I/O interface 742.
This computer can be connected with the logic of one or more remote computers and moves in a network environment by utilizing, for example, and a remote equipment 750.This remote equipment 750 can be a personal computer, the network ready device, and server, router, network PC, peer devices or other common network nodes are with the element that comprises that typically a plurality of or all and above-mentioned computer 702 is relevant.Logic described in Fig. 7 connects and comprises 752 and wide area networks of a local network (LAN) (WAN) 754.Although at this WAN shown in Fig. 7 is Internet, this WAN754 can also comprise other networks.Such network environment is in office, and enterprise computer network is very general in the Intranet.
In the time of in being used in the lan network environment, computer 702 is connected in lan network 752 by a network interface or adapter 756.In the time of in being used in the WAN network environment, computer 702 typically comprises a modulator-demodulator 758 or other the equipment that is used for setting up communication on Internet 754.Modulator-demodulator 758 can be inner or outside, is connected in data/address bus 708 by an I/O interface or other suitable devices.In a network environment, the program block that described and computer 702 are relevant, perhaps part wherein can be stored in the remote equipment 750.By example, but be not limited to, Fig. 7 has illustrated the remote software parts 760 that belong to long-range look younger generation 50.It is typical that network shown in being appreciated that connects, and other are used for setting up the means that communication connects at intercomputer and also can be used to.
Conclusion
The mutual exclusion techniques that has been described can utilize the consistent system dynamics of handling in the peer-to-peer network with a required majority of logic copy product.Can be utilized to stop variation in network stand-by period and contention by described technology provides in the accurate consistency between client and the duplicate and collaborative here.This mutual exclusion techniques is addressing failure also, for example relies on and utilizes information compensation.
Be specific architectural feature and/or method behavior although the present invention describes in words, be appreciated that defined the present invention must be as the qualification of described special characteristic or behavior in accessory claim.On the contrary, this specific feature and behavior stand confessed as the typical way of realization of claim of the present invention.

Claims (29)

1, a kind of method that is used at the network shared resource comprises:
In in a plurality of logic copy product each, receive a request from client, wherein:
Each described logic copy product is configured to special use and is connected in a described client;
Each described logic copy product comprises a formation;
Described request is with one that visits in a plurality of resources; And
Described client is in a plurality of clients;
When one in described a plurality of logic copy product is connected to another client by special use, request is stored in the formation of these logic copy product;
Each described logic copy product forms a response in order to convey to client, and wherein each described response is used for determining whether that by client the visit to a described resource is allowed to; And
When another client was allowed to, client awaits came from another secondary response of each described logic copy product.
2, the method for claim 1, the special use of wherein said response recognition logic duplicate connects.
3, method as claimed in claim 2, wherein:
When client was connected with the legal number in a plurality of logic copy product is special-purpose, client was allowed to visit.
4, method as claimed in claim 2, wherein:
If neither one is allowed in a plurality of clients, then form an output message by a described client at least, be used for:
With the communication of a plurality of logic copy product; With
Make a plurality of logic copy product form the described response of another time.
5, method as claimed in claim 4, wherein the described response of another time is to form from the aforesaid described request that is stored in the corresponding described formation.
6, the method for claim 1, wherein:
A plurality of utilization of resources distributed hashing platform DHT and being cut apart;
DHT is divided into corresponding a plurality of bucket with in a plurality of resources each; With
Described a plurality of bucket is provided by a plurality of calculation elements in the peer-to-peer network.
7, method as claimed in claim 6, wherein a plurality of calculation elements provide the failure filtering function, thereby, its corresponding described bucket can be used by another calculation element when a calculation element that the respective stored bucket is provided is can not utilize the time to client.
8, a kind of method that is used at the network shared resource comprises:
Form a request by one in a plurality of clients, be used for and the communication of a plurality of logic copy product, wherein, this request is used to one of them in a plurality of resources, and each described duplicate comprises a formation, is used to store one or more described requests;
Receive from a plurality of responses in a plurality of logic copy product in described client;
Judge from described a plurality of responses whether client is allowed to utilize this described resource; With
When another client was allowed to, described client awaits a plurality of responses of another time and needn't be sent another request.
9, method as claimed in claim 8, wherein each described response is configured to whether corresponding described logic copy product are had by described client in order to identification.
10, method as claimed in claim 8, wherein:
Each described response be configured in order to identification whether corresponding described logic copy product had by described client and
When described client was connected with the legal number in a plurality of logic copy product is special-purpose, described client was allowed to use a described resource.
11, method as claimed in claim 8, wherein:
Distributed hashing platform DHT becomes a plurality of buckets with a plurality of division of resources;
A plurality of buckets are provided by a plurality of calculation elements in the peer-to-peer network; With
A plurality of calculation elements provide the failure filtering function, thus when a described calculation element that corresponding described bucket is provided be can not utilize the time to a plurality of clients, another described calculation element can be used its corresponding described bucket.
12, method as claimed in claim 8, wherein:
Each request in described formation is organized by the time that respective logic duplicate is received according to request.
13, a kind of method that is used at the network shared resource comprises:
Each client in a plurality of clients forms one of them a request that is used in a plurality of resources, is used for and the communication of a plurality of logic copy product;
In a plurality of responses of described a plurality of clients receptions from described a plurality of logic copy product; With
Utilize described a plurality of response to judge that one in described a plurality of client whether is allowed to utilize this described resource in each client;
When a client was allowed to access resources, one or more other client awaits that are not allowed to extra a plurality of described response; With
When neither one is allowed to utilize this described resource in described a plurality of clients, form an output message by at least one described client, be used for:
With the one or more communications in described a plurality of logic copy product; With
Make in one or more described logic copy product each from store aforesaid from one or
Form the described response of another time in the respective queue of the request that a plurality of clients receive.
14, method as claimed in claim 13, wherein:
Each described response is configured to whether corresponding described logic copy product are by special-purpose of being connected in a plurality of clients in order to identification;
Aforementioned request in each formation is to be organized by the time that respective logic duplicate receives according to aforementioned request; With
Described output message makes one or more described logic copy product discern ownership based on the aforementioned the earliest request in the respective queue in other response.
15, method as claimed in claim 14, wherein this output message makes each select a different described client by the described logic copy product that described client had based on corresponding described formation at least.
16. method as claimed in claim 13, wherein when one in a plurality of clients with a plurality of logic copy product in legal number during special-purpose the connection, this client is allowed to the utilization of a described resource.
17. method as claimed in claim 14, wherein:
A plurality of utilization of resources distributed hashing platform DHT and being cut apart;
This DHT becomes a plurality of buckets with a plurality of division of resources;
A plurality of buckets are provided by a plurality of calculation elements in the peer-to-peer network; With
A plurality of calculation elements provide the failure filtering function, thus when a described calculation element that corresponding described bucket is provided be can not utilize the time to a plurality of clients, by another described calculation element its corresponding described bucket can be used.
18. a system that is used at the network shared resource comprises:
A network;
Be connected in the client of network a plurality of communication-types; With
Be connected in the calculation element of network a plurality of communication-types and comprise a plurality of logic copy product; Each logic copy product wherein:
Be configured to and exclusively be connected in a plurality of clients one at any one special time;
Comprise a formation, when the logic copy product were connected in another client by special use, described formation was used to store the request in order to access resources that derives from a client; And
Be configured to form response to described request;
Wherein each described client is configured to judge whether that according to each described response this client is allowed to visit a resource, if not, and the then described response of this another time of client awaits.
19. system as claimed in claim 18, wherein another client is specified in the response of logic copy product formation.
20. system as claimed in claim 18, wherein:
Each described logic copy product further is configured to form request responding, and when described client has this logic copy product to this response identification;
When a described client is connected with the legal number in a plurality of logic copy product is special-purpose, permit obtained.
21. system as claimed in claim 18, wherein:
Each described logic copy product further is configured to form a response and gives an appointment whether described client and the special-purpose connection requests of logic copy product.
22. system as claimed in claim 18, wherein:
Each described logic copy product further is configured to form to request responding, and whether a described client is connected with the logic copy product are special-purpose this response identification;
With
If neither one is allowed in a plurality of clients, then form an output message by a described client at least, be used for:
With the one or more communications in a plurality of logic copy product; With
Make in one or more described logic copy product each from be stored in aforesaid respective queue from the request that one or more clients are accepted, form another described response.
23. system as claimed in claim 18, wherein:
A distributed hash table becomes a plurality of buckets with a plurality of division of resources;
A plurality of buckets are provided by a plurality of calculation elements in the peer-to-peer network; With
Described a plurality of calculation element provides the failure filtering function, thus when a described calculation element that corresponding described bucket is provided be can not utilize the time to a plurality of clients, by another described calculation element its corresponding described bucket can be used.
24. system as claimed in claim 18, wherein:
Each described logic copy product uses an information compensation device that an expectation stand-by period that is used to receive a response is provided; With
This expectation stand-by period is defined as a corresponding client and is retransmitting a period of time of being waited for before the corresponding request.
25. system as claimed in claim 18, wherein said network is a peer-to-peer network.
26. system as claimed in claim 25, wherein each described logic copy product be one can be by the performed peer of one or more calculation elements.
27. system as claimed in claim 18 is to being used to utilize the one or more visit in a plurality of resources that a distributed hash table cuts apart to the visit of resource wherein.
28. a system that is used at the network shared resource comprises:
Be used to form the device of a plurality of requests that are used for a resource, this device comprises a plurality of clients;
Be used for connecting the described device that is used to form the device of a plurality of requests that are used for a resource of networking a communication;
Be used to provide the device of resource, wherein this device is connected in described network equipment by communication and comprises a plurality of logic copy product devices, wherein each described logic copy product:
Be used to form the response to each of described a plurality of requests, which formation device of described response identification has a corresponding logic copy product device; And
Comprise a formation that is used to store one or more described requests;
Wherein each response is used to determine whether allow the described resource of visit by a client; And
When another client was allowed to, client awaits was from another secondary response of each described logic copy product device.
29. system as claimed in claim 28, wherein:
Describedly be used to provide the device of resource to comprise:
The calculation element that a plurality of communications connect is to form a peer-to-peer network; With
A distributed hash table.
CN200510064089A 2004-02-25 2005-02-25 Mutual exclusion system and method in dynamic peer-to-peer environment Expired - Fee Related CN100581109C (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US60/547,457 2004-02-25
US10/886,794 US7526672B2 (en) 2004-02-25 2004-07-08 Mutual exclusion techniques in a dynamic peer-to-peer environment
US10/886,794 2004-07-08

Publications (2)

Publication Number Publication Date
CN1719771A CN1719771A (en) 2006-01-11
CN100581109C true CN100581109C (en) 2010-01-13

Family

ID=35931504

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200510064089A Expired - Fee Related CN100581109C (en) 2004-02-25 2005-02-25 Mutual exclusion system and method in dynamic peer-to-peer environment

Country Status (1)

Country Link
CN (1) CN100581109C (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB201607477D0 (en) * 2016-04-29 2016-06-15 Eitc Holdings Ltd A method and system for controlling the performance of a contract using a distributed hash table and a peer to peer distributed ledger

Also Published As

Publication number Publication date
CN1719771A (en) 2006-01-11

Similar Documents

Publication Publication Date Title
JP4837929B2 (en) Mutual exclusion technique in dynamic peer-to-peer environment
US8914333B2 (en) Systems for storing files in a distributed environment
CN101601027B (en) Synchronization framework for occasionally connected applications
CN109426949B (en) Cross-chain transaction method and device
CN101627581B (en) Conflict resolution for multi-master synchronization of data for distributed devices
CN1681257B (en) Routing in peer-to-peer networks
CN110399338B (en) Distributed file index system and method based on block chain and cloud storage server
TWI378360B (en) Retrieving a replica of an electronic document in a computer network
US7533134B2 (en) Systems and methods for the propagation of conflict resolution to enforce item convergence (i.e., data convergence)
CN100588203C (en) Data storage method and system
CN102035886B (en) Consistency within a federation infrastructure
Cuenca-Acunam et al. Autonomous replication for high availability in unstructured P2P systems
JP2003281140A (en) Contents delivery method and delivery system
Akbarinia et al. Data currency in replicated DHTs
US11620087B2 (en) Implicit leader election in a distributed storage network
CN110598373B (en) Copyright verification method, system and storage medium
JP5395517B2 (en) Distributed data management system, data management apparatus, data management method, and program
CN100581109C (en) Mutual exclusion system and method in dynamic peer-to-peer environment
CN110231915A (en) Data managing method, system, device, computer equipment and storage medium
US20080162588A1 (en) Repository synchronization in a ranked repository cluster
CN113704024A (en) Data processing method, device, related equipment and storage medium
CN103618700A (en) Method for determining leader server in server system and server system
CN113114761B (en) Data sharing exchange excitation system and method based on distributed service
JP2006107118A (en) Byzantine fault-tolerant file-sharing response speed-up method in p2p environment
CN117171269A (en) Node data synchronization method based on block chain and related equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100113

Termination date: 20140225