Implementing operation serialization to achieve consistent messaging across distributed data structures

By employing total order broadcast and merging tree techniques, the problems of operation order reception and data synchronization in distributed systems are solved, achieving efficient operation execution and data management, supporting document branching and online collaboration, and providing a fast loading time and low-latency user experience.

CN113785281BActive Publication Date: 2024-10-29MICROSOFT TECHNOLOGY LICENSING LLC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202080032799.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-07
Publication Date
2024-10-29
Estimated Expiration
2040-04-07

AI Technical Summary

Technical Problem

In fault-tolerant distributed systems, existing technologies struggle to ensure that multiple distributed processes receive operations in the same order, and the completion or rollback processing of operations at each node is not efficient enough.

Method used

It adopts a total order broadcast mechanism, assigns a sequence number to each operation through a centralized serialization process, provides access to the distributed data structure in the collaborative session, uses synchronization services and peer-to-peer protocols to ensure that operations are completed in sequence on all nodes, and manages the synchronization and conflict resolution of the data structure through a merge tree mechanism.

Benefits of technology

It enables the orderly execution of operations and efficient synchronization of data structures in distributed systems, provides a fast loading time and low latency user experience, supports document branching and online collaboration, simplifies implementation methods, and reduces storage and processing requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113785281B_ABST
    Figure CN113785281B_ABST
Patent Text Reader

Abstract

The disclosed embodiments provide collaborative access to distributed data structures. Operations such as inserts, deletes, and annotations are performed by individual clients participating in the collaboration. A serialization service enforces a single order for these operations and ensures that these operations and order are communicated to all clients participating in the collaboration. Once all clients have confirmed a particular operation, that information is also communicated to all clients in the client so that the clients can perform maintenance activities on the collaborative data structure. The result is a scrolling collaboration window shared by all clients in the collaboration, where the bottom of the collaboration window is defined by the lowest-ranked operation that has not yet been confirmed by all clients in the collaboration and the highest-ranked operation assigned by the serialization service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to cooperative access to distributed data structures. Background Art

[0002] Atomic broadcast or "total order broadcast" can be used in fault-tolerant distributed systems to ensure that multiple distributed processes receive operations in an identical order, regardless of which node in the distributed system initiates each of these operations. Operations can be propagated to each node in the distributed system so that each operation is completed at each node, or the operation is rolled back at each node. Summary of the invention

[0003] An embodiment of the present invention relates to a computer-readable storage medium comprising instructions, which, when executed by a hardware processing circuit of a first device, configure the first device to perform operations including the following: joining a collaborative session, the collaborative session providing access to a distributed data structure; receiving a first message, the first message identifying consecutive sorting operations on the distributed data structure, each of the identified operations being included in a collaborative window of operations, each operation having pending confirmation; representing a first version of the distributed data structure, the first version being represented as including each operation in the consecutive sorting operations; representing a second version of the distributed data structure to include a first operation, the first operation being sorted after the last operation in the consecutive sorting operations; sending a second message, the second message indicating the first operation and also indicating an association between the first operation and the first version; receiving a third message indicating an updated collaborative window, the updated collaborative window excluding the identified operations; and performing garbage collection based on the excluded operations.

[0004] An embodiment of the present invention also relates to a computing device, comprising: a hardware processing circuit; one or more hardware memories storing instructions, which, when executed, configure the hardware processing circuit to perform operations including the following: joining a collaborative session, the collaborative session providing access to a distributed data structure; receiving a message, the message identifying consecutive sorting operations on the distributed data structure, each of the identified operations being included in a collaborative window of operations, each operation having pending confirmation; representing a first version of the distributed data structure, the first version being represented as including each operation in the consecutive sorting operations; representing a second version of the distributed data structure to include a first operation, the first operation being sorted after the last operation in the consecutive sorting operations; sending a second message, the second message indicating the first operation and also indicating an association between the first operation and the first version; receiving a third message indicating an updated collaborative window, the updated collaborative window excluding the identified operations; and performing garbage collection based on the excluded operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0005] In the accompanying drawings, the same reference numerals may describe similar components in different views, and the drawings are not necessarily drawn to scale. The same numbers with different letter suffixes may represent different instances of similar components. The accompanying drawings generally illustrate various embodiments discussed in this document by way of example and not limitation.

[0006] Figure 1A is an overview diagram of an exemplary collaborative messaging architecture.

[0007] Figure 1B is an exemplary state transition diagram showing how operations move between three states.

[0008] Figure 2A Exemplary message formats of messages exchanged between a collaboration module instance and a synchronization service in one or more of the disclosed embodiments are shown.

[0009] Figure 2B is an overview diagram showing the relationship between messages and a set of sequentially ordered operations.

[0010] Figure 2C An exemplary message communication between two collaboration modules and a synchronization service is shown.

[0011] Figure 2D An exemplary message exchange between a collaboration module instance and a synchronization service is shown.

[0012] Figure 2E is an overview of the snapshot process.

[0013] Figure 3Two data structures are shown that may be used to construct a tree in some of the disclosed embodiments.

[0014] Figure 4 An example of a merged tree portion stored by a collaboration module instance is shown.

[0015] Figure 5 An exemplary merged tree portion stored by a collaboration module instance is shown.

[0016] Figure 6 An updated version of the merged tree portion stored by the collaboration module instance is shown.

[0017] Figure 7 An updated version of the merged tree portion stored by the collaboration module instance is shown.

[0018] Figure 8 Shown from Figure 4 An updated version of the merged tree portion of .

[0019] Fig. 9 An updated version of the merged tree portion stored by the collaboration module instance is shown.

[0020] Fig.10 An updated tree portion stored by a collaboration module instance is shown.

[0021] Fig.11 An exemplary merged tree portion stored by a collaboration module instance is shown.

[0022] Fig.12 A portion of the merge tree is shown indicating confirmation of the insertion.

[0023] Fig.13 The portion of the merged tree stored by the collaboration module instance is shown.

[0024] Fig.14 is a flow diagram of an exemplary process for distributing operations on a distributed data structure to multiple cooperating module instances.

[0025] Fig.15 is a flow diagram of an exemplary process for distributing operations on a distributed data structure to multiple cooperating module instances.

[0026] Fig.16 is a flow diagram of an exemplary process for distributing operations on a distributed data structure to multiple cooperating module instances.

[0027] Fig.17 is a flow chart of an exemplary process for accessing a distributed data structure.

[0028] Fig.18 is a flow chart of an exemplary process for accessing a distributed data structure.

[0029] Fig.19 is a flow chart of an exemplary process for accessing a distributed data structure.

[0030] Fig. 20 is a flow chart of an exemplary process for accessing a distributed data structure.

[0031] Fig.21 is a flow chart of an exemplary process for accessing a distributed data structure.

[0032] Fig. 22 is a flow chart of an exemplary process for accessing a distributed data structure.

[0033] Fig.23 Illustrated is a block diagram of an exemplary machine on which any one or more of the techniques (eg, methodologies) discussed herein may be performed in one or more of the disclosed embodiments.

[0034] Fig.24 is a flow diagram of an exemplary process that may be implemented by a serialization service. DETAILED DESCRIPTION

[0035] The following description and accompanying drawings fully illustrate specific embodiments that can be implemented by those skilled in the art. Other embodiments may incorporate structural, logical, electrical, process and other changes. Portions and features of some embodiments may be included in portions and features of other embodiments, or replace portions and features of other embodiments. The embodiments set forth in the claims include all available equivalents of those claims.

[0036] As described above, a fully ordered broadcast is a technique for ensuring that an operation is completed across each node in a distributed system or is not performed by any of the nodes. The disclosed embodiment utilizes a fully ordered broadcast architecture to provide a collaborative environment for accessing a distributed data structure (DDS). A centralized serialization process defines the order of operations initiated by multiple participants of a collaboration. In at least some aspects, the order can be represented by a sequence number assigned to each operation by a centralized serialization process. Once a sequence number is assigned to an operation, the information defining the operation and its assigned sequence number is distributed to all participants of the collaboration.

[0037] The disclosed embodiments also provide an indication of which operations have been confirmed by all participants in the collaboration and which operations have not yet been so confirmed. Operations confirmed by all participants form the lower bound (exclusively) of a "collaboration window", representing operations that are pending or not fully confirmed between participants. The top of the collaboration window is represented by the most recent or highest ranked operations.

[0038] As the disclosed embodiments operate, the "top" end advances through the higher sequence numbers, and over time, as confirmations of operations are received from each participant individually, the lower end also advances. Thus, the collaboration window represents a "rolling" window of serialized operations on the distributed data structure.

[0039] In the disclosed embodiments, each participant (e.g., a computing device that is part of a collaboration, or an instance of a collaboration module, as discussed further below) is respectively responsible for applying each serialized operation to its own copy of the distributed data structure. Thus, if an operation is initiated by a first participant against a distributed data structure accessed by a collaboration session that includes twenty participants, the operation will be physically performed twenty times on twenty local copies of the distributed data structure, once for each collaboration participant.

[0040] The disclosed embodiments are implemented in part by configuring hardware processing circuits to perform instructions that implement the operations of the disclosed embodiments. For ease of discussion, these instructions are collectively referred to as collaboration modules. Instructions can be instantiated to provide a running software program that can access instructions and data necessary for executing the instructions and functions described herein. The instantiated program is referred to as a collaboration module instance throughout this disclosure. Each collaboration module instance operates to configure the appropriate hardware processing circuit to perform one or more of the functions discussed and attributed thereto herein. Although specific functions can be attributed to collaboration module instances, it is not required to expressly or implicitly indicate that the collaboration module instance includes instructions for implementing all of the functions described herein. On the contrary, when a specific function is attributed to a collaboration module instance, the collaboration module instance only needs to include instructions necessary for implementing the specific function.

[0041] Some of the disclosed embodiments provide a next generation architecture for collaborative text editing. To be successful, these improvements should provide fast load times, low latency for change propagation, provide a smooth user experience, and be highly scalable at a reasonable cost. This next generation architecture should also provide a scalable context while also providing a relatively simple implementation, for example, by providing a stateless operating mode. The next generation architecture should integrate intelligent services with online collaboration and support document branching.

[0042] The disclosed text editing process includes at least three operations: insertion, deletion, and annotation. Because multiple participants in the collaboration may edit the same part of the text at the same time, conflict rules are established to determine how to resolve conflicting edits across collaboration module instances when they are detected. The disclosed embodiments distribute changes occurring at each collaboration module instance to each other collaboration module instance via a single serialization service, which can be implemented via a centralized service, such as the synchronization service discussed below, or via a peer-to-peer protocol.

[0043] The serialization service assigns a sequence number to each operation and distributes each of these operations to all participants in the collaboration. When a particular operation has been successfully distributed to each collaboration module instance, the serialization service also notifies all of these collaboration module instances so that all collaboration module instances can fully merge the operation into their permanent copies of the distributed data structure (e.g., move the bottom of the collaboration window forward in the order of operations). Where appropriate, messages between collaboration module instances participating in the collaboration and the serialization service can be encrypted to ensure secure communication.

[0044] The disclosed embodiments may be implemented using a publish / subscribe data pattern. For example, Syphon is a highly available and reliable distributed publish / subscribe system built using Apache Kafka and may be used in some of the disclosed embodiments. The disclosed embodiments may provide a variety of different types of distributed data structures, including lists, maps, sequences, and streams. In some aspects, these data structures may be implemented via merge trees.

[0045] The disclosed embodiments provide a collaborative model that achieves a consistent state across all collaborative module instances. Changes are replicated optimistically because they are distributed to the collaborative module instances as they occur and then reversed in the rare event that the operation cannot be distributed to all collaborative module instances in the collaborative collaboration. The disclosed embodiments provide immediate local application of local changes, thereby achieving low latency for interactive environments. In addition, the operation primitives provided by the disclosed embodiments can provide for building more complex distributed data structures, such as rich strings, tables, counters, graphs, and other types of distributed data structures.

[0046] Some embodiments provide for using a merge tree to represent a shared document structure. The disclosed merge tree implementation delegates the integration of changes from all collaboration module instances participating in the collaboration to each individual collaboration module instance. While this results in duplication of each operation across each collaboration module instance, it also reduces the processing requirements for synchronization services. The merge tree supports hierarchical rich text structures, such as nested tables, and implements multi-stream text with cross-references, such as footnotes. Some of the disclosed embodiments provide intelligent services that can efficiently cache information in a merge tree and reference merge tree positions in both space (position in text) and time (position in revision history).

[0047] The disclosed merge tree provides branching, merging, and continuous integration from another branch of the tree. The merge tree can use storage efficiently and provide retrieval of points in the history of a shared merge tree structure. Joining of a collaboration session is facilitated by providing a copy of the recorded document and any pending changes to the joining collaboration module instance. The disclosed embodiments can provide local garbage collection, which results in stable memory usage and compact storage. The disclosed merge tree provides constant time and space requirements for operation processing in a synchronization service, which results in cost-effective synchronization service deployment.

[0048] The disclosed implementation also provides improved performance for local operations because local operations take into account the total length of the data structure under collaboration. These embodiments can provide equivalent representations between local models and collaborative models, which is in contrast to Google's operational transformation (OT) and conflict tree replication data type (CRDT) embodiments that provide split representations. This simplifies the implementation relative to OT and CRDT. The disclosed embodiments further provide a simplified undo / redo architecture. By traversing the tree upward to identify the correct position / range, information supporting undo / redo operations can be read directly from the fragments of the merge tree. Change tracking is also inherent in the disclosed merge tree because the merge tree fragments are directly mapped to each change made to the underlying collaborative data structure. In addition, given that the merge tree has few internal nodes, the tree is relatively fast to clone. The final observation is that the disclosed embodiments provide improved performance for common operations such as insertion, removal, and annotation, while having performance that is no worse than other methods for more complex and less common operations.

[0049] Figure 1A is an overview diagram of a collaborative messaging architecture. Collaboration system 100 shows two users 101a-b collaborating via separate computing devices 102a-b, respectively. Distributed data structure views 103a-b are shown to the two users 101a-b on display screens 104a-b, respectively. Figure 1A The collaborative messaging architecture shown in facilitates propagation of edits made by any of the users 101a-b to a distributed data structure (at least a portion of which is shown by views 103a-b) to other participants (eg, devices and / or collaboration module instances) in the collaboration. Figure 1A Only two users are shown, but the disclosed embodiments contemplate collaboration by any number of users / devices / collaboration module instances.

[0050] Figure 1AAlso shown are two collaboration module instances 105a-b. Each of the collaboration module instances 105a-b represents a set of instructions and data stored on a non-transitory computer-readable storage medium. The instructions in the collaboration module instances 105a-b configure each of the client devices 102a-b to perform one or more of the functions described herein. In some aspects, each collaboration module instance participating in a particular collaboration will run on a different physical device. In some cases, multiple collaboration module instances can run on a single physical device. In some aspects, one or more of the collaboration module instances 105a-b can be run on a device other than the client devices 102a-b ( Figure 1A 102a-b), but can still receive input from and provide output to client devices 102a-b. In some aspects, collaboration module instance 105a can be run, for example, on a computer that also runs synchronization service 106.

[0051] The term cooperating module is not intended to limit the features disclosed herein in any way, but is merely used as a notational convenience to refer to those collective features. For example, it is not intended to require that all instructions implementing a claimed feature reside on a single storage device or a single computing device, or be physically contiguous, for example.

[0052] In a hypothetical example of the collaboration system 100, user 101a can edit the distributed data structure view 103a. The locally edited data is immediately displayed on the display screen 104a of user 101a by the collaboration module instance 105a. In addition, the collaboration module instance 105a sends a message 110a to the synchronization service 106. The message 110a indicates the nature of the editing operation performed by the user 101a. For example, the message 110a can indicate whether the operation is an insert operation, a remove operation, or an annotation operation. The message 110a can also indicate the insertion point of the insert operation. In other words, the location where the data is inserted within the distributed data structure view 103a. If the operation is a remove operation, the message 110a indicates the scope of the distributed data structure data that is removed. The message 110a also indicates the reference serial number of the operation. The reference serial number is a serial number that identifies the version of the distributed data structure on which the operation is being performed when the user 101a (and the device 102a) performs the subject operation.

[0053] Upon receiving the message 110a, the synchronization service 106 generates a sequence number for the operation defined by the message 110a. The synchronization service 106 then broadcasts a message identifying the operation performed by the user 101a (and the computing device 102a) to each of the collaboration modules 105a-b participating in the collaboration. Figure 1AIn the example of , this includes both collaboration modules 105a-b. In some embodiments, the broadcast may be an actual broadcast network message using a broadcast destination address. In other embodiments, the broadcast may include two or more unicast or multicast messages commonly addressed to each collaboration module participating in the collaboration system 100. The broadcast messages are shown as messages 120a and 120b. In some cases, a broadcast message (e.g., in Figure 1A In the example of 120a and 120b, it can also indicate that each collaboration module participating in the collaboration has been notified of the operation initiated by the device 102a. Figure 1A As shown, separate broadcast messages (collectively shown as messages 130a and 130b) may indicate that the operation initiated by user 101a (and computing device 102a) has been successfully propagated to all collaboration modules participating in the collaboration.

[0054] exist Figure 1A In the illustrated embodiment, the synchronization service 106 implements a common order of operations across all operations occurring on the distributed data structure, regardless of which collaboration module initiates the operation. Therefore, in some cases, the local order of operations may be different from the order of operations implemented by the synchronization service. In order to resolve the difference between the local order of operations and the common order of operations across all collaboration modules participating in the collaboration, the disclosed embodiments provide conflict rules to resolve these differences. For example, in some embodiments that maintain a string-oriented distributed data structure, an insert operation with a larger sequence number (occurring later than the second insertion in the public order) is placed in the string earlier than the second insertion. In other cases, two deletions initiated by two different collaboration modules may overlap. Some embodiments resolve overlapping deletions by determining that the deletion with an earlier (e.g., smaller) sequence number operates to perform the deletion while the overlapping portion of the later deletion has essentially no effect.

[0055] Although the collaboration system 100 is discussed above with reference to the synchronization service 106, in some other embodiments, a peer-to-peer protocol may be used to enforce the order of operations.For example, some embodiments may assign sequence numbers to data based on an open source library such as orbitDB.

[0056] The above-described collaboration system enables each edit to the distributed data structure views 103a-b to transition to up to three different states maintained by at least one of the collaboration modules 105a-b.

[0057] Figure 1B is a state transition diagram showing how operations move between the three states. Figure 1BThe first state 155, named "local only", in the example represents the state of an operation where a local edit has been performed by a collaboration module (e.g., 102a) but the edit has not yet been acknowledged (e.g., via message 120a) by the synchronization service 106. The operation exists in the first state 155 only on the collaboration module that initiated the operation. The operation will be initiated on a second collaboration module that is in the second state instead of the first state.

[0058] When the operation / edit has been confirmed by the synchronization service 106 (e.g., via messages 120a and / or 120b), the operation is in a second state 160. This second state of the edit may exist at collaboration modules other than the collaboration module that performed or caused the edit. When all collaboration modules have confirmed the edit and the indication of the edit has been propagated to the collaboration modules via the synchronization service 106 (e.g., via messages 130a or 130b), the edit is in a third state 165, at which the edit is completed. Figure 1B The third state is called the "sync" state, which exists on the collaboration module. This third state can be considered a "sync" state because the operation has been synchronized across the collaboration modules and it may no longer be necessary to track the edited information because the edited data is considered "recorded" within the distributed data structure.

[0059] The disclosed embodiments process edits or operations on a distributed data structure in a well-defined order through a collaboration module. The synchronization service 106 defines the order of operations by assigning a unique sequence number to each operation. When each edit or operation is assigned a sequence number that identifies the operation itself, the edit operates on a specific version of the distributed data structure. The specific version can be identified by a second sequence number that is different from the sequence number assigned to the edit or operation. Throughout this disclosure, the second sequence number can be referred to as a reference sequence number for the edit / operation.

[0060] Below is an operational example of the difference between sequence numbers of operations and reference sequence numbers. Specifically, after a first operation identified by a first sequence number is applied to a distributed data structure, the resulting version of the distributed data structure can be identified by the first sequence number. The first sequence number defines a first "version" of the distributed data structure. A second operation defined by a second sequence number will modify the first "version" of the distributed data structure, which includes the modifications caused by the first operation (e.g., the result of the first operation). The result of this second modification is a second version of the distributed data structure. Further subsequent operations defined by additional sequence numbers will further modify the distributed data structure to form additional new "versions" defined by those sequence numbers.

[0061] Based on the sequence numbers of the operations and the version of the distributed data structure on which it operates, each collaborating module can correctly apply operations initiated at other collaborating modules to its own copy of the distributed data structure. This is possible even when multiple collaborating modules may be modifying the distributed data structure "simultaneously", and even when some collaborating modules may lag behind in synchronizing with the evolving version of the distributed data structure.

[0062] This is achieved via two rules. First, if an operation is initiated by a local collaboration module, subsequent operations initiated by the local collaboration module operate on the version of the distributed data structure that includes the modifications caused by the first operation. In other words, collaboration module operations are executed in sequence, without exception. In addition, local operations apply all remote operations regardless of sequence number.

[0063] With respect to applying a particular remotely initiated modification at a local device, the local device may consider only those operations for which notification has been received. When applying a particular operation to a distributed data structure, operations (both local and remotely initiated) having lower reference sequence numbers are relevant compared to the operation sequence numbers of the remotely initiated operation. At the initiating device, at the time it initiates the particular operation, the operation having the higher operation sequence number is not visible and therefore is not relevant in determining how to apply the particular operation to the distributed data structure.

[0064] Figure 2A 1 shows an exemplary message format of messages exchanged between collaboration module instances (e.g., 105a-b) and synchronization service 106 in one or more of the disclosed embodiments. In some aspects, any of messages 100a, 120a-b, and 130a-b may include the following information about Figure 2A One or more of the fields in question.

[0065] Message 200 includes a collaboration identifier field 202, a reference sequence number field 204, an operation sequence number field 206, an operation type field 208, an operation range field 210, an operation data field 212, and a maximum sequence number field 214. The collaboration identifier 202 uniquely identifies the collaboration module participating in the collaboration. The collaboration identifier 202 identifies the collaboration module that initiates the operation identified by the message 200. In some aspects, when the collaboration module joins the collaboration, the distribution server assigns an identification number to each collaboration module. The reference sequence number field 204 identifies the version of the distributed data structure to which the operation identified by the message 200 (via field 206) is applied. Therefore, each version of the distributed data structure maintained by the collaboration module is identified via a different reference sequence number. When a modification is made, the reference sequence number 204 identifies the data segment synchronized at the collaboration module (identified via field 202).

[0066] The operation sequence number field 206 identifies the sequence number of the operation identified by the message 206. When the collaboration module initiating the operation sends a message including the operation sequence number field 206, the operation sequence number field 206 can be set to a predetermined value (e.g., -1) indicating that no sequence number has been assigned. The predetermined value indicates to the synchronization service that the operation identified by the message is new, so the synchronization service assigns a sequence number to the operation. Before the synchronization service 106 assigns a sequence number, the operation can be considered to be in a "local only" state, as described above with respect to Figure 1B As described.

[0067] The synchronization service 106 may assign increasing sequence numbers to new operations in an order consistent with the order in which the synchronization service receives messages identifying those new operations. After the synchronization service 106 assigns a sequence number to a particular operation, messages related to that operation may include the assigned sequence number in the operation sequence number field 206.

[0068] Operation type field 208 indicates the type of operation indicated by message 200. In some embodiments, the operation type may indicate an operation type of one of insert, remove, or annotate, although operations contemplated by the present disclosure are not limited to only these types of operations.

[0069] Operation range field 210 indicates the data range of the distributed data structure operated by the operation. In some aspects, the range is a single value, such as the position of the insert operation in the stream. In some aspects, for example, when the data range in the distributed data structure is deleted, the data range can be indicated.

[0070] The operation data field 212 indicates the data to be applied as part of the operation. For example, if the operation type is insert, the operation data field 212 indicates the data to be inserted.

[0071] The maximum sequence number field 214 can have two different meanings depending on the role of the sender of the field. When field 214 is sent by a collaboration module, field 214 indicates the maximum sequence number received by the collaboration module from the synchronization service 106 or a peer device used to provide serialization of operations when using a peer protocol. When field 214 is sent by the synchronization service 106 or sent to the collaboration module from another collaboration module using a peer protocol for serialization, field 214 indicates the maximum sequence number that has been confirmed by all collaboration modules participating in the collaboration.

[0072] Figure 2B It is shown Figure 2A An overview diagram of the relationship between a message 200 and a set 220 of consecutive sequenced operations. Figure 2B A snapshot 218 of the distributed data structure is shown. The snapshot 218 represents the data values ​​of a particular version of the distributed data structure. Figure 2B Also shown is a set of consecutive sort operations 220 performed on the version of the distributed data structure derived from snapshot 218 .

[0073] Message 200 is also in Figure 2B As shown in Figure 2A Each of the fields in the discussion. Figure 2B It is shown that the operation sequence number field 206 of the message 200 can identify the highest-ordered operation 222 in the set of sequentially ordered operations 220. Note that when the message 200 is received by a collaboration module (e.g., 105a-b), the field 206 identifies the highest-ordered operation 222 because the message 200 indicates that a sequence number has been assigned to the operation. As described above, when the collaboration module initiates an operation, it can set the sequence number field 206 to a predetermined number (e.g., 206) indicating that the operation needs to have a sequence number assigned to it. In this case, Figure 2B Contrary to the example shown in , field 206 may not necessarily identify the highest ranked operation.

[0074] Message 200 also includes a version field 204 that identifies an operation 224 on the distributed data structure. Note that version field 204 identifies a version of the distributed data structure that includes operation 224 and the results of all operations in the operation sequenced below operation 224. In other words, if the value of version field 204 is 950, then that version of the distributed data structure includes the results of operations with sequence numbers 950, 949, 948, 947, and so on. This example assumes that the operations are sequenced so that operations with higher sequence numbers occur after operations with lower sequence numbers. Some embodiments may use an alternative to sequence the operations (e.g., numerically lower sequence numbers indicate sequencing after numerically higher sequence numbers).

[0075] When sent by the synchronization service 106 (or received by the collaboration module from the peer network), the message 200 also identifies the maximum sequence number of operations acknowledged by all collaboration modules participating in the collaboration. The maximum sequence number is indicated by field 214. Some embodiments may perform a garbage collection process 232 for operations following and including operation 226. Operations arranged after operation 226 (e.g., operation 230) have at least one pending acknowledgement. Figure 2BThe pending continuous operations 230 shown in may be referred to throughout this disclosure as a collaboration window. A collaboration window defines operations that have been assigned sequence numbers by the synchronization service 106 (or a peer protocol for serialization) but have not yet been confirmed by all collaboration modules participating in the collaboration. When the disclosed embodiments operate, the collaboration window represents a rolling window as it advances through sequential operations ordered by the synchronization service 106 (or peer protocol), wherein the top of the collaboration window is defined by the most recently assigned or highest ordered sequence number, and the bottom of the collaboration window is defined by the largest sequence number confirmed (uniquely) by all collaboration modules participating in the collaboration.

[0076] Figure 2C Exemplary message communications are shown between two collaboration modules 105a-b and a synchronization service 106. While synchronization service 106 is an example of a synchronization service, other embodiments may use a peer-to-peer protocol to facilitate serialization of operations between collaboration module instances.

[0077] Figure 2C Message 234 is shown sent by the synchronization service (eg, 106) to the collaboration module instance 105a. Message 234 may include the information described above regarding Figure 2A One or more of the fields discussed. Specifically, message 234 is shown as transmitting an operation sequence number value of ten (10) (e.g., via field 204), a version of nine (9) (e.g., via field 206), and a maximum sequence number of eight (8) (e.g., via field 214). Since message 234 is sent by synchronization service 106 to collaboration module instance 105a, the maximum sequence number value of eight (8) in message 234 indicates the maximum sequence number of the operation confirmed by all collaboration modules participating in the collaboration. Therefore, when synchronization service 106 sends message 234, synchronization service has received confirmation from all collaboration modules participating in the collaboration for operations up to and including those assigned a sequence number of eight (8).

[0078] Next, the collaboration module instance 105a performs a new operation on the distribution data structure and sends a message 235. The message 235 may include the information described above with respect to the message 200 and Figure 2AOne or more of the fields discussed. Specifically, message 235 is shown as indicating that collaboration module instance 105a initiates a first operation with an initial sequence number of -1. "-1" is an example of a first predetermined (sequence) number defined by some of the disclosed embodiments to indicate that a sequence number has not yet been assigned to the first operation defined in message 235 (e.g., via one or more of fields 208, 210, and 212). Message 235 also indicates that the first operation is performed by collaboration module instance 105a on version 10 of the distributed data structure. This indicates that before the operation defined by message 235 is performed, all operations up to and including the operation of assigning sequence number ten (10) are applied to the distributed data structure. In other words, when the first operation defined by message 235 is performed, any results derived from the operations up to and including operation ten (10) are taken into account. Therefore, if the first operation depends on a portion of the distributed data structure modified by any of those operations, the result of the first operation is based on those modifications.

[0079] Message 235 also indicates that the maximum operation sequence number received by collaboration module instance 105a is ten (10) (as provided by message 234). In some aspects, the maximum operation sequence number shown in message 235 may be included in field 214. Message 235 serves as an acknowledgement by collaboration module instance 105a to synchronization service 106 of all operations up to sequence number ten (10).

[0080] Next, Figure 2C Message 236 is shown sent by collaboration module instance 105b to synchronization service 106. Message 236 may include one or more of the fields discussed above with respect to message 200. Message 236 identifies collaboration module instance 105b (e.g., via field 202) and indicates that collaboration module instance 105b has initiated a new operation, which may be defined in the message (e.g., via fields 208, 210, 212, not shown). Message 236 also indicates that the second operation operates on version eight (8) of the distributed data structure. In other words, when the second operation is performed on the distributed data structure, collaboration module instance 105b includes any results of the operation having sequence numbers up to and including sequence number eight (8). Message 235 also indicates that collaboration module instance 105b has received a maximum operation sequence number eight (8). Therefore, collaboration module instance 105b is somewhat behind in notification of operations compared to collaboration module instance 105a. Compared to collaboration module instance 105b, collaboration module instance 105a has been notified of two additional operations (operations nine (9) and ten (10)).

[0081] Note that immediately after the synchronization service 106 receives message 236, two operations need to be assigned sequence numbers, the first operation initiated by collaboration module instance 105a and the second operation initiated by collaboration module instance 105b. Note also that, as described above, collaboration module instance 105b is somewhat behind because it still does not know about the operations ranked nine (9) and ten (10). To this end, the synchronization service sends messages 237 and 238 to collaboration module instance 105b.

[0082] One or more of the messages 238 and 238 may include the information described above with respect to messages 200 and Figure 2A One or more of the fields described. In some aspects, messages 237 and 238 can be broadcast or multicast to more collaboration modules, not just collaboration module instance 105b. Messages 237 and 238 notify at least collaboration module instance 105b of the operations assigned sequence numbers nine (9) and ten (10), respectively. Messages 237 and 238 can provide additional information (e.g., via fields 208, 210, and 212) that defines the operations identified by sequence numbers nine (9) and ten (10).

[0083] The transmission of messages 237 and 238 by the synchronization service 106 demonstrates at least one design parameter of several of the disclosed embodiments, which is used to implement a single order of operations across all collaboration modules and to ensure that each collaboration module receives notification of operations in order. Therefore, since the collaboration module instance 105b is indicating via message 236 that its maximum receive sequence number is eight (8), the distribution server responds by transmitting operations nine (9) and ten (10) to the collaboration module instance 105b (via messages 236 and 237, respectively) so that the distribution module can also transmit subsequent operations assigned sequence number eleven (11) via message 239. As shown, message 239 indicates that the second operation originally indicated by message 236 has been assigned sequence number eleven (11) by the synchronization service 106. A similar message 240 notifies the collaboration module 105a of the second operation and its assignment of sequence number 11, as well as the version of the distributed data structure on which the second operation is performed (as indicated in message 236).

[0084] Figure 2CAlso shown is message 241 sent from synchronization service 106 to collaboration module instance 105b. Message 241 shows that the first operation initiated by collaboration module instance 105a and indicated by message 234 has been assigned sequence number twelve (12) by the synchronization service. Message 241 may provide additional information defining the first operation (e.g., via fields 208, 210, and 212). Note that the version indication in message 241 is equivalent to the version indication provided in message 235 because the two messages define the same operation. The maximum sequence number indication of message 241 is eight (8), which indicates the lower limit of all collaboration modules participating in the collaboration (set by collaboration module instance 105b in this example). The synchronization service sends message 242 to collaboration module instance 105a. In some aspects, messages 241 and 242 may be the same message broadcast or multicast to both collaboration modules 105a and 105b.

[0085] Figure 2C Also shown is an exemplary heartbeat message 243. The heartbeat message 243 may include the Figure 2A and one or more of the fields discussed in message 200. The heartbeat message 243 may be sent by the collaboration module instance 105b after a predetermined or configured period of inactivity. Inactivity may be defined by a message sent by the collaboration module instance 105b to the synchronization service 106. Messages received by the collaboration module instance 105b may not be considered in the inactivity determination. Because the message 243 is a heartbeat message, the sequence number field (e.g., 206) is set to a second predetermined value to distinguish from the first predetermined value for operations with unassigned sequence numbers (e.g., in messages 235 and 236). The heartbeat message 243 indicates (e.g., via field 214) that the maximum sequence number received by the collaboration module 105b is twelve (12).

[0086] Message 244 indicates that collaboration module instance 105a has initiated a third operation on version twelve (12) of the distributed data structure (when the third operation is applied by collaboration module instance 105a to the distributed data structure, all operations ranked 12 and lower are taken into account). In response to receiving message 244, synchronization service 106 distributes notification of the third operation to all collaboration modules participating in the collaboration. To this end, Figure 2CA synchronization service is shown sending messages 245 and 246 to collaboration modules 105b and 105a, respectively. In some aspects, messages 245 and 246 may be the same physical message that is broadcast or multicast to at least two collaboration modules 105a-b simultaneously. Note that messages 245 and 246 indicate the same version information (12) and collaboration module identification (105a) as originally indicated in message 244. Note also that heartbeat message 241 updates the maximum sequence number received by collaboration module instance 105b. Since collaboration module instance 105b previously indicated a lower limit for the collaboration window, messages 245 and 246 indicate an update to the bottom of the collaboration window by indicating a maximum sequence number value of twelve (12) (consistent with heartbeat message 243).

[0087] Figure 2D 1 shows an exemplary message exchange between collaboration module instances 105a-b and a synchronization service (in this case, synchronization service 106). Figure 2D One or more of the messages discussed may include the above regarding Figure 2A One or more of the fields discussed in message 200.

[0088] Figure 2D The message exchanges shown in are intended to illustrate how a synchronization service, such as synchronization service 106, adjusts reference sequence numbers for operations as they are distributed to collaboration module instances (or devices) participating in the collaboration. These adjustments provide for collaboration module instances to perform operations on distributed data structures without blocking or otherwise waiting for the synchronization service before continuing. Specifically, these adjustments may be appropriate when a collaboration module instance performs multiple operations before the synchronization service assigns a sequence number to any of those operations.

[0089] Figure 2D A series of three messages 251a-c are shown, indicating a first operation, a second operation, and a third operation, respectively, initiated by the collaboration module instance 105a. The messages 251a-c all indicate that no sequence number is assigned to any of the first operation, the second operation, or the third operation (e.g., via an exemplary predetermined value of -1 for the sequence number). Each of the messages 251a-c also shows a reference sequence number of ten (10) for their respective operation. Note that the reference sequence number does not change as each of the three messages 251a-c is sent. This is a result of the collaboration module instance 105a not receiving any messages from the synchronization service (e.g., 106) between the initiation of the three operations.

[0090] Next Steps Figure 2D A synchronous service is shown sending a pair of messages 252a-b. In some aspects, Figure 2DThe two messages 252a-b shown in can be a single physical message that is broadcast or multicast to both collaboration module instances 105a-b. Messages 252a-b indicate that sequence number 11 has been assigned to the first operation defined by message 251a. The version of the distributed data structure that is operated on by the first operation is identified by messages 252a-b as version ten (10).

[0091] Next, Figure 2D The synchronization service 106 is shown sending messages 253a-b to collaboration module instances 105b and 105a, respectively. As with messages 252a-b, messages 253a-b can be single physical messages that are broadcast or multicast to collaboration module instances 253b and 253a, respectively. Messages 253a-b indicate that a sequence number has been assigned to a second operation initiated by collaboration module instance 105a (and indicated by message 251b). Note that although collaboration module instance 105a indicates that the reference sequence number of the second operation is 10 (see message 251b), when the second operation is assigned a sequence number, the synchronization service indicates that the reference sequence number of the second operation (with sequence number twelve (12)) is eleven (11). Note that this reference sequence number is equivalent to the sequence number assigned to the operation indicated in messages 252a-b. Therefore, the synchronization service updates the reference sequence number of the second operation based on its understanding of the sequence of multiple operations performed by collaboration module instance 105a.

[0092] Specifically, the synchronization service 106 is notified that the collaboration module instance 105a performed a first operation, followed by a second operation, and then a third operation. The notification is provided by the message sequence 251a-c. Thus, the synchronization service is provided with an indication that the second operation was performed on a version of the distributed data structure that includes the results of the first operation, which was assigned a sequence number of 11 via messages 252a-b. As a result, the synchronization service indicates in messages 253a-b that the second operation (sequence number twelve (12)) was performed on version eleven (11) of the distributed data structure that includes the results of the first operation.

[0093] Similarly, the synchronization service 106 updates the reference sequence number of the third operation in a similar manner. Figure 2D As shown, the synchronization service 106 sends messages 254a-b (which can be the same as 252a-b and 253a-b) that notify the collaboration module instances participating in the collaboration of the third operation initiated by the collaboration module instance 105a. The third operation was initially indicated in message 251c. The third operation is assigned a sequence number of thirteen (13). The second operation is assigned a sequence number of twelve (12). Since the third operation is performed on a version of the distributed data structure that includes the result of the second operation, the synchronization service 106 indicates the reference sequence number twelve (12) of the third operation in messages 254a-b.

[0094] Figure 2E is an overview of the snapshot process. The snapshot process 260 shows Figure 1A The synchronization service 106 provides the operation record 265 to the persistence service 268. The persistence service 268 feeds the operation record 265 to the operation log 270. In some aspects, the persistence service 268 is integrated with the synchronization service.

[0095] The operation log 270 includes individual records 272, each of which defines an operation. The individual records 272 included in the operation log 270 may be included in an order defined by an operation sequence number assigned by the synchronization service 106 to each operation.

[0096] In some aspects, each individual record of operation log 270 may consist of one or more of the values ​​included in the fields of message 200, as described above. Operation log 270 is read by snapshot service 280. Snapshot service 280 generates snapshots, e.g. Figure 2E Snapshots 281a and 281b are shown. A snapshot represents the state of a distributed data structure at a particular point in time. For example, snapshot 281a may represent the state of a distributed data structure after all operations up to and including the operation represented by operation record 272 have been applied to the data structure. Snapshot service 280 may receive as input a first snapshot, such as snapshot 281a, and a set of additional operation records for operations whose sequence numbers are greater than the maximum sequence number operation included in the first snapshot. These operation records are in Figure 2E 285. Snapshot service 280 then applies additional operations 285 to first snapshot 281a to generate second snapshot 281b, which represents a second state of the distributed data structure up to and including operation record 288.

[0097] Figure 2E Also shown is a provisioning service 290. The provisioning service 290 is responsible for bringing new collaboration modules online into an existing collaboration. To do this, the provisioning service 290 sends a request to the new collaboration module ( Figure 2E 102c) provides the latest snapshot, Figure 2E The provisioning service 290 also provisions the new collaboration module instance 103c with operation records having sequence numbers greater than those operations included in the previous snapshot 281b. Figure 2E These operation records are shown as 292a, which are read from the operation log 270 as 292a and provided to the new collaboration module instance 103c as records 292b. The collaboration module instance 103c then applies the operation records 292b to the snapshot 281b to obtain the "current" or latest version of the distributed data structure managed by the collaboration.

[0098] Figure 3Two data structures that can be used to build a tree are shown in some embodiments of the disclosed embodiments. In some embodiments of these embodiments, a tree data structure is generated and maintained to include one or more block data structures 300 and one or more element data structures 320. In addition to the leaf layer of the tree, all layers of the tree include one or more fields in the fields described below about the block data structure 300, and the leaf nodes of the tree may include one or more fields described below about the leaf / element data structure. The exemplary merged tree data structure (leaf, node, block, tree, element, etc.) described below represents an exemplary format of data values ​​provided in a physical hardware memory. For example, each of the fields described below can store one or more values ​​in a hardware memory. These values ​​can be stored in a memory by a hardware processing circuit, such as one or more hardware processors. These values ​​can also be read from a hardware memory by one or more hardware processors as needed to perform one or more functions in the functions discussed herein. In some embodiments, the hardware processing circuit can write or read these values ​​via a memory address that identifies each of these data values. In some aspects, the memory address can be a word-based address, and the data value may not have to be stored in a physical location within the memory in a word-aligned manner. In these cases, as is known in the art, the hardware processing circuitry can be configured to read a data word that includes a particular value and then perform additional processing on the word value within the hardware processing circuitry to isolate non-word aligned values. The disclosed embodiments can utilize any existing method of accessing one or more data structures stored in a hardware memory through a hardware processing circuitry.

[0099] The following is about Figure 3 The exemplary merge tree block 300 discussed has a variable length. In other words, the block 300 can be stored in a variable number of portions of the hardware memory (e.g., a variable number of bytes, words, etc.). The length varies based on the number of collaboration modules participating in the collaboration and the size of the current collaboration window of the collaboration. The collaboration window can be considered as multiple edits or operations to a distributed data structure that have been initiated but not yet finalized ("synchronized") across all collaboration modules participating in the collaboration. In order to track edits to the distributed data structure that have not yet been fully synchronized / confirmed, the merge tree block 300 includes a minimum length field 302. The minimum length field of the block 300 represents the length of the distributed data structure represented by the elements of the tree below the block, which are common or synchronized across all collaboration modules. In other words, at least in some aspects, the minimum length field 302 represents the length of the data represented by the elements below the block and associated with a sequence number that is less than or equal to the maximum sequence number received in field 214, as described above.

[0100] Block 300 also includes a variable number of collaboration module identifier fields, such as collaboration ID field 304. Collaboration ID field 314 is shown as another example of a collaboration module identifier field, although the number of collaboration module identifier fields in merge tree block 300 can vary from zero to potentially any upper limit, limited only by the number of collaboration modules participating in the collaboration.

[0101] For each collaboration module instance identifier included in the merged tree block 300, a variable number of data pairs are also included in the merged tree block 300. Each pair of data is associated with a reference sequence number (e.g., 306 1..n ) and a length value (eg, stored in field 308 1..n Stored in field 316 1..n The serial number value in field 318 1..n The length values ​​in are shown to be associated with different collaboration module instance identifiers to show that the number of associations for each collaboration module instance identifier may be different.

[0102] The fields of block 300 described above track which portion of the distributed data structure represented by the merge tree is visible to each collaboration module instance participating in the collaboration. The information provided by these fields is specific to the portion of the distributed data structure represented by the reference sequence number (e.g., 306 1..n and 316 1..n ) is maintained for each version identified by the remote collaboration module. This information is used when determining how to apply an operation originating from a local or remote collaboration module instance to a specific merge tree. This information may be necessary because the version of the distributed data structure at the remote collaboration module may not be equivalent to the second version of the distributed data structure at the second collaboration module when the remote collaboration module initiates the operation. In some embodiments of the disclosed embodiments, the second collaboration module needs to apply the operation to the second version of the distributed data structure in a manner that copies the results obtained by the remote collaboration module. Partial length information supports these operations.

[0103] The partial length information of a specific block and a specific collaboration module may be defined by the following Formula 1, in which a sum is performed on all leaf node elements represented by the block and satisfying the defined condition:

[0104] pLen(op client,op ref seq,block)=minLen(block)+

[0105] ∑len(leaf.op seq≤op ref seq)+len(leaf.client=

[0106] op client and leaf.op seq>op ref seq)(1)

[0107] in:

[0108] minLen() returns the minimum length of the data represented by the block (the length of the synchronization data represented by the block).

[0109] len() returns the length of the data in the distributed data structure, represented by the elements matching the identified condition.

[0110] op client is the identifier of the collaboration module that initiated the operation.

[0111] op ref seq is the reference sequence number of the operation.

[0112] leaf node.client identifies the collaborative module that initiates the operation, represented by a leaf node.

[0113] leaf node.op seq is the operation sequence number of the second operation, represented by the leaf node

[0114] Exemplary element data structure 320 includes a data field 322, an operation sequence number field 324, a deletion sequence number field 325, a reference sequence number field 326, and an identifier of a collaboration module that initiated an operation 328. Data field 322 includes data representing a portion of the collaboration data (e.g., a distributed data structure) represented by a particular element. Operation sequence number 324 identifies a sequence number assigned to the operation represented by the element. Delete sequence number 325 identifies a sequence number for an operation that deletes the data represented by element data structure 320. In other words, operation sequence number 324 may indicate the sequence number of an operation that inserts or annotates data, and if the data is subsequently deleted, then deletion sequence number 325 will indicate the sequence number of that (subsequent) operation.

[0115] Reference sequence number 326 indicates the maximum sequence number of synchronization operations received by the collaboration module when the collaboration module performs the operation defined by element 320. Synchronous operations may be those operations that have been confirmed by all collaboration modules participating in the collaboration. Operation collaboration module identifier field 328 identifies the collaboration module that initiated the operation.

[0116] the following Figure 4-Figure 13 Representing the data structures supporting collaboration between two collaboration modules, for simplicity they are referred to as collaboration module instance 105a and collaboration module instance 105b. The two collaboration modules each edit a string structure, and the merge tree data structure supports synchronization of these edits across both collaboration modules 105a-b.

[0117] Figure 4An example of a merge tree portion 400 maintained by a collaboration module instance 105a is shown. The merge tree portion 400 represents the string "Cat on the mat". The string is the result of the concatenation of two substrings. The first substring "on the mat" is represented by a merge tree block 405a of the merge tree portion 400 and the second string "Cat" inserted at position zero (0) of the string "on the mat" by the collaboration module instance 105a. The insertion operation is represented by block 405b. Each of the blocks 405a-b may utilize one or more of the fields discussed above with respect to the merge tree node / block 300.

[0118] The insert operation represented by block 405b has not yet been acknowledged by the server and is therefore assigned a sequence number of -1, as shown. The reference sequence number for the insert of "Cat" represented by block 405a is zero (0) because the insert occurs on the version of the distributed data structure that has the highest-ordered operation (the string "on the mat") assigned a sequence number of zero (0).

[0119] Figure 4 Also shown is a block 420 of tree portion 400. Block 420 of tree stores minimum length value 422 (e.g., stored in field 302 in some aspects). Minimum length value 422 corresponds to the length of the data "on the mat" represented by fragment 405a. The data represented by fragment 405a is confirmation data, because all collaboration module instances participating in collaboration have a confirmation operation that generates a string "on the mat". Due to the result of the operation that is assigned a sequence number that is less than or equal to the current reference sequence number (e.g., in some aspects, as provided in field 214 from a distribution server), all collaboration module instances participating in collaboration are visible. Therefore, the length of the data can be included in the minimum length value 422.

[0120] Block 420 also includes partial length information for collaboration module instance 105a, as shown at 424. Partial length information 424 indicates that the segment below block 420 includes four (4) additional data characters (exceeding the minimum length) when collaboration module instance 105a accesses those segments with sequence numbers that are zero or greater. This corresponds to the insertion of "Cat" by collaboration module instance 105a. Block 420 does not include any partial length information for collaboration module instance 105b, indicating that no additional data is available for collaboration module instance 105b in any case (this is because the insertion of "Cat" has not yet been assigned a sequence number by the distribution server and is therefore not visible to instance 105b).

[0121] Figure 5 An exemplary merge tree portion 500 on collaboration module instance 105b is shown. Figure 5 The exemplary merged tree portion 500 of represents the string “Big on the mat.” The merged tree portion 500 includes the string portion “on the mat” represented by element 505 a , which is synchronized with the string portion “on the mat” represented by element 405 a discussed above with respect to collaboration module instance 105 a and merged tree portion 400 .

[0122] The tree portion 500 also includes a second element 502b, which represents an insertion operation of the string "Big" at position zero (0) of the string "on the mat". The insertion operation is initiated by the collaboration module instance 105b. The collaboration module instance 105b assigns a sequence number -1 to the insertion "Big" operation until the insertion is confirmed by the synchronization service. The reference sequence number / distributed data structure version of the insertion represented by element 505b is zero. This indicates that when the operation of inserting "Big" is performed on the distributed data structure, the result of the operation with a lower ranking or equivalent sequence number of zero is taken into account.

[0123] Figure 5 Also shown is a block 520 of the tree portion 500. The block 520 indicates a minimum length value 522 of the leaf elements below the block 520. The minimum length value 522 indicates the length of the synchronization data represented by the element 505a. In other words, the length value 522 indicates the length of the data represented by the node 520 that has passed out of the bottom end (e.g., 230) of the collaboration window.

[0124] Block 520 also includes partial length information 524 for collaboration module instance 105b. Partial length information 524 indicates that for reference sequence numbers of zero or more, the leaf element below block 520 includes four additional data characters in addition to minimum length value 522. Block 520 does not include any partial length information for collaboration module instance 105a. This indicates that there is no additional data visible in tree portion 500 for collaboration module instance 105a, other than the data represented by minimum length value 522.

[0125] Figure 6 An updated version of the merged tree portion 600 on the collaboration module instance 105b is shown. Figure 6Merged tree portion 600 reflects the additional insert operation that occurred on collaboration module instance 105b, and the resulting modification to merged tree portion 500. The second insert operation inserts the word "furry" at position four (4) in the string, and is represented by element 505c. The word "furry" appears in the string after the word "big", which is represented by element 505b. The insert operation represented by element 505c is assigned a sequence number of -1 because the operation has not yet been assigned a sequence number by the server, and is assigned a reference sequence number of zero because the insertion of the word "furry" occurs before any operation is received from the server.

[0126] The block of tree portion 600 is shown as 620.Block 620 indicates that minimum length value 622 is eleven, represents the data represented by element 505a again.Minimum length value 622 does not include the length of the data represented by element 505b and 505c, because the data are not confirmed by all collaboration module instances participating in collaboration.The block also includes partial length information 612.Because collaboration module instance 105b has initiated two insertion operations represented by element 505b and 505c, and both operations have the reference sequence number of zero, therefore partial length information 612 indicates that collaboration module instance 105b has the reference sequence number of zero or more reference ten (10) data characters exceeding minimum length value 622 to the access of tree portion 600.These ten character representations are represented by six characters of element 505c and four (4) characters (each string includes space at the end) from element 505b.

[0127] Figure 7 An updated version of the merged tree portion 600 stored at the collaboration module instance 105b is shown. The updated portion is labeled 700. The tree portion 700 shows that Figure 4 The insert operation "cat" initiated by the collaboration module instance 105a has been propagated (eg, via the synchronization service 106) to the collaboration module instance 105b. The insert operation is represented in the tree portion 700 as element 505d.

[0128] The insertion of "cat" by collaboration module instance 105a conflicts with the insertions of "big" and "furry" by collaboration module instance 105b because all of these insertions are at position zero of the string. The conflict rules determine that the position of element 505d in tree portion 700 is therefore determined based on the reference sequence number of the insertion operation. The reference sequence number of the insertion of "Cat" by collaboration module instance 105a is zero. Under the conflict rules discussed above, the "big" and "furry" insertion operations are moved to the left because they will be assigned a sequence number (one (1)) that is larger than the sequence number of the "cat" insertion.

[0129] Figure 7 Block 720 of tree portion 700 is also shown. The block indicates a minimum length value 722. Block 720 also indicates partial length information 712a-b for collaboration module instances 105a and 102b, respectively. Partial length information 712a indicates a partial length of four (4) characters for a reference sequence number of one (1) or greater value. This corresponds to the length of the data represented by element 505d. The data represented by elements 505b and 505c are not yet visible to collaboration module instance 105a, so partial length information of the data is not provided for collaboration module instance 105a. Partial length information 712b of collaboration module instance 105b indicates that, for a reference sequence number greater than or equal to zero (0), ten data characters are included in the element below block 720. These ten characters include data represented by fragments 505b and 505c. Partial length information 712b also includes the following indication that, for a reference sequence number of one (1) or greater value, the element below block 720 includes 14 data characters. The additional four (4) data characters of reference sequence number one (1) compared to reference sequence number zero (0) in partial information 712b are the data represented by block 505d. The data represented by block 505d is assigned sequence number one (1) and is initiated by collaboration module instance 105a.

[0130] After receiving notification of the insert of "Cat" from the synchronization service 106, the collaboration module instance 105b may receive confirmation of the insert of "Big" from the synchronization service 106. The synchronization service assigns the insert of "big" operation, represented by element 505b, a sequence number of two. This will be shown in the subsequent example below.

[0131] Figure 8 Shown from Figure 4 The updated version of the merged tree portion 400 is used as tree portion 800. Tree portion 800 shows that collaboration module instance 105a has been notified and collaboration module instance 105b inserts "Big" into the string. This insertion operation is represented as element 405c. The insertion of "Big" uses reference sequence number zero (0), which conflicts with the reference sequence number of the insertion of "Cat" represented by element 405b. According to the conflict rule, "Big" is placed before "Cat", because its sequence number (two (2)) is after "Cat" (which is one (1)).

[0132] The tree portion 800 includes a block 820. The block 820 indicates a minimum length value 822. The block 820 includes partial length information 812a-b for each collaboration module in the collaboration modules 105a-b, respectively. The partial length information 812 indicates that, for the collaboration module instance 105a, the elements below the block 820 represent four data characters (represented by the block 405b) with a reference sequence number of zero. The partial length information 812a also indicates that, for the collaboration module instance 105a, when the reference sequence number is two or greater, the elements below the block 820 represent eight (8) additional data characters (in addition to the minimum length value 822). These eight data characters are represented by elements 405b and 405c. With respect to the collaboration module instance 105b, the partial length information 812b indicates that, when the reference sequence number is zero, the elements below the block 822 represent four (4) additional data characters (exceeding the minimum length value 822). These four (4) additional characters are represented by block 405c, which is initiated by collaboration module instance 105b and has a reference sequence number of zero. When the reference sequence number of collaboration module instance 105b is one (1), the partial length information 812b indicates that the elements below block 820 represent a total of eight (8) additional data characters because the "Cat" insertion becomes visible to collaboration module instance 105b when the reference sequence number is one.

[0133] Fig. 9 Shown is that the updated version of collaboration module instance 105a merges tree parts into tree parts 900.Tree parts 900 show that additional insertion operations have occurred on collaboration module instance 105a.Insert operation inserts string " top of " into position 11 of previous string " big cat on the mat ".Because insertion occurs in the middle of string " on the mat " represented by element 405a in previous collaboration module instance 105a merge tree, element 405a is split into two elements, marked as element 405d and 405e.New character " top of " is represented by element 405f.Because the character " on " represented by element 405d and the character " the mat " represented by element 405e are both derived from the original string " on the mat " with the sequence number of zero (0), therefore the sequence number of zero is also assigned to each element in element 405d and 405e representing " on " " the mat " respectively. When the collaboration module instance 105a inserts the "top of" string, it also sends a message to the server indicating the insertion operation, the inserted characters, and the insertion position. The sequence number of the insertion operation is assigned to -1 (e.g. Fig. 9 ) until the distributor provides a confirmed sequence number for the insert operation.

[0134] Block 920 included in tree portion 900 indicates minimum length information 922. For collaboration modules 105a-b, partial length information for merged tree portion 900 is shown as 922a-b in block 920, respectively. Partial length information 922a indicates that, for collaboration module instance 105a, the reference sequence number of zero includes fourteen (14) additional data characters in the elements below block 920. These fourteen (14) additional characters include the data represented by elements 405b, 405d, and 405f. When the reference number on collaboration module instance 105a reaches two (2) or more, the insertion of "Big" by collaboration module instance 105b becomes visible to collaboration module instance 105a, and therefore the partial length information is increased by four (4) relative to sequence number zero, as shown in partial length information 912a.

[0135] With respect to collaboration module instance 105b, partial length information 912b indicates that when the reference sequence number is zero, the elements below block 920 provide four (4) additional characters. These four (4) additional characters are represented by block 405c. Partial length information 912b also indicates that when the reference sequence number is one (1), the elements below block 920 provide four (4) additional characters. These four (4) additional characters are represented by block 405b when the insertion of "Cat" by collaboration module instance 105a becomes visible to collaboration module instance 105b.

[0136] Fig.10 An updated tree portion 1000 on collaboration module instance 105b is shown. Tree portion 1000 reflects the state after collaboration module instance 105b receives confirmation from the server that "furry" was inserted. As shown, the update assigns a sequence number to "furry".

[0137] Block 1020 also indicates partial length information 1012a-b for collaboration module instances 105a and 102b, respectively. Partial length information 1012a indicates a partial length of four (4) characters for a reference sequence number that is zero (0) or greater. This corresponds to the length of the data represented by element 505d, which is initiated by collaboration module instance 105a. When the reference sequence number is zero, the data represented by elements 505a and 505c is not yet visible to collaboration module instance 105a, so when the reference sequence number is zero, no partial length information for the data is provided for collaboration module instance 105a.

[0138] The partial length information 1012a also indicates that when the reference sequence number of the collaboration module instance 105a is two, four additional characters represented by element 505b become visible to the collaboration module instance 105a. When the reference sequence number is three, the partial length information 1012a indicates that the elements below block 1020 include an additional fourteen (14) characters of information, including the data represented by both elements 505b and 505c (and 505d).

[0139] The partial length information 1012b for collaboration module instance 105b indicates that for reference sequence numbers greater than or equal to zero (0), ten data characters are included in the element below block 1020. These ten characters include the data represented by segments 505b and 505c. The partial length information 1012b also includes an indication that for reference sequence numbers of one (1) or greater, the element below block 1020 includes 14 data characters. The additional four (4) data characters of reference sequence number one (1) compared to the reference sequence number zero (0) in the partial information 1012b are the data represented by block 505d. The data represented by block 505d is assigned a sequence number of one (1) and is initiated by collaboration module instance 105a.

[0140] Fig.11 An exemplary merged tree portion 1100 is shown on collaboration module instance 105a after collaboration module instance 105a has been notified by the distribution server of the insertion of "Furry". The insertion is represented by element 405g. The notification from the server indicates to collaboration module instance 105a that the Furry insertion is assigned a sequence number of three (3).

[0141] Block 1120 included in tree portion 1100 indicates minimum length information 1122. For collaboration modules 105a-b, partial length information for merged tree portion 1100 is shown as 1122a-b in block 1120, respectively. Partial length information 1122a indicates that, for collaboration module instance 105a, the reference sequence number of zero includes fourteen (14) additional data characters in the elements below block 1120. These fourteen (14) additional characters include data represented by elements 405b, 405d, and 405f. When the reference number on collaboration module instance 105a reaches two (2) or more, the insertion of "Big" by collaboration module instance 105b becomes visible to collaboration module instance 105a, and thus the partial length information is increased by four (4) relative to sequence number zero, for a total of eighteen (18), as shown in partial length information 1112a. When the reference number on collaboration module instance 105a reaches three (3) or more, the insertion of "furry" by collaboration module instance 105b becomes visible, so the partial length information 1112a indicates an additional six (6) data characters of reference number three (3), as shown.

[0142] With respect to collaboration module instance 105b, partial length information 1112b indicates that when the reference sequence number is zero, the elements below block 1120 provide four (4) additional characters. These four (4) additional characters are represented by block 405c. Partial length information 1112b also indicates that when the reference sequence number is one (1), the elements below block 1120 provide four (4) additional characters. These four (4) additional characters are represented by block 405b when the insertion of "Cat" by collaboration module instance 105a becomes visible to collaboration module instance 105b.

[0143] Fig.12 Merged tree portion 1200 is shown indicating that collaboration module instance 105a has received confirmation of the insert of "top of" from synchronization service 106. Synchronization service 106 assigned a sequence number of four (4) to the insert operation of "top of". This is shown in element 405f.

[0144] Block 1220 included in tree portion 1200 indicates minimum length information 1222. For collaboration modules 105a-b, partial length information for merged tree portion 1200 is shown as 1222a-b in block 1220, respectively. Partial length information 1222a indicates that, for collaboration module instance 105a, the reference sequence number of zero includes fourteen (14) additional data characters in the elements below block 1220. These fourteen (14) additional characters include the data represented by elements 405b, 405d, and 405f. When the reference number on collaboration module instance 105a reaches two (2) or more, the insertion of "Big" by collaboration module instance 105b becomes visible to collaboration module instance 105a, and thus the partial length information is increased by four (4) relative to sequence number zero, for a total of eighteen (18), as shown in partial length information 1212a. When the reference number on collaboration module instance 105a reaches three (3) or more, the insertion of "furry" by collaboration module instance 105b becomes visible, so the partial length information 1212a indicates an additional six (6) data characters for the reference number of three (3), as shown.

[0145] With respect to collaboration module instance 105b, partial length information 1212b indicates that when the reference sequence number is zero, the elements below block 1220 provide four (4) additional characters. These four (4) additional characters are represented by block 405c. Partial length information 1212b also indicates that when the reference sequence number is one (1), the elements below block 1220 provide four (4) additional characters. These four (4) additional characters are represented by block 405b when the insertion of "Cat" by collaboration module instance 105a becomes visible to collaboration module instance 105b. By assigning sequence number (4) to the insertion of "top of" represented by element 405f, partial length information 1212b can then be updated to indicate this. In other words, when accessing tree portion 1200, collaboration module instance 105b has visibility to fifteen (15) additional information characters (beyond that indicated by minimum length value 1222) when its reference sequence number is four (4) or greater, as indicated by portion length information 1212b. The additional seven characters relative to a sequence number of one (1) are provided by the data represented by block 405f.

[0146] Fig.13 The merged tree portion 1300 stored on collaboration module instance 105b is shown after collaboration module instance 105b receives notification of an insertion of the string "top of" by collaboration module instance 105a. The insertion is represented by element 505g. To complete the insertion, collaboration module instance 105b splits its previous "on the mat" element 505 into two elements 505e and 505f to represent "on" and "the mat", respectively. The "top of" insertion is then represented by element 505g, as shown.

[0147] Block 1320 includes a minimum length value 1322 and partial length information 1312a-b for collaboration modules 105a-b, respectively. Based on the "top of" insertion represented by element 505g, an indication of a reference sequence number of four (4) (equivalent to the sequence number assigned by the distribution server to the "top of" insertion operation) provides an additional seven data characters relative to the reference sequence number of one, two, or three, as shown in partial length information 1312b.

[0148] Fig.14 is a flowchart of an exemplary process for distributing operations on a distributed data structure to multiple collaborating modules. Fig.14 The process 1400 discussed may be performed by the synchronization service 106. In some aspects, instructions (e.g., instructions 2324, below) stored in a memory (e.g., main memory 2304, below) may configure a hardware processing circuit (e.g., processor 2302, below) to perform one or more of the functions discussed below.

[0149] After start operation 1402, process 1400 moves to operation 1405. In operation 1405, a collaboration session is established with multiple collaboration module instances. Figure 1A As discussed, multiple collaboration module instances (e.g., collaboration module instances 102a and 102b) can each edit a distributed data structure, such as a text string. Establishing a collaboration session can include, for example, retrieving data defining a particular version of the distributed data structure, and in some aspects, obtaining data defining one or more ongoing operations on the distributed data structure from one or more corresponding collaboration modules. The ongoing operations may not yet be synchronized with each collaboration module instance participating in the collaboration session.

[0150] In operation 1410, an indication of an operation on a distributed data structure is received. For example, as described above with respect to Figure 1A As discussed, a collaboration module instance that performs an operation on a distributed data structure may notify the synchronization service 106 of the operation (e.g., via Figure 2A Operation 1410 may also include receiving an indication of a version of the distributed data structure on which the operation is performed (e.g., via reference sequence number 206 of message 200). Further indications received in operation 1410 may include: a type of operation (e.g., insert, delete, or annotate), an indication of the collaboration module instance that initiated the operation (e.g., field 202), a value associated with the operation (e.g., an annotation value, or as another example, an inserted string character), and an identification of a location in the distributed data structure at which the operation is performed. For example, an offset in the distributed data structure may identify an insertion point for an insertion. As another example, an offset range may indicate a portion of the distributed data structure to be deleted by the operation.

[0151] In operation 1415, a sequence number is assigned to the operation. In some aspects, the operation sequence number may be assigned to the operation based on the order in which the indication of the operation is received by the public service of the collaboration module instance, such as the synchronization service 106. The sequence number assigned to each received operation may be a monotonically increasing number or a strictly increasing number. In some aspects, when the collaboration module instance initiates an operation and notifies the public service (e.g., the synchronization service 106) of the operation, the collaboration module instance may initiate the sequence number of the new operation as a predefined number, such as negative one (-1). Upon receiving the notification, the public service may identify the need to assign a sequence number to the operation based at least in part on the sequence number of the operation set to the predefined number.

[0152] In operation 1420, information defining the operation is distributed to multiple collaboration module instances participating in the collaboration session. In some aspects, this information can be indicated as described above with respect to Figure 2AOne or more of the fields in question are consistent. Operation 1420 may include generating a message including the information and sending it to each collaboration module instance participating in the collaboration session. For example, Figure 1A Messages 120a and 120b are shown distributing messages to each of the collaboration module instances 105a and 105b, informing each of those collaboration module instances of the operation initiated by the collaboration module instance 105a. In this particular example, the collaboration module instance 105a, which has been made aware of the operation since it was initiated by the collaboration module instance 105a, identifies the sequence number assigned to the operation via the message 120a.

[0153] Operation 1425 determines whether the information has been distributed to all of the collaboration module instances participating in the collaboration. If not, the process returns to operation 1420 where the information is distributed to one or more additional devices.

[0154] If the information is distributed to all collaboration module instances, process 1400 moves to operation 1430, which indicates to all devices participating in the collaboration that the sequence numbers assigned to the operation are synchronized. In other words, operation 1430 informs all collaboration module instances in the collaboration module instance that each collaboration module instance is now aware of the operation. In some aspects, operation 1430 is performed by updating the above description of Figure 2A The field 214 in question is completed with a value indicating the same as the operation sequence number assigned in operation 1415. The message 200 may then be sent to all the collaboration module instances in the collaboration module instance. Figure 1A 1400 is shown with respect to additional messages 130a and 130b, which inform each of the collaboration module instances 105a and 105b, respectively, that operations have been fully synchronized across all collaboration module instances. Process 1400 then moves to end operation 1435.

[0155] For example, as mentioned above about Figure 2A As discussed, the message sent from the synchronization service 106 to the collaboration module instance (e.g., 105a and / or 105b) defines an operation performed on the distributed data structure. In some aspects, operation 1410 also includes: receiving an indication of a sequence number assigned to the operation (e.g., by the synchronization service 106). The indication can be included in a field of the message (e.g., 200) received by the collaboration field (e.g., field 206). Operation 1410 can also include: receiving an indication of a version of the distributed data structure on which the operation is performed (e.g., the reference sequence number in field 204).

[0156] Fig.15is a flowchart of an exemplary process for distributing operations on a distributed data structure to multiple collaborative module instances. Fig.15 The process 1500 discussed may be performed by a collaboration module instance, such as any of the collaboration module instances 105a-b. In some aspects, instructions (e.g., instructions 2324, below) stored in a memory (e.g., main memory 2304, below) may configure a hardware processing circuit (e.g., processor 2302, below) to perform one or more of the functions discussed below.

[0157] After starting operation 1502, process 1500 moves to operation 1505. In operation 1505, the node, location, reference sequence number, and collaboration module instance that initiated the operation are determined. For example, in some aspects, process 1500 can be performed to identify a portion of a tree to which an operation is to be applied. For example, an insert, delete, or comment operation can be generated by a local operation or by a remote collaboration module instance. The operation can indicate a portion of a distributed data structure that the operation will affect. For example, an insert command can indicate an insertion point within a distributed data structure. A delete operation can indicate a range of data to be deleted in a distributed data structure. A comment operation can indicate the location of a comment to be added in a distributed data structure.

[0158] Operation 1510 sets the offset variable to the position indicated in the search. As process 1500 continues, the offset variable may change.

[0159] Decision operation 1515 evaluates whether the node identified in operation 1505 is a block (a non-leaf node of the tree) or an element (a leaf node of the tree). If the node is a leaf, then the location identified in operation 1505 is located or represented by a leaf node. Therefore, the identification of the leaf node can be returned as a search result. Process 1500 then moves to end operation 1519. If the node is a non-leaf node, then process 1500 moves from decision box 1515 to operation 1520.

[0160] In operation 1520, child nodes of the node are obtained. In some aspects, operation 1520 is configured to traverse the child nodes from a first position of the data structure (e.g., a node representing a beginning portion of the data structure) to a second position of the data structure (a node representing an ending portion of the data structure). For example, operation 1520 may be configured to provide a node representing the beginning of the string when the distributed data structure represents a rich text string, and subsequent calls to operation 1520 may provide nodes representing progressively later portions of the rich text string.

[0161] In operation 1525, the collaboration module instance specific length represented by the child node is determined. The collaboration module instance specific length is determined based on the collaboration module instance that initiated the operation and the reference sequence number at the collaboration module instance. For example, as described above with respect to Figure 4-Figure 13 As discussed in the exemplary tree structure of any graph in , the disclosed embodiments can maintain partial length information defining a specific length of a collaboration module instance of a distributed data structure represented by a specific portion of the tree structure. In some aspects, the partial length can be determined based on Formula 1 discussed above.

[0162] Operation 1525 may determine a collaboration module instance specific length based on the partial length and a minimum length value, wherein the minimum length value indicates a minimum size or length of a distributed data structure represented by a portion in the tree below the child node of operation 1520. The partial length value of the child node may be added to the minimum length to determine the collaboration module instance specific length.

[0163] Decision operation 1530 determines whether the length determined in operation 1525 is greater than or equal to the offset value. If the length is greater than the offset, the position being searched (from operation 1505) is represented by the portion represented by the current node in the tree. In this case, process 1500 moves to operation 1535, which moves to a lower level in the tree by setting the node to be a child of the previous node. If the length is not greater than the offset value, the current node does not represent a portion of the distributed data structure that includes the position. Therefore, the offset value is adjusted according to the determined length. Process 1500 then moves to operation 1545 and determines another child node of the node (a peer node of the current node).

[0164] Fig.16 is a flowchart of an exemplary process for distributing operations on a distributed data structure to multiple collaborative module instances. Fig.16 The discussed process 1600 may be performed by a collaboration module instance, such as any of the collaboration module instances 102a-b. In some aspects, instructions (e.g., instructions 2324, below) stored in a memory (e.g., main memory 2304, below) may configure a hardware processing circuit (e.g., processor 2302, below) to perform one or more of the functions discussed below.

[0165] After start operation 1602, process 1600 moves to operation 1605. In operation 1605, information defining an operation is received. The information may be received from a common service for the collaboration session. The common service may communicate with the collaboration module instances participating in the collaboration session. In some aspects, the common service is the synchronization service 106 discussed above. The information defining the operation may include the information described above with respect to message 200 and Figure 2AOne or more items in the items discussed. For example, the information may include an operation sequence number assigned to the operation by the common service. The operation sequence number uniquely identifies the operation. The information may also include a reference sequence number for the operation. The reference sequence number identifies the version of the distributed data structure modified by the operation. The information may also include an indication of the type of operation, such as whether the operation is an insertion, deletion, or annotation to a distributed data structure, such as a text string or a rich text string. The information may include a value associated with the operation (e.g., data to be inserted into the data structure, or data used to annotate the data structure). The information may also include an indication of the maximum sequence number of the operation synchronized with each collaboration module instance participating in the collaboration session (e.g., the value of field 214). The information may also include a location within the distributed data structure to which the operation is to be applied (e.g., field 210 of message 200).

[0166] In operation 1610, an element is added or modified to the merged tree to represent the operation. In some aspects, operation 1610 may include updating the collaboration module instance-specific partial length information for each block node between the added / modified element and the root of the tree. Thus, if the collaboration module instance 105a initiates a particular operation, the collaboration module instance 105a-specific partial length information may be updated for each block node between the added node / element and the root.

[0167] For example, an operation to insert data into a rich text string based on a particular reference sequence number may cause each node between the element representing the inserted data and the root node of the tree representing the rich text string to be updated to associate the particular reference sequence number with an increase in the partial length equal to the length of the inserted data. The partial length of the collaboration module instance initiating the operation information is updated to

[0168] In operation 1615, an indication is received that the operation associated with the sequence number is a synchronous operation. Figure 1A-1B As discussed, each of the collaboration module instances 105a-b may receive a corresponding message 130a-b indicating that the operation has been synchronized across all collaboration module instances participating in the collaboration. In some aspects, this may be accomplished by setting field 214 of message 200 to a value equal to the sequence number of the operation assigned by the common service (e.g., synchronization service 106).

[0169] In operation 1620, the reference sequence number is updated based on the received indication of operation 1615. In other words, the collaboration module implementation can track the maximum synchronization sequence number of the distributed data structure. When the collaboration module instance initiates an operation, it can use the tracked reference sequence number as the basis for the operation. In other words, the tracked reference sequence number is used to identify the version of the distributed data structure on which the collaboration module instance operates. This information is provided when these operations are shared with other collaboration module instances via a public service (e.g., synchronization service 106). For example, the version of the distributed data structure used as the basis for a particular operation can be transmitted to other collaboration module instances via message 200, and specifically, in some embodiments, via field 204, as described above.

[0170] After operation 1620 is completed, process 1600 moves to end operation 1625 .

[0171] Fig.17 1700 is a flow chart of an exemplary process for accessing a distributed data structure. In some aspects, process 1700 may be performed by a device running an instance of a collaboration module. For example, process 1700 may be performed by one or more devices in devices 102a and / or 102b. In some aspects, execution of the following description of Fig.17 Collaboration module instances of one or more of the functions discussed may be run on the server side of an embodiment, such as on a computer that also runs the synchronization service 106. Fig.17 The process 1700 discussed may be performed by a collaboration module instance, such as any of the collaboration module instances 105a-b. In some aspects, instructions (e.g., instructions 2324, below) stored in a memory (e.g., main memory 2304, below) may configure a hardware processing circuit (e.g., processor 2302, below) to perform one or more of the functions discussed below. Fig.17 In the discussion of , a device that executes method 1700 may be referred to as an "execution device."

[0172] After starting operation 1702, process 1700 moves to operation 1705. In operation 1705, the least recently used node is identified. As described above, in embodiments where a distributed data structure is represented via a tree, a list of the least recently used nodes on the tree can be maintained. The list of least recently used nodes can be used to facilitate garbage collection and / or other optimizations of the tree structure.

[0173] In some aspects, in addition to the LRU list, some other means may be used to identify nodes by operation 1705. For example, as described above, as the maximum sequence number of operations acknowledged by all collaboration module instances participating in the collaboration increases, some maintenance of the data structure representing the distributed data structure may be performed, for example, as described below.

[0174] Decision operation 1715 evaluates whether the sequence number assigned to the operation represented by the node is less than the maximum sequence number that has been confirmed by all participants in the collaboration (e.g., collaboration module instances). In other words, whether the node represents an operation within or below the collaboration window. In some embodiments, this can be achieved by comparing two sequence numbers identified by the node. For example, a node can indicate an insert or annotate sequence number (e.g., via field 324) and also delete a sequence number (via field 325). If multiple sequence numbers are indicated, all of the multiple sequence numbers must pass below the collaboration window before further operations (e.g., garbage collection) can be performed on the node.

[0175] If the node indicates that the operation is still within the cooperation window, process 1700 returns to operation 1705 and possibly selects another node from the LRU list.

[0176] If the operation represented by the node has been passed out of the collaboration window, the process 1700 moves from decision operation 1715 to operation 1720, which evaluates that the operation is to delete. In order to make this determination, operation 1720 can evaluate whether the node includes a deletion sequence number (e.g., 325). If a deletion sequence number is indicated, the process 1700 moves to operation 1722 and deletes the leaf node. The process then returns to operation 1705. If the node does not represent a deletion operation, the process 1700 moves to decision box 1725, which determines whether the operation is an insertion operation. If the operation is to insert, the process 1700 moves from decision operation 1725 to operation 1730, which identifies adjacent parts of the distributed data structure (e.g., represented by sibling nodes). Operation 1740 can integrate adjacent parts of the distributed data structure into a single leaf node. Integration can depend on whether those other parts have also passed below the collaboration window. The process 1700 then returns to obtain another node from the LRU list. The process 1700 finally moves to end operation 1752.

[0177] Fig.18 1800 is a flow chart of an exemplary process for accessing a distributed data structure. In some aspects, process 1800 may be performed by a device running a collaboration module instance. For example, process 1800 may be performed by one or more devices in devices 102a and / or 102b. In some aspects, the collaboration module instance performs the following Fig.18Collaboration module instances (e.g., 105a-b) may be run on the server side of an embodiment, such as on a computer that also runs the synchronization service 106. In some aspects, the following description of Fig.18 The process 1800 discussed may be performed by a collaboration module instance, such as any of the collaboration module instances 105a-b. In some aspects, instructions (e.g., instructions 2324, below) stored in a memory (e.g., main memory 2304, below) may configure a hardware processing circuit (e.g., processor 2302, below) to perform one or more of the functions discussed below. Fig.18 In the discussion of , a device that executes method 1800 may be referred to as an "execution device."

[0178] After start operation 1805, process 1800 transitions to operation 1810, which identifies a starting node. In some aspects, the starting node can be a root node of a tree representing a distributed data structure.

[0179] In operation 1815, the partial length information of the operation sequence number is less than or equal to the maximum sequence number confirmed by all collaboration module instances participating in the collaboration (e.g., the value of field 214). The reasoning supporting operation 1815 is that once a particular sequence number is less than or equal to the maximum sequence number confirmed by all collaboration module instances participating in the collaboration, the operation assigned to the particular sequence number has been seen and / or applied by all collaboration module instances participating in the collaboration, and therefore there is no need to maintain the partial length for the operation. Note that the minimum length value of the node can be adjusted based on the deleted partial length information.

[0180] Decision operation 1820 determines whether there are additional nodes to examine. If not, process 1800 completes at end operation 1840. Otherwise, process 1800 moves to operation 1830, which recursively traverses to the next node in the tree.

[0181] Fig.19 is a flowchart of an exemplary process for accessing a distributed data structure. In some aspects, process 1900 may be performed by a device running a collaboration module instance. For example, process 1900 may be performed by one or more of devices 102a and / or 102b. In some aspects, a collaboration module instance may be run on the server side of an embodiment, such as on a computer that also runs synchronization service 106. In some aspects, instructions (e.g., instructions 2324, below) stored in a memory (e.g., main memory 2304, below) may configure a hardware processing circuit (e.g., processor 2302, below) to perform one or more of the functions discussed below. In some aspects, instructions (e.g., instructions 2324, below) stored in a memory (e.g., main memory 2304, below) may configure a hardware processing circuit (e.g., processor 2302, below) to perform one or more of the functions discussed below. Fig.19In the discussion of , a device that executes method 1900 may be referred to as an "execution device."

[0182] After start operation 1905, process 1900 moves to operation 1910, which joins a collaboration session. A collaboration session provides access to a distributed data structure. Joining a collaboration session may include establishing a session with synchronization service 106. In some aspects, joining a collaboration session may include interfacing with other devices and / or collaboration module instances participating in the collaboration session via a peer-to-peer protocol.

[0183] In operation 1915, offline editing is performed on the distributed data structure. Performing offline editing may include generating operations on the distributed data structure. In embodiments utilizing a tree structure such as discussed herein, performing offline editing may include generating non-leaf nodes and / or leaf nodes as needed to locally represent offline operations. Because edits may be generated when the executing device is unable to contact the synchronization service 106 (or other peer devices when using a peer-to-peer protocol), the collaboration window maintained at the executing device may become relatively large, including providing all operations in the offline editing operation.

[0184] In operation 1920 , the executing device rejoins the collaborative session. For example, while the executing device may not have a network connection to the synchronization service 106 during operation 1915 , in 1920 the network connection between the synchronization service 106 and the executing device is restored.

[0185] In operation 1925, a snapshot of the distributed data structure is received. As described above, a snapshot indicates an absolute value or state of the distributed data structure at a point in time. Thus, as an example, if one or more operations were applied to the distributed data structure prior to the snapshot, the snapshot represents the combined result of those one or more operations.

[0186] In operation 1930, any additional operations that occurred after the snapshot (initiated by other collaboration module instances) are transmitted to the execution device (and the collaboration module instance that performs the execution). This allows the execution device to represent a version of the distributed data structure based on the snapshot and the additional operations. Note that only operations with sequence numbers greater than the snapshot version will be included in the version.

[0187] In operation 1935, the offline edits are applied to the snapshot. In some aspects, operation 1935 includes: sending messages 200 for each offline edit in the offline edits, each message defining a particular offline edit as an operation on a distributed data structure. Each message will be constructed by process 1900, consistent with the description of message 200 discussed above. Operation 1935 may also include: receiving a corresponding number of responses / messages from the synchronization service 106, and the synchronization service 106 assigns a sequence number to each of the offline edits / operations. The execution device can then represent an additional version of the distributed data structure, which includes both the operation of 1930 and the operation of 1935. The process will generate a version of the distributed data structure maintained by the execution device that is consistent with the distributed data structure version maintained by other collaboration module instances participating in the collaboration.

[0188] Decision operation 1940 determines whether there are any conflicts between the offline edits and the operations applied to the snapshot. If there are conflicts, process 1900 moves to operation 1950, which displays a resolve conflict dialog box. The resolve conflict dialog box is configured to provide for manual selection of one of the two operations that are in conflict. The selected operation will be applied to the distributed data structure, and the second of the two operations will be canceled. If there are no conflicts, process 1900 moves to end operation 1955.

[0189] Fig. 20 2000 is a flow chart of an exemplary process for accessing a distributed data structure. In some aspects, process 2000 may be performed by a device running an instance of a collaboration module. For example, process 2000 may be performed by one or more devices in devices 102a and / or 102b. In some aspects, execution of the following description of Fig. 20 Collaboration module instances of one or more of the functions discussed may be run on the server side of an embodiment, such as on a computer that also runs the synchronization service 106. Fig. 20 The process 2000 discussed may be performed by a collaboration module instance, such as any of the collaboration module instances 102a-b. In some aspects, instructions (e.g., instructions 2324, below) stored in a memory (e.g., main memory 2304, below) may configure a hardware processing circuit (e.g., processor 2302, below) to perform one or more of the functions discussed below. Fig. 20 In the discussion of method 2000, a device that performs method 2000 may be referred to as an "execution device". Note that in various embodiments, the above description of at least Figure 15-19 and / or Fig.21 and / or Fig. 22 One or more of the functions discussed may be included in process 2000 .

[0190] After start operation 2005, process 2000 moves to operation 2010. Operation 2010 joins a collaboration session. The collaboration session provides access to a distributed data structure. Joining the collaboration session may include opening a network connection to a service, such as synchronization service 106. Joining the collaboration session may also include identifying to the service a distributed data structure to which the collaboration session will provide access. In some aspects, the distributed data structure may be in the form of a file. In some aspects, the file may be stored on a stable storage device accessible via a network. In some aspects, the distributed data structure may be identified via a uniform resource locator (URL).

[0191] In operation 2015, a message identifying a continuous sorting operation on a distributed data structure is received. In some aspects, the message is received from a synchronization service 106. In some other aspects of communicating between collaboration module instances participating in a collaboration session using a peer-to-peer protocol, a message can be received from one of the other collaboration module instances participating in the collaboration session. Each of the identified operations has a pending confirmation. The continuous sorting operation defines a collaboration window for the distributed data structure. In other words, the collaboration window represents an operation on a distributed data structure that has been initiated by a collaboration module instance participating in the collaboration but has not yet been confirmed by all of the collaboration module instances participating in the collaboration. Therefore, when the collaboration is viewed as a whole (considering all collaboration module instances participating in the collaboration), the collaboration window represents an operation that is still "in progress."

[0192] As mentioned above about Figure 2A As discussed with message 200, an operation sequence number (e.g., via field 206) and a maximum sequence number of synchronized or confirmed operations (e.g., via field 214) may be indicated. These two values ​​provide an indication of consecutive sequenced operations of a distributed data structure. For example, if the maximum sequence number of confirmed operations is N, and the operation sequence number is N+C (where C is a constant), there are C consecutive sequenced operations identified by the message that have pending confirmations. This is so because when all devices confirm an operation, the maximum sequence number of the confirmed operation (e.g., 214) will "move toward" the operation sequence number (e.g., 206). New operations will advance the operation sequence number when the operation sequence number is assigned to the collaboration module instances participating in the collaboration.

[0193] In operation 220, a first version of the distributed data structure is represented as including each operation in the continuous sorting operation. By representing the distributed data structure as including each operation in the continuous sorting operation, subsequent operations on the first version are based on the results of each operation in the continuous sorting operation. Some aspects can achieve this by storing or queuing information defining the continuous sorting operation. For example, some embodiments can use a queue or tree data structure to store pending (unconfirmed) operations. Once the continuous sorting operations are appropriately stored or queued, the distributed data structure is considered to "represent" those operations in these embodiments.

[0194] In some aspects, once an operation is confirmed by all collaborative module instances participating in the collaboration, the operation can be applied to the distributed data structure. In other words, the data included in the distributed data structure can be irrevocably modified by the operation. The details of how to represent the operation on the distributed data structure vary from embodiment to embodiment. In some embodiments, a garbage collection process or other process asynchronous with the collaboration on the distributed data structure can apply the operation to the data included in the distributed data structure. For example, the garbage collection process as described above can operate on the operation confirmed by all collaborative module instances participating in the collaboration. In some aspects, based on the message received in operation 2015, the distributed data structure can be modified based on the operation.

[0195] In operation 2025, the second version of the distributed data structure is represented as including a first operation, which is after the last operation in the continuous sorting operation. The first operation is initiated by an execution device. As described above, some embodiments may store information defining pending operations. Therefore, in these embodiments, information defining the first operation, such as the type of operation (e.g., field 208), the location or range to which the operation is applied within the distributed data structure (e.g., field 210), the version of the distributed data structure to which the operation is applied (e.g., field 204), and the collaborative module instance that initiated the operation (e.g., field 202), can be stored, queued, or otherwise recorded. By representing the second version of the distributed data structure, the subsequent operations performed on the distributed data structure take into account the results of the first operation. By representing the first operation on the distributed data structure, the operations after the first operation depend on the results of the first operation (to a certain extent, the subsequent operations depend on the results of the first operation).

[0196] In operation 2030, a notification message is sent. The notification message indicates that the first operation is applied to the first version of the distributed data structure. In some aspects, the notification message includes the above Figure 2AOne or more fields in the described fields. One or more values ​​of these fields are specific to the first operation. In an embodiment of serialization using a centralized service for operation, the notification can be transmitted to the synchronization service 106. In other embodiments of serialization using a peer protocol, the notification can be transmitted to another collaboration module instance participating in the collaboration.

[0197] Some aspects of process 2000 include receiving multiple notifications. Each notification is for a corresponding operation. As in the notification above, each notification indicates a unique sequence number assigned to the corresponding operation. Each notification also identifies the collaboration module instance that initiated the operation. In some aspects, there may be a one-to-one mapping between the collaboration module instance and the client device, so the identification of the collaboration module instance may be synonymous with the identification of a specific physically different computing device that is running a specific instance of the collaboration module. The unique sequence number assigned to each operation in the operation indicates the order in which the operation is applied to the distributed data structure. One or more of the multiple notifications received by process 2000 may be used for operations initiated by an execution device. For example, as described above, when a collaboration module instance initiates a new operation, it may transmit values ​​corresponding to one or more fields in the fields described above with respect to message 200 to other collaboration module instances participating in the collaboration. Since a sequence number has not yet been assigned to the operation, it may send a predetermined value indicating the same. Once a sequence number is assigned, a notification is provided back to the collaboration module instance that initially initiated the new operation. The notification will indicate an identifier (e.g., in field 202) of the collaboration module instance that is receiving the notification.

[0198] In some embodiments, process 2000 may include initiating a second operation of the distributed data structure, and later receiving a notification of the additional operation. The notification may further indicate (e.g., via a sequence number assigned to the additional operation) that the additional operation will be applied to the distributed data structure before the second operation. Alternatively, if the execution device receives a notification that a sequence number is assigned to the second operation, and then subsequently receives a second notification that a second sequence number is assigned to the additional operation, the second operation is applied to the distributed data structure before the additional operation.

[0199] Some aspects of process 2000 include: resolving an edit conflict between two operations on a distributed data structure. Resolving an edit conflict based on the relative order of two sequence numbers, each of which is assigned to one of the two conflicting operations. For example, an edit conflict between two edit operations may result in a later insertion appearing before an earlier insertion in the distributed data structure. Resolving an edit conflict between two delete operations by performing the delete operations in an order consistent with the order of their assigned sequence numbers.

[0200] Some aspects of process 2000 include receiving an indication of an updated collaboration window that excludes some of the continuous operations; and performing garbage collection on the excluded operations based on the received indication.

[0201] After operation 2030 , process 2000 moves to end operation 2035 .

[0202] Fig.21 21 is a flow chart of an exemplary process for accessing a distributed data structure. In some aspects, process 2100 may be performed by a device running a collaboration module instance. For example, process 2100 may be performed by one or more of devices 102a and / or 102b. In some aspects, the collaboration module instance may also be run on the server side of an embodiment, such as on a computer that also runs synchronization service 106. In some aspects, the following description of the process 2100 may be performed by a device running a collaboration module instance. Fig.21 The process 2100 discussed may be performed by a collaboration module instance, such as any of the collaboration module instances 105a-b. In some aspects, instructions (e.g., instructions 2324, below) stored in a memory (e.g., main memory 2304, below) may configure a hardware processing circuit (e.g., processor 2302, below) to perform one or more of the functions discussed below. Fig.21 In the discussion of method 2100, a device that performs method 2100 may be referred to as an "execution device". Note that in various embodiments, the above description of at least Figure 15-Figure 20 and / or Fig. 22 One or more of the functions discussed may be included in process 2100 .

[0203] After start operation 2105, process 2100 moves to operation 2110. Operation 2110 joins a collaboration session. The collaboration session provides access to a distributed data structure. Joining the collaboration session may include opening a network connection to a service, such as synchronization service 106. Joining the collaboration session may also include identifying to the service a distributed data structure to which the collaboration session will provide access. In some aspects, the distributed data structure may be in the form of a file. In some aspects, the file may be stored on a stable storage device accessible via a network. In some aspects, the distributed data structure may be identified via a uniform resource locator (URL).

[0204] In operation 2120, a notification is received. In at least some embodiments, the notification may be in the form of a network message. The notification may be received from the synchronization service 106. In some other embodiments utilizing a peer-to-peer protocol for communication between collaboration module instances of a collaboration session, the notification may be received from one of the other collaboration module instances participating in the collaboration session.

[0205] The notification indicates an operation performed by a remote device. In other words, the operation is performed by a device other than the executing device. The operation may be, for example, an insert, delete, or comment operation on a sequence data structure, such as a text string, a rich test string, or a stream. The operation may be indicated via a sequence number assigned to the operation.

[0206] The notification also indicates the location of the operation relative to the distributed data structure. For example, the location may include an offset from a starting data point or byte of the distributed data structure to a location in the distributed data structure where an insert, delete, or comment operation is to be applied, the offset being in bytes or words in various aspects. In the case of an insert operation, the location indicates where the new data is to be inserted into the distributed data structure, and the data of the pre-operation version of the distributed data structure after the location is located after the newly inserted data. In the case of a comment operation, the location indicates which portion of the distributed data structure is to be annotated. In the case of a remove operation, the location indicates the data to be removed in the distributed data structure. For example, the location may indicate a range of data locations to be removed from the distributed data structure by a remove operation.

[0207] The notification may also indicate the version of the distributed data structure to which the operation is applied. For example, as described above, the highest operation sequence number applied to a particular distributed data structure may define the version of the particular distributed data structure. The version or sequence number information may be transmitted to a collaboration module instance participating in the collaboration, such as a collaboration module instance running on an execution device, via a message including one or more of the fields of message 200, as described above with respect to Figure 2A discussed.

[0208] In operation 2130, the minimum length of a portion represented by a first node of a tree in a distributed data structure is identified. The tree represents a distributed data structure. The first node mentioned in operation 2130 can be any node of the tree, including a root node or a node below the root node. In some aspects, the first node can be a leaf node of the tree.

[0209] As described above, in an embodiment where a distributed data structure is represented as a tree, some parts of the distributed data structure may be synchronized across all collaboration module instances participating in the collaboration. Therefore, these parts are constant for all collaboration module instances in these collaboration module instances, and the length of these parts may be determined. This length is the minimum length mentioned in operation 2130, and is consistent with the discussion of the minimum length discussed throughout this disclosure.

[0210] In some embodiments, the notification may also indicate the minimum sequence number of operations to be confirmed or synchronized with all other clients participating in the collaboration. Figure 2A As discussed, the notification may include field 214 .

[0211] In operation 2140, determine the partial length specific to the second device and represented by the first node. As described above, when the device participating in the collaboration applies the operation to the distributed data structure, the distributed data structure evolves by the sequential version containing each operation in those operations. Therefore, the two collaborative module instances participating in the collaboration can have slightly different versions of the distributed data structure until some edits have been transmitted to the two collaborative module instances. The minimum length determined in operation 2140 takes into account these differences in the distributed data structure versions across the collaborative module instances. Operation 2140 determines the partial length represented by the first node of the version of the distributed data structure to which the second device operation is applied. As described above, the partial length can be specific not only to the collaborative module instance that performs the operation, but also to the version of the distributed data structure to which a specific operation is applied. In some aspects, formula 1 can be used to determine the partial length. In some embodiments, before performing operation 2140, the partial length may have been predetermined and the first node is updated to reflect the partial length.

[0212] In operation 2145, the size of the portion of the distributed data structure represented by the first node is determined. The size is based on the minimum length and the portion length. In some aspects, the size is the sum of the minimum length and the portion length.

[0213] In operation 2150, it is determined that the size of the portion is greater than or equal to the location of the operation within the distributed data structure. As described above, in embodiments where the distributed data structure is represented as a tree, particular nodes of the tree represent particular portions of the distributed data structure. Process 2100 describes how embodiments may identify which particular nodes represent portions of the tree to which an operation is being applied by searching the nodes of the tree based on the length of the distributed data structure represented by each node.

[0214] Although operation 2150 indicates that the location of the second device operation is at or below the first node, in other examples, the size may be less than the location, indicating that other child nodes of the first node need to be searched to identify a node representing a portion of the distributed data structure that includes the location. The process can continue across the sibling nodes of the first node until the appropriate branch of the tree is identified. The process can then proceed lower in the tree to gradually narrow the scope of the portion of the distributed data structure until a leaf node representing the portion is identified.

[0215] In operation 2160, a leaf node is determined based on the determination of operation 2150. Since operation 2150 determined that the portion of the distributed data structure including the location is represented by the first node, operation 2160 may drill down into the tree (to the children of the first node) to gradually narrow the search until a leaf node representing the location is identified.

[0216] In operation 2170, a second device operation is represented in a tree based on the identified leaf node. Indicating that the operation may include various items. If the operation is an insert or remove operation, the identified leaf node may be split as needed to provide a single leaf node to include the portion of the distributed data structure affected by the operation. For example, if an insert operation is performed, the leaf node may be split into three nodes at the position, the first node representing a portion before the inserted data in the distributed data structure, the second leaf node representing the inserted data, and the third leaf node representing any remaining data from the identified leaf node. For a remove operation, the leaf node may be updated to indicate a sequence number for the operation. The identified leaf node may also be split for a remove operation so that the removed data is represented by a single leaf node, or at least the undeleted data is not represented in the same leaf node as the deleted data. For an annotation operation, the leaf node may be updated to include annotation information. The leaf node may also be appropriately split as needed to represent the operation in the tree.

[0217] After operation 2170 is completed, process 2100 moves to end operation 2175.

[0218] Fig. 22 2200 is a flow chart of an exemplary process for accessing a distributed data structure. In some aspects, process 2200 may be performed by a device running a collaboration module instance. For example, process 2200 may be performed by one or more of devices 102a and / or 102b. In some aspects, the collaboration module instance may also be run on the server side of an embodiment, such as on a computer that also runs synchronization service 106. In some aspects, the following description of the process 2200 may be performed by a device running a collaboration module instance. Fig. 22 The process 2200 discussed may be performed by a collaboration module instance, such as any of the collaboration module instances 105a-b. In some aspects, instructions (e.g., instructions 2324, below) stored in a memory (e.g., main memory 2304, below) may configure a hardware processing circuit (e.g., processor 2302, below) to perform one or more of the functions discussed below. Fig. 22 In the discussion of , the device that executes method 2200 may be referred to as an "execution device."

[0219] Note that in various embodiments, the above description of at least Figure 15-19 and / or Fig. 20 and / or Fig.21 and / or Fig.24 One or more of the functions discussed may be included in process 2200 .

[0220] After start operation 2202, process 2200 moves to operation 2205. In operation 2205, a device joins a collaboration. The collaboration provides access to a distributed data structure. Joining a collaboration session may include opening a network connection to a service, such as synchronization service 106. Joining a collaboration session may also include identifying to the service a distributed data structure to which the collaboration session will provide access. In some aspects, the distributed data structure may be in the form of a file. In some aspects, the file may be stored on a stable storage device accessible via a network. In some aspects, the distributed data structure may be identified via a uniform resource locator (URL).

[0221] In operation 2210, indications of a plurality of corresponding operations for serializing a distributed data structure are received. In some aspects, each of these indications may be a message from a serialization service, including the messages 200 and 201 described above. Figure 2A One or more of the fields discussed. The indication also indicates the device that initiated each of these operations (eg, field 202 of message 200). As described above, the indication may instead indicate a collaboration module instance, rather than a device.

[0222] In operation 2215, multiple operations on the distributed data structure (e.g., via 320) and results of the operations on the distributed data structure (e.g., via at least 322) are represented in the leaf nodes of the tree. As described above, for example, with respect to Figure 4-Figure 13 , operations can be represented in leaf nodes of the tree and selectively applied to data in the distributed data structure based on the initiating device of the operation (e.g., a collaborating module instance), the DDS version to which the initiating device applies the operation, and a sequence number assigned to the operation.

[0223] In operation 2220, a specific length of an initiating device (or initiating collaboration module instance) is represented for a portion of a distributed data structure represented by a leaf node below a non-leaf node. In various embodiments, operation 2230 may be performed for each non-leaf node in the tree, or at least for a non-leaf node between a leaf node and a root node of the tree. As described above, partial length information is included in the non-leaf node of the tree. A minimum length value may also be represented in a non-leaf node, the minimum length value representing the minimum length of a DDS represented by a leaf node below a non-leaf node.

[0224] In operation 2225, additional indications of additional operations to be performed by a particular initiating device are received. Indications of locations within the distributed data structure where the operations are to be applied (e.g., locations to be inserted, or ranges of locations to be removed, or locations to be annotated) are also received. In some aspects, operation 2225 includes: receiving the instructions including the instructions described above with respect to Figure 2A A message providing an indication of one or more of the fields in question.

[0225] In operation 2230, a leaf node of the tree is identified, which represents a portion of the distributed data structure to which the additional operation is applied. For example, if the operation is an insert operation into a string at offset X, operation 2230 identifies a leaf node representing offset X in the string. To identify the leaf node, operation 2230 relies on one or more of the partial length values ​​discussed above that are specific to the device (or collaboration module instance) that initiated the operation. The leaf node is further identified based on the version of the distributed data structure to which the additional operation is applied by the specific initiating device.

[0226] In operation 2235, the leaf node is modified based on the additional operation. As described above, some example modifications include: splitting the boot node into multiple nodes to facilitate the insertion of data. For a delete operation, the leaf node can be modified by recording the sequence number assigned to the delete operation. In some embodiments, the leaf node can also be split to provide a leaf node dedicated to the deleted data. If the operation is a comment operation, the comment data can be copied to the leaf node or otherwise associated with the leaf node. (The indicator text of the bold string is an example of a comment). Process 2200 then moves to end operation 2238.

[0227] As described above, process 2200 may include receiving a message from a serialization service (or peer protocol) indicating one or more of the fields of message 200, as described above with respect to Figure 2A As discussed above Figure 2B As discussed, these messages define a collaboration window for operations that have not yet been confirmed by all participants (collaboration module instances or devices) of the collaboration. Process 2200 may also include applying maintenance processes to leaf nodes in the tree that represent operations below the collaboration window. As described above, these maintenance operations may include combining leaf nodes when those leaf nodes represent continuous data of the DDS, removing nodes entirely (e.g., if data is deleted by an operation below the collaboration window, the leaf node representing that data may be removed from the tree).

[0228] Fig.23A block diagram of an exemplary machine 2300 on which any one or more of the techniques (e.g., methods) discussed herein may be performed is shown. In alternative embodiments, machine 2300 may operate as a standalone device or may be connected (e.g., networked) to other machines. In a networked deployment, in a server-client network environment, machine 2300 may operate as a server machine, a client machine, or both. In an example, machine 2300 may be used as a peer machine in a peer-to-peer (P2P) (or other distributed) network environment. Machine 2300 may be a personal computer (PC), a tablet PC, a set-top box (STB), a personal digital assistant (PDA), a mobile phone, a smart phone, a network appliance, a network router, a switch or bridge, a server computer, a database, a conference room device, or any machine capable of executing (sequentially or otherwise) instructions that specify actions to be performed by the machine. In various embodiments, machine 2300 may execute the instructions described above for Figure 1A-Figure 22 Or below for Fig.24 Further, while only a single machine is shown, the term “machine” should also be understood to include any collection of machines that individually or jointly execute a set (or multiple sets) of instructions to perform any one or more of the methodologies discussed herein, such as cloud computing, software as a service (SaaS), and other computer cluster configurations.

[0229] As described herein, examples may include or may operate on: a logic unit or multiple components, modules, or mechanisms (hereinafter all referred to as "modules"). A module is a tangible entity (e.g., hardware) that is capable of performing a specified operation and may be configured or arranged in a certain manner. In an example, a circuit may be arranged (e.g., intrinsically and or relative to an external entity such as other circuits) as a module in a specified manner. In an example, part or all of one or more computer systems (e.g., separate client or server computer systems), or one or more hardware processors 1202 may be configured by firmware or software (e.g., instructions, application parts, or applications) as a module that operates to perform a specified operation. In an example, the software may be located on a machine-readable medium. In an example, when executed by the underlying hardware of the module, the software causes the hardware to perform the specified operation.

[0230] Thus, the term "module" is understood to include a tangible entity that is physically constructed, specifically configured (e.g., hardwired) or temporarily (e.g., temporarily) configured (e.g., programmed) to perform in a particular manner, or to perform part or all of any operations described herein. Considering examples in which modules are temporarily configured, each of these modules need not be instantiated at any one time. For example, where the modules include a general-purpose hardware processor configured using software, the general-purpose hardware processor can be configured as various different modules at different times. The software can accordingly configure the hardware processor to, for example, construct a particular module at one time and to construct a different module at another different time.

[0231] The machine (e.g., computer system) 2300 may include a hardware processor 2302 (e.g., a central processing unit (CPU), a graphics processing unit (GPU), a hardware processor core, or any combination thereof), a main memory 2304, and a static memory 2306, some or all of which may communicate with each other via an interconnect (e.g., a bus) 2308. The machine 2300 may also include a display unit 2310, an alphanumeric input device 2312 (e.g., a keyboard), and a user interface (UI) navigation device 2314 (e.g., a mouse). In an example, the display unit 2310, the input device 2312, and the UI navigation device 2314 may be a touch screen display. The machine 2300 may additionally include a storage device (e.g., a drive unit) 2316, a signal generating device 2318 (e.g., a speaker), a network interface device 2320, and one or more sensors 2321, such as a global positioning system (GPS) sensor, a compass, an accelerometer, or other sensors. The machine 2300 may include an output controller 2328, such as a serial (e.g., universal serial bus (USB), parallel or other wired or wireless (e.g., infrared (IR), near field communication (NFC), etc.) connection to communicate with or control one or more peripheral devices (e.g., a printer, a card reader, etc.).

[0232] The storage device 2316 may include a machine-readable medium 2322 on which is stored one or more sets of data structures or instructions 2324 (e.g., software) embodying or used by any one or more of the techniques or functionality described herein. The instructions 2324 may also be located, completely or at least partially, within the main memory 2304, within the static memory 2306, or within the hardware processor 2302 during execution of the instructions by the machine 2300. In an example, one or any combination of the hardware processor 2302, the main memory 2304, the static memory 2306, or the storage device 2316 may constitute a machine-readable medium.

[0233] Although the machine-readable medium 2322 is illustrated as a single medium, the term “machine-readable medium” may include a single medium or multiple media (eg, a centralized or distributed database, and / or associated caches and servers) configured to store one or more instructions 2324 .

[0234] The term "machine-readable medium" may include any medium that can store, encode, or carry instructions for execution by the machine 2300, and cause the machine 2300 to perform any one or more of the technologies of the present disclosure, or can store, encode, or carry data structures used by or associated with these instructions. Non-limiting examples of machine-readable media may include solid-state memory and optical and magnetic media. Specific examples of machine-readable media may include: non-volatile memory, such as semiconductor memory devices (e.g., electrically programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM))) and flash memory devices; disks, such as internal hard disks and removable disks; magneto-optical disks; random access memory (RAM); solid-state drives (SSD); and CD-ROM and DVD-ROM disks. In some examples, the machine-readable medium may include non-temporary machine-readable media. In some examples, the machine-readable medium may include machine-readable media that is not a transient propagation signal.

[0235] The instructions 2324 may also be sent or received over a communication network 2326 using a transmission medium via the network interface device 2320. The machine 2300 may communicate with one or more other machines using any of a variety of transmission protocols (e.g., frame relay, Internet Protocol (IP), transmission control protocol (TCP), user datagram protocol (UDP), hypertext transfer protocol (HTTP), etc.). Exemplary communication networks may include a local area network (LAN), a wide area network (WAN), a packet data network (e.g., the Internet), a mobile telephone network (e.g., a cellular network), a plain old telephone (POTS) network, and a wireless data network (e.g., a wireless network known as a Wi-Fi network). The Institute of Electrical and Electronics Engineers (IEEE) 802.11 series of standards, known as IEEE 802.16 family of standards), IEEE 802.15.4 family of standards, Long Term Evolution (LTE) family of standards, Universal Mobile Telecommunications System (UMTS) family of standards, peer-to-peer (P2P) networks, and the like. In an example, the network interface device 2320 may include one or more physical jacks (e.g., Ethernet, coaxial cable, or telephone jacks) or one or more antennas connected to the communication network 2326. In an example, the network interface device 2320 may include multiple antennas to communicate wirelessly using at least one of single-input multiple-output (SIMO), multiple-input multiple-output (MIMO), or multiple-input single-output (MISO) technologies. In some examples, the network interface device 2320 may use multi-user MIMO technology for wireless communication.

[0236] Fig.24 2400 may be performed by the serialization service 106. In some aspects, instructions (e.g., instructions 2324, above) stored in a memory (e.g., main memory 2304, above) may configure a hardware processing circuit (e.g., processor 2302, above) to perform one or more of the functions discussed below. Fig.24 In the discussion of method 2200, a device that performs method 2200 may be referred to as an "execution device". Note that in various embodiments, the above description of at least Figure 14-Figure 19 and / or Fig. 20 and / or Fig.21 and / or Fig. 22 One or more of the functions discussed may be included in process 2400 .

[0237] After start operation 2402, process 2400 moves to operation 2405, which establishes a collaborative session with a plurality of devices. The collaborative session provides access to a distributed data structure.

[0238] In operation 2410, a message is received. The message requests that a sequence number be assigned to an operation. For example, operation 2410 may receive a message including the one described above regarding Figure 2A and message 200. For example, the message may indicate the collaboration module instance or device that initiated the operation (e.g., field 202), and request that a sequence number be assigned to the operation indicated in the message (e.g., the operation may be indicated by one or more of fields 208, 2010, 212). In some aspects as described above, the request may be indicated via a predetermined value (e.g., -1) included in sequence number field 206.

[0239] In some aspects, the received message may be decoded to identify that a sequence number indicated in the message is set to a predetermined value indicating that a sequence number needs to be assigned to the operation (e.g., sequence number field 206 may be set to a predetermined value, such as -1). A determination may then be made based on the identification that the message is requesting a sequence number assignment.

[0240] In some aspects, the received message indicates a version number of the distributed data structure associated with the operation (eg, via field 204 ).

[0241] In operation 2415, a sequence number is assigned to the operation. The operation is performed in response to the message received in operation 2410. The operation may be performed as described above with respect to, for example, Figure 2B and / or Figure 2C For example, sequence numbers may be assigned to define the order of operations initiated by various collaboration module instances or devices participating in a collaboration session.

[0242] In operation 2420, a first notification indicating the operation and the assigned sequence number is sent to each device in the plurality of devices. For example, the first notification may include the above-mentioned Figure 2A and one or more of the fields discussed in message 200. As described above, the execution device may notify each of the collaboration participants (devices and / or collaboration module instances) via a single broadcast message, multiple multicast messages, or individual unicast messages sent to each participant individually. Since the first notification may include Figure 2A Any field in the field of , so the notification can also notify each device in the multiple devices of the current maximum sequence number (e.g., reference sequence number) of the operation that has been confirmed by all devices.

[0243] The first notification may be generated to further indicate a version associated with the operation. In addition, any information related to the operation may be provided in the first notification. For example, the first notification may include values ​​in any of the fields of message 200 that are consistent with values ​​included in the message received in operation 2410. Figure 2DAs described, in some cases, the version number associated with a first operation received from a collaborative participant may be adjusted based on other locally initiated operations at the participant. Specifically, when the first operation is performed, the number of operations that are not assigned sequence numbers at the collaborative participant is related to how the version number is adjusted. The version number is adjusted to account for these operations (with pending sequence number assignments). As described above, if the first operation is associated with a first version, but the initiating participant has N other operations pending before initiating the first operation, the first version may be adjusted to reflect that these N pending operations were applied to the distributed data structure before the first operation was initiated at the collaborative participant. In some aspects that utilize numerically higher sequence numbers to represent higher-ordered operations and versions, the first version may be adjusted to the first version + N. In some aspects, N may be determined by first determining the number of operations initiated by the participant since the version of the distributed data structure specified in the operation 2410 message (excluding the operation of the 2410 message). N may be set to the number of operations. This is discussed above with respect to Figure 2D Described.

[0244] Operation 2425 determines that each device in a plurality of devices (participants in the collaboration of the device and / or collaboration module instance) has confirmed the operation. Operation 2425 can make this determination by monitoring messages received from each device in the plurality of devices. Specifically, the above-mentioned Figure 2A The value of the maximum sequence number field 214 of the message 200 discussed. When the value of this field in a specific message from a specific device (or a collaboration module instance) indicates a value equal to or higher than the sequence number assigned in operation 2415 in the operation sequence, operation 2425 determines that the specific device has confirmed the operation. Operation 2425 then monitors the value received from each of the multiple devices (or collaboration module instances). When all devices indicate the same, the determination of operation 2425 is completed.

[0245] In operation 2430, a second notification is sent to each of the plurality of devices. The second notification indicates the determination of operation 2425. The second notification may include the above-mentioned Figure 2A In some aspects, by including one or more of the fields discussed in the message 200. Figure 2A The value of field 214 of the message is set to a value at least as high in the order of operations as the assigned sequence number to indicate this determination. Process 2400 then moves to end operation 2435.

[0246] Although process 2400 is described above as assigning a single sequence number to a single operation, those skilled in the art will appreciate that process 2400 may operate iteratively to assign multiple sequence numbers to multiple operations. Operations initiated by various collaboration participants (devices and / or collaboration module instances) may be received in an interleaved manner, and process 2400 may assign sequence numbers to these interleaved operations in an order consistent with the order in which the operations were received.

[0247] Process 2400 may also include: generating a snapshot of the distributed data structure. Figure 2E As discussed, a snapshot can incorporate the results of all operations on a distributed data structure up to a certain sequence number. Once those results have been applied to the distributed data structure, the snapshot represents the value of the distributed data structure. When a new participant joins the collaboration, the snapshot can be provided to the new participant. In addition, any operations that were assigned a sequence number but were not included in the snapshot can also be provided to the new participant. This allows the new participant to apply those operations to the snapshot and synchronize its local version of the distributed data structure with the local versions of the other participants of the collaboration.

[0248] As described herein, examples may include or may operate on the following: a logic unit or multiple components, modules, or mechanisms. A module is a tangible entity (e.g., hardware) that can perform a specified operation and may be configured or arranged in a certain manner. In an example, a circuit may be arranged (e.g., intrinsically or relative to an external entity such as other circuits) as a module in a specified manner. In an example, a portion or the entirety of one or more computer systems (e.g., a separate client, or a server computer system), or one or more hardware processors 1202 may be configured by firmware or software (e.g., instructions, application parts, or applications) to operate to perform a specified operation of the module. In an example, the software may be located on a machine-readable medium. In an example, when executed by the underlying hardware of the module, the software causes the hardware to perform the specified operation.

[0249] Example 1 is a method performed by a device, comprising: joining a collaborative session that provides access to a distributed data structure; receiving a message identifying a consecutive sequence of operations on the distributed data structure, each of the identified operations having a pending confirmation; representing a first version of the distributed data structure, the first version being represented as including each operation in the consecutive sequence of operations; representing a second version of the distributed data structure to include a first operation, the first operation being sequenced after the last operation in the consecutive sequence of operations; and sending a second message, the second message indicating the first operation and also indicating an association between the first operation and the first version.

[0250] In Example 2, the inventive subject matter described in Example 1 optionally includes: receiving multiple messages indicating multiple corresponding operations, each of the messages indicating a unique serial number assigned to each of the corresponding operations, each message also identifying a different device that initiated the corresponding operation and participated in the collaborative session, and the unique serial number also indicating the order in which the multiple operations operate on the distributed data structure; and representing the distributed data structure to include each of the multiple operations.

[0251] In Example 3, the inventive subject matter described in Example 2 optionally includes: wherein a message in the multiple messages indicates that the device initiated the corresponding operation.

[0252] In Example 4, the inventive subject matter described according to one or more of Examples 1-3 optionally includes: representing a third version of the distributed data structure to include a second operation; receiving a third message indicating an additional operation and a further indication that the additional operation was applied to the distributed data structure before the second operation; and modifying the second version of the distributed data structure to be consistent with the third message.

[0253] In Example 5, the inventive subject matter according to any one or more of Examples 1-4 may optionally include receiving a third message indicating a first sequence number assigned to the first operation.

[0254] In Example 6, the inventive subject matter described in Example 5 optionally includes: receiving a fourth message indicating a second device operation, the fourth message also indicating that the second device operation is applied to a third version of the distributed data structure, and the fourth message also indicating a second serial number assigned to the second device operation.

[0255] In Example 7, the inventive subject matter according to Example 6 optionally includes: resolving an editing conflict on the distributed data structure between the first operation and the second device operation based on a relative order of the first sequence number and the second sequence number.

[0256] In Example 8, the inventive subject matter according to any one or more of Examples 1-7 optionally includes: wherein the continuous sorting operation defines a cooperation window of the distributed data structure.

[0257] In Example 9, the inventive subject matter described in Example 8 optionally includes: wherein the representation of the second version of the distributed data structure includes: storing first data defining each operation in the continuous sorting operation; and storing second data defining the first operation based on the first data.

[0258] In Example 10, the inventive subject matter described according to any one or more of Examples 8-9 optionally includes: receiving an indication of an updated collaboration window, wherein the updated collaboration window excludes some operations in the continuous operations; and performing garbage collection on the excluded operations based on the received indication.

[0259] In Example 11, the inventive subject matter described according to any one or more of Examples 1-10 optionally includes: wherein the version of the distributed data structure is defined by the highest-ordered operation sequence number included in the version.

[0260] In Example 12, the inventive subject matter according to any one or more of Examples 1-11 optionally includes receiving a message defining a second operation, a sequence number assigned to the second operation, and a highest-ranked operation sequence number confirmed by a participant in the collaborative session.

[0261] In Example 13, the inventive subject matter according to Example 12 optionally includes: wherein the continuous sorting operation includes an operation with an assigned sequence number, the assigned sequence number is higher in sequence than the highest sorting sequence number confirmed by the devices participating in the collaborative session and is lower in sequence than or equal to the sequence number.

[0262] In Example 14, the inventive subject matter of any one or more of Examples 1-13 may optionally include: wherein the indication of the serial ordering operation is received from a service in communication with a participant of the collaborative session.

[0263] In Example 15, the inventive subject matter of Example 14 optionally includes: wherein the second message is sent to the service.

[0264] In Example 16, the inventive subject matter according to any one or more of Examples 1-15 optionally includes: wherein the indication of the continuous sorting operation is received via a peer protocol.

[0265] In Example 17, the inventive subject matter of Example 16 optionally includes: wherein the second message is sent via the peer protocol.

[0266] Example 18 is a device comprising: a hardware processing circuit; one or more hardware memories storing instructions that, when executed, configure the hardware processing circuit to perform operations including: joining a collaborative session that provides access to a distributed data structure; receiving a message identifying consecutive ordered operations on the distributed data structure, each of the identified operations having a pending confirmation; representing a first version of the distributed data structure, the first version being represented as including each operation in the consecutive ordered operations; representing a second version of the distributed data structure to include a first operation, the first operation being ordered after the last operation in the consecutive ordered operations; and sending a second message, the second message indicating the first operation and also indicating an association between the first operation and the first version.

[0267] In Example 19, the inventive subject matter described in Example 18 optionally includes that the operation also includes: receiving multiple messages indicating multiple corresponding operations, each of the messages indicating a unique serial number assigned to each of the corresponding operations, each message also identifying a different device that initiated the corresponding operation and participated in the collaborative session, and the unique serial number also indicates the order in which the multiple operations operate on the distributed data structure; and representing the distributed data structure to include each of the multiple operations.

[0268] In Example 20, the inventive subject matter of Example 19 optionally includes: wherein a message in the plurality of messages indicates that the device initiated the corresponding operation.

[0269] In Example 21, the inventive subject matter described according to one or more of Examples 18-20 optionally includes that the operation also includes: representing a third version of the distributed data structure to include a second operation; receiving a third message indicating an additional operation and a further indication that the additional operation was applied to the distributed data structure before the second operation; and modifying the second version of the distributed data structure to be consistent with the third message.

[0270] In Example 22, the inventive subject matter according to any one or more of Examples 18-21 optionally includes that the operation further includes: receiving a third message indicating a first sequence number assigned to the first operation.

[0271] In Example 23, the inventive subject matter described in Example 22 optionally includes that the operation also includes: receiving a fourth message indicating a second device operation, the fourth message also indicating that the second device operation is applied to a third version of the distributed data structure, and the fourth message also indicating a second serial number assigned to the second device operation.

[0272] In Example 24, the inventive subject matter according to Example 23 optionally includes that the operation further includes: resolving an editing conflict on the distributed data structure between the first operation and the second device operation based on a relative order of the first sequence number and the second sequence number.

[0273] In Example 25, the inventive subject matter according to any one or more of Examples 18-24 optionally includes: wherein the continuous sorting operation defines a cooperation window of the distributed data structure.

[0274] In Example 26, the inventive subject matter according to Example 25 optionally includes: wherein the representation of the second version of the distributed data structure includes: storing first data defining each operation in the continuous sorting operation; and storing second data defining the first operation based on the first data.

[0275] In Example 27, the inventive subject matter described in Example 26 optionally includes that the operation also includes: receiving an indication of an updated collaboration window, wherein the updated collaboration window excludes some operations in the continuous operations; and performing garbage collection on the excluded operations based on the received indication.

[0276] In Example 28, the inventive subject matter described according to any one or more of Examples 18-27 optionally includes: wherein the version of the distributed data structure is defined by the highest-ordered operation sequence number included in the version.

[0277] In Example 29, the inventive subject matter described according to any one or more of Examples 18-28 optionally includes that the operation also includes: receiving a message defining a second operation, a sequence number assigned to the second operation, and the highest-ranked operation sequence number confirmed by a participant in the collaborative session.

[0278] In Example 30, the inventive subject matter described according to any one or more of Examples 12-29 optionally includes: wherein the continuous sorting operation includes an operation with an assigned sequence number, and the assigned sequence number is higher in sequence than the highest sorting sequence number confirmed by the devices participating in the collaborative session and is lower in sequence than or equal to the sequence number.

[0279] In Example 31, the inventive subject matter according to any one or more of Examples 18-30 may optionally include: wherein the indication of the continuous sequencing operation is received from a service in communication with a participant of the collaborative session.

[0280] In Example 32, the inventive subject matter of Example 31 optionally includes: wherein the second message is sent to the service.

[0281] In Example 33, the inventive subject matter according to any one or more of Examples 18-32 optionally includes: wherein the indication of the continuous sorting operation is received via a peer protocol.

[0282] In Example 34, the inventive subject matter of Example 33 optionally includes: wherein the second message is sent via the peer protocol.

[0283] Example 35 is a non-transitory computer-readable storage medium comprising instructions that, when executed by hardware processing circuitry of a device, configure the device to perform operations comprising: joining a collaborative session that provides access to a distributed data structure; receiving a message identifying a consecutive sequence of operations on the distributed data structure, each of the identified operations having a pending confirmation; representing a first version of the distributed data structure, the first version being represented as including each operation in the consecutive sequence of operations; representing a second version of the distributed data structure to include a first operation, the first operation being sequenced after the last operation in the consecutive sequence of operations; and sending a second message, the second message indicating the first operation and also indicating an association between the first operation and the first version.

[0284] In Example 36, the inventive subject matter described in Example 35 optionally includes that the operation also includes: receiving multiple messages indicating multiple corresponding operations, each of the messages indicating a unique serial number assigned to each of the corresponding operations, each message also identifying a different device that initiated the corresponding operation and participated in the collaborative session, and the unique serial number also indicates the order in which the multiple operations operate on the distributed data structure; and representing the distributed data structure to include each of the multiple operations.

[0285] In Example 37, the inventive subject matter of Example 36 optionally includes: wherein a message in the plurality of messages indicates that the device initiated the corresponding operation.

[0286] In Example 38, the inventive subject matter described according to one or more of Examples 35-37 optionally includes that the operation also includes: representing a third version of the distributed data structure to include a second operation; receiving a third message indicating an additional operation and a further indication that the additional operation was applied to the distributed data structure before the second operation; and modifying the second version of the distributed data structure to be consistent with the third message.

[0287] In Example 39, the inventive subject matter according to any one or more of Examples 35-38 optionally includes that the operation further includes: receiving a third message indicating a first sequence number assigned to the first operation.

[0288] In Example 40, the inventive subject matter described in Example 39 optionally includes that the operation also includes: receiving a fourth message indicating a second device operation, the fourth message also indicating that the second device operation is applied to a third version of the distributed data structure, and the fourth message also indicating a second serial number assigned to the second device operation.

[0289] In Example 41, the inventive subject matter according to Example 40 optionally includes that the operation further includes: resolving an editing conflict on the distributed data structure between the first operation and the second device operation based on a relative order of the first sequence number and the second sequence number.

[0290] In Example 42, the inventive subject matter according to any one or more of Examples 35-41 optionally includes: wherein the continuous sorting operation defines a cooperation window of the distributed data structure.

[0291] In Example 43, the inventive subject matter according to Example 42 optionally includes: wherein the representation of the second version of the distributed data structure includes: storing first data defining each operation in the continuous sorting operation; and storing second data defining the first operation based on the first data.

[0292] In Example 44, the inventive subject matter described according to any one or more of Examples 42-43 optionally includes that the operation also includes: receiving an indication of an updated collaborative window, wherein the updated collaborative window excludes some of the continuous operations; and based on the received indication, performing garbage collection on the excluded operations.

[0293] In Example 45, the inventive subject matter described according to any one or more of Examples 35-44 optionally includes: wherein the version of the distributed data structure is defined by the highest-ordered operation sequence number included in the version.

[0294] In Example 46, the inventive subject matter described according to any one or more of Examples 35-45 optionally includes that the operation also includes: receiving a message defining a second operation, a sequence number assigned to the second operation, and the highest-ranked operation sequence number confirmed by a participant in the collaborative session.

[0295] In Example 47, the inventive subject matter according to Example 46 optionally includes: wherein the continuous sorting operation includes an operation with an assigned sequence number, the assigned sequence number is higher in sequence than the highest sorting sequence number confirmed by the devices participating in the collaborative session and is lower in sequence than or equal to the sequence number.

[0296] In Example 48, the inventive subject matter of Example 47 optionally includes: wherein the indication of the continuous sequencing operation is received from a service in communication with a participant of the collaborative session.

[0297] In Example 49, the inventive subject matter of Example 48 optionally includes: wherein the second message is sent to the service.

[0298] In Example 50, the inventive subject matter according to any one or more of Examples 47-49 optionally includes: wherein the indication of the continuous sorting operation is received via a peer protocol.

[0299] In Example 51, the inventive subject matter according to Example 50 optionally includes: wherein the second message is sent via the peer protocol.

[0300] Example 52 is an apparatus comprising: a unit for joining a collaborative session that provides access to a distributed data structure; a unit for receiving a message identifying a consecutive sequence of operations on the distributed data structure, each of the identified operations having a pending confirmation; a unit for representing a first version of the distributed data structure, the first version being represented as including each operation in the consecutive sequence of operations; a unit for representing a second version of the distributed data structure to include a first operation, the first operation being sequenced after the last operation in the consecutive sequence of operations; and a unit for sending a second message, the second message indicating the first operation and also indicating an association between the first operation and the first version.

[0301] In Example 53, the inventive subject matter described in Example 52 optionally includes: a unit for receiving multiple messages indicating multiple corresponding operations, each of the messages indicating a unique serial number assigned to each of the corresponding operations, each message also identifying a different device participating in the collaborative session that initiated the corresponding operation, and the unique serial number also indicating the order in which the multiple operations operate on the distributed data structure; and a unit for representing the distributed data structure to include each of the multiple operations.

[0302] In Example 54, the inventive subject matter described in Example 53 optionally includes: wherein a message in the multiple messages indicates that the device initiated the corresponding operation.

[0303] In Example 55, the inventive subject matter described according to one or more of Examples 52-54 optionally includes: a unit for representing a third version of the distributed data structure to include a second operation; a unit for receiving a third message indicating an additional operation and a further indication that the additional operation was applied to the distributed data structure before the second operation; and a unit for modifying the second version of the distributed data structure to be consistent with the third message.

[0304] In Example 56, the inventive subject matter according to any one or more of Examples 52-55 may optionally include means for receiving a third message indicating a first sequence number assigned to the first operation.

[0305] In Example 57, the inventive subject matter described in Example 56 optionally includes: a unit for receiving a fourth message indicating a second device operation, the fourth message also indicating that the second device operation is applied to a third version of the distributed data structure, and the fourth message also indicating a second serial number assigned to the second device operation.

[0306] In Example 58, the inventive subject matter according to Example 57 optionally includes: a unit for resolving an editing conflict on the distributed data structure between the first operation and the second device operation based on the relative order of the first sequence number and the second sequence number.

[0307] In Example 59, the inventive subject matter according to any one or more of Examples 52-58 optionally includes: wherein the continuous sorting operation defines a cooperation window of the distributed data structure.

[0308] In Example 60, the inventive subject matter according to Example 59 optionally includes: wherein the representation of the second version of the distributed data structure includes: a unit for storing first data defining each operation in the continuous sorting operation; and a unit for storing second data defining the first operation based on the first data.

[0309] In Example 61, the inventive subject matter described in Example 60 optionally includes: a unit for receiving an indication of an updated collaborative window, wherein the updated collaborative window excludes some of the continuous operations; and a unit for performing garbage collection on the excluded operations based on the received indication.

[0310] In Example 62, the inventive subject matter described according to any one or more of Examples 52-61 optionally includes: wherein the version of the distributed data structure is defined by the highest-ordered operation sequence number included in the version.

[0311] In Example 63, the inventive subject matter according to any one or more of Examples 52-62 optionally includes: a unit for receiving a message defining a second operation, a sequence number assigned to the second operation, and a highest-ranked operation sequence number confirmed by a participant in the collaborative session.

[0312] In Example 64, the inventive subject matter according to Example 63 optionally includes: wherein the continuous sorting operation includes an operation with an assigned sequence number, the assigned sequence number is higher in sequence than the highest sorting sequence number confirmed by the devices participating in the collaborative session and is lower in sequence than or equal to the sequence number.

[0313] In Example 65, the inventive subject matter according to any one or more of Examples 52-64 may optionally include: wherein the indication of the continuous sequencing operation is received from a service in communication with a participant of the collaborative session.

[0314] In Example 66, the inventive subject matter of Example 65 optionally includes: wherein the second message is sent to the service.

[0315] In Example 67, the inventive subject matter according to any one or more of Examples 52-66 optionally includes: wherein the indication of the continuous sorting operation is received via a peer protocol.

[0316] In Example 68, the inventive subject matter of Example 67 optionally includes: wherein the second message is sent via the peer protocol.

[0317] Example 69 is a non-transitory computer-readable storage medium comprising instructions that, when executed, configure a hardware processing circuit to perform operations including: establishing a collaborative session with multiple devices, the collaborative session providing collaborative access to a distributed data structure; receiving a message from a device included in the multiple devices, the message indicating a request for assigning a serial number to an operation on the distributed data structure; in response to the request, assigning a serial number to the operation; sending a first notification indicating the operation and the assigned serial number to each of the multiple devices; determining a confirmation of receipt of the first notification from each of the multiple devices; and in response to the determination, sending a second notification indicating the determination to each of the multiple devices.

[0318] In Example 70, the inventive subject matter according to Example 69 optionally includes: wherein the message indicates a version number of the distributed data structure associated with the operation, and the method further includes: generating the first notification to further indicate the version and the assigned serial number.

[0319] In Example 71, the inventive subject matter described in Example 70 optionally includes that the operation also includes: receiving a second message from the device indicating a request for assigning a second sequence number to a second operation, the message also indicating a second version of the distributed data structure associated with the second operation; in response to the request, assigning a second sequence number to the second operation; determining the number of operations performed by the device with unassigned sequence numbers; adjusting the second version based on the number of operations; and notifying each of the multiple devices of the second operation, the assigned second sequence number, and the adjusted second version.

[0320] In Example 72, the inventive subject matter described according to any one or more of Examples 69-71 optionally includes that the operation also includes: a first determination regarding the storage of a predetermined value in a sequence number field of the message, and a second determination regarding the message indicating the request based on the first determination.

[0321] In Example 73, the inventive subject matter described according to any one or more of Examples 69-72 optionally includes that the operation also includes: receiving a first plurality of requests from the device for assigning serial numbers to corresponding first plurality of operations; receiving a second plurality of requests interleaved with the first plurality of requests for assigning serial numbers to corresponding second plurality of operations; and assigning serial numbers to the first plurality of operations and the second plurality of operations in an interleaved order of the second plurality of operations with the first plurality of operations.

[0322] In Example 74, the inventive subject matter described in Example 73 optionally includes that the operation also includes: generating a snapshot of the distributed data structure based on the first plurality of operations and the second plurality of operations; receiving a request to join the collaborative session from an additional device; and sending the snapshot to the additional device in response to the request.

[0323] In Example 75, the inventive subject matter described according to any one or more of Examples 69-74 optionally includes: wherein the message also indicates the type of the operation and the location associated with the operation within the distributed data structure, and wherein the first notification is generated to indicate the type and the location.

[0324] In Example 76, the inventive subject matter of Example 75 optionally includes: wherein the message also indicates a distributed data structure data value associated with the operation, and wherein the first notification is generated to indicate the data value.

[0325] In Example 77, the inventive subject matter described according to any one or more of Examples 69-76 optionally includes: wherein, the second notification indicates the determination to the multiple devices of the determination by sending the assigned sequence number to each of the multiple devices in a field of the message, and the field of the message is predetermined to indicate the maximum sequence number confirmed by the multiple devices.

[0326] Example 78 is a method comprising: establishing a collaborative session with multiple devices, the collaborative session providing collaborative access to a distributed data structure; receiving a message from a device included in the multiple devices, the message indicating a request for assigning a serial number to an operation on the distributed data structure; in response to the request, assigning a serial number to the operation; sending a first notification indicating the operation and the assigned serial number to each of the multiple devices; determining a confirmation of receiving the first notification from each of the multiple devices; and in response to the determination, sending a second notification indicating the determination to each of the multiple devices.

[0327] In Example 79, the inventive subject matter according to Example 78 optionally includes: wherein the message indicates a version number of the distributed data structure associated with the operation, and the method further includes: generating the first notification to further indicate the version and the assigned serial number.

[0328] In Example 80, the inventive subject matter described in Example 79 optionally includes: receiving a second message from the device indicating a request for assigning a second sequence number to a second operation, the message also indicating a second version of the distributed data structure associated with the second operation; in response to the request, assigning a second sequence number to the second operation; determining the number of operations performed by the device with unassigned sequence numbers; adjusting the second version based on the number of operations; and notifying each of the multiple devices of the second operation, the assigned second sequence number, and the adjusted second version.

[0329] In Example 81, the inventive subject matter described according to any one or more of Examples 78-80 optionally includes: a first determination regarding a sequence number field of the message storing a predetermined value, and a second determination regarding the message indicating the request based on the first determination.

[0330] In Example 82, the inventive subject matter described according to any one or more of Examples 78-81 optionally includes that the operation also includes: receiving a first plurality of requests from the device for assigning sequence numbers to corresponding first plurality of operations; receiving a second plurality of requests interleaved with the first plurality of requests for assigning sequence numbers to corresponding second plurality of operations; and assigning sequence numbers to the first plurality of operations and the second plurality of operations in an interleaved order of the second plurality of operations with the first plurality of operations.

[0331] In Example 83, the inventive subject matter described in Example 82 optionally includes: generating a snapshot of the distributed data structure based on the first plurality of operations and the second plurality of operations; receiving a request to join the collaborative session from an additional device; and sending the snapshot to the additional device in response to the request.

[0332] In Example 84, the inventive subject matter described according to any one or more of Examples 78-83 optionally includes: wherein the message also indicates the type of the operation and the location associated with the operation within the distributed data structure, and wherein the first notification is generated to indicate the type and the location.

[0333] In Example 85, the inventive subject matter of Example 84 optionally includes: wherein the message also indicates a distributed data structure data value associated with the operation, and wherein the first notification is generated to indicate the data value.

[0334] In Example 86, the inventive subject matter described according to any one or more of Examples 78-85 optionally includes: wherein, the second notification indicates the determination to the multiple devices of the determination by sending the assigned sequence number to each of the multiple devices in a field of the message, and the field of the message is predetermined to indicate the maximum sequence number confirmed by the multiple devices.

[0335] Example 87 is a system comprising: a hardware processing circuit; one or more electronic hardware memories storing instructions that, when executed, configure the hardware processing circuit to perform operations including: establishing a collaborative session with multiple devices, the collaborative session providing collaborative access to a distributed data structure; receiving a message from a device included in the multiple devices, the message indicating a request for assigning a serial number to an operation on the distributed data structure; in response to the request, assigning a serial number to the operation; sending a first notification indicating the operation and the assigned serial number to each of the multiple devices; determining confirmation of receipt of the first notification from each of the multiple devices; and in response to the determination, sending a second notification indicating the determination to each of the multiple devices.

[0336] In Example 88, the inventive subject matter according to Example 87 optionally includes: wherein the message indicates a version number of the distributed data structure associated with the operation, and the method further includes: generating the first notification to further indicate the version and the assigned serial number.

[0337] In Example 89, the inventive subject matter described in Example 88 optionally includes: receiving a second message from the device indicating a request to assign a second sequence number to a second operation, the message also indicating a second version of the distributed data structure associated with the second operation; in response to the request, assigning a second sequence number to the second operation; determining the number of operations performed by the device with unassigned sequence numbers; adjusting the second version based on the number of operations; and notifying each of the multiple devices of the second operation, the assigned second sequence number, and the adjusted second version.

[0338] In Example 90, the inventive subject matter described according to any one or more of Examples 87-89 optionally includes: a first determination that a sequence number field of the message stores a predetermined value, and a second determination that the message indicates the request based on the first determination.

[0339] In Example 91, the inventive subject matter described according to any one or more of Examples 87-90 optionally includes that the operation also includes: receiving a first plurality of requests from the device for assigning sequence numbers to corresponding first plurality of operations; receiving a second plurality of requests interleaved with the first plurality of requests for assigning sequence numbers to corresponding second plurality of operations; and assigning sequence numbers to the first plurality of operations and the second plurality of operations in an interleaved order of the second plurality of operations and the first plurality of operations.

[0340] In Example 92, the inventive subject matter described in Example 91 optionally includes: generating a snapshot of the distributed data structure based on the first plurality of operations and the second plurality of operations; receiving a request to join the collaborative session from an additional device; and sending the snapshot to the additional device in response to the request.

[0341] In Example 93, the inventive subject matter described according to any one or more of Examples 87-92 optionally includes: wherein the message also indicates the type of the operation and the location associated with the operation within the distributed data structure, and wherein the first notification is generated to indicate the type and the location.

[0342] In Example 94, the inventive subject matter of Example 93 optionally includes: wherein the message also indicates a distributed data structure data value associated with the operation, and wherein the first notification is generated to indicate the data value.

[0343] In Example 95, the inventive subject matter described according to any one or more of Examples 87-94 optionally includes: wherein, the second notification indicates the determination to the multiple devices of the determination by sending the assigned sequence number to each of the multiple devices in a field of the message, and the field of the message is predetermined to indicate the maximum sequence number confirmed by the multiple devices.

[0344] Example 96 is an apparatus comprising: a unit for establishing a collaborative session with multiple devices, the collaborative session providing collaborative access to a distributed data structure; a unit for receiving a message from a device included in the multiple devices, the message indicating a request for assigning a serial number to an operation on the distributed data structure; a unit for assigning a serial number to the operation in response to the request; a unit for sending a first notification indicating the operation and the assigned serial number to each of the multiple devices; a unit for determining a confirmation of receiving the first notification from each of the multiple devices; and a unit for sending a second notification indicating the determination to each of the multiple devices in response to the determination.

[0345] In Example 97, the inventive subject matter according to Example 96 optionally includes: wherein the message indicates a version number of the distributed data structure associated with the operation, and the method further includes: generating the first notification to further indicate the version and the assigned serial number.

[0346] In Example 98, the inventive subject matter described in Example 97 optionally includes: a unit for receiving a second message from the device indicating a request to assign a second sequence number to a second operation, the message also indicating a second version of the distributed data structure associated with the second operation; a unit for assigning a second sequence number to the second operation in response to the request; a unit for determining the number of operations performed by the device with unassigned sequence numbers; a unit for adjusting the second version based on the number of operations; and a unit for notifying each of the multiple devices of the second operation, the assigned second sequence number, and the adjusted second version.

[0347] In Example 99, the inventive subject matter described according to any one or more of Examples 96-98 optionally includes: a first determination regarding a sequence number field of the message storing a predetermined value, and a second determination regarding the message indicating the request based on the first determination.

[0348] In Example 100, the inventive subject matter described according to any one or more of Examples 96-99 optionally includes that the operation also includes: a unit for receiving a first plurality of requests from the device for assigning sequence numbers to corresponding first plurality of operations; a unit for receiving a second plurality of requests interleaved with the first plurality of requests for assigning sequence numbers to corresponding second plurality of operations; and a unit for assigning sequence numbers to the first plurality of operations and the second plurality of operations in an interleaved order of the second plurality of operations with the first plurality of operations.

[0349] In Example 101, the inventive subject matter described in Example 100 optionally includes: a unit for generating a snapshot of the distributed data structure based on the first plurality of operations and the second plurality of operations; a unit for receiving a request to join the collaborative session from an additional device; and a unit for sending the snapshot to the additional device in response to the request.

[0350] In Example 102, the inventive subject matter described according to any one or more of Examples 96-101 optionally includes: wherein the message also indicates the type of the operation and the location associated with the operation within the distributed data structure, and wherein the first notification is generated to indicate the type and the location.

[0351] In Example 103, the inventive subject matter of Example 102 optionally includes: wherein the message also indicates a distributed data structure data value associated with the operation, and wherein the first notification is generated to indicate the data value.

[0352] In Example 104, the inventive subject matter described according to any one or more of Examples 96-103 optionally includes: wherein, the second notification indicates the determination to the multiple devices of the determination by sending the assigned sequence number to each of the multiple devices in a field of the message, and the field of the message is predetermined to indicate the maximum sequence number confirmed by the multiple devices.

[0353] Thus, the term "module" is understood to include a tangible entity that is physically constructed, specifically configured (e.g., hardwired) or temporarily (e.g., temporarily) configured (e.g., programmed) to perform in a particular manner, or to perform part or all of any operations described herein. Considering examples in which modules are temporarily configured, each of these modules need not be instantiated at any one time. For example, where the modules include a general-purpose hardware processor configured using software, the general-purpose hardware processor can be configured as various different modules at different times. The software can accordingly configure the hardware processor to, for example, construct a particular module at one time and to construct a different module at another different time.

[0354] Various embodiments may be implemented in whole or in part in software and / or firmware. The software and / or firmware may take the form of instructions contained in or on a non-transitory computer-readable storage medium. Those instructions may then be read and executed by one or more processors to enable the operations described herein to be performed. The instructions may have any suitable form, such as, but not limited to, source code, compiled code, interpreted code, executable code, static code, dynamic code, etc. Such a computer-readable medium may include any tangible, non-transitory medium for storing information in a form readable by one or more computers, such as, but not limited to, a read-only memory (ROM), a random access memory (RAM), a disk storage medium, an optical storage medium, a flash memory, and the like.

Claims

1. A computer-readable storage medium comprising instructions that, when executed by hardware processing circuitry of a first device, configure the first device to perform operations comprising: Joining a collaboration session, the collaboration session providing access to a distributed data structure; receiving a first message, the first message identifying consecutive ordering operations on the distributed data structure, each of the identified operations being included in a collaboration window for the operations, each operation having a pending acknowledgement; representing a first version of the distributed data structure, the first version represented as including each of the consecutive sort operations; representing a second version of the distributed data structure to include a first operation, the first operation being sequenced after a last operation in the consecutive sequenced operations; sending a second message, wherein the second message indicates the first operation and further indicates an association between the first operation and the first version; receiving a third message indicating an updated collaboration window, the updated collaboration window excluding the identified operation; as well as Based on the excluded operations, garbage collection is performed.

2. The computer-readable storage medium of claim 1, wherein the operations further comprise: receiving a plurality of second messages indicating a plurality of corresponding operations, each second message of the plurality of second messages indicating a unique sequence number assigned to each of the corresponding operations, each second message further identifying a different device initiating the operation indicated by the corresponding second message, the unique sequence numbers collectively indicating an order in which the plurality of corresponding operations operate on the distributed data structure; as well as The distributed data structure is modified based on the plurality of corresponding operations and the indicated order of the plurality of corresponding operations.

3. The computer-readable storage medium according to claim 2, wherein: A message in the plurality of second messages indicates that the first device initiated an operation indicated by the message in the plurality of second messages.

4. The computer-readable storage medium of claim 1, the operations further comprising: representing a third version of the distributed data structure to include a second operation; receiving a fourth message indicating an additional operation and a further indication that the additional operation was applied to the distributed data structure prior to the second operation; as well as The second version of the distributed data structure is modified to be consistent with the fourth message.

5. The computer-readable storage medium of claim 1, the operations further comprising: A fourth message is received indicating a first sequence number assigned to the first operation.

6. The computer-readable storage medium of claim 5, the operations further comprising: A fifth message is received indicating a second device operation, the fifth message further indicating that the second device operation is applied to a third version of the distributed data structure, the fifth message further indicating a second sequence number assigned to the second device operation.

7. The computer-readable storage medium of claim 6, the operations further comprising: Based on the relative order of the first sequence number and the second sequence number, an edit conflict on the distributed data structure between the first operation and the second device operation is resolved.

8. The computer-readable storage medium of claim 1, wherein: The representation of the second version of the distributed data structure comprises: storing first data defining each operation in the continuous sorting operations; and Second data defining the first operation based on the first data is stored.

9. The computer-readable storage medium of claim 1, wherein: The version of the distributed data structure is defined by the highest-ordered operation sequence number included in the version.

10. The computer-readable storage medium of claim 1, the operations further comprising: A fourth message is received defining a second operation, a sequence number assigned to the second operation, and a highest ranked operation sequence number confirmed by a participant in the collaboration session.

11. The computer-readable storage medium of claim 10, wherein: The sequentially ordered operations include operations having an assigned sequence number that is sequentially higher than and sequentially lower than or equal to a highest ordered sequence number acknowledged by devices participating in the collaborative session.

12. A computing device comprising: Hardware processing circuit; One or more hardware memories storing instructions that, when executed, configure the hardware processing circuitry to perform operations including: Joining a collaboration session, the collaboration session providing access to a distributed data structure; receiving a message, the message identifying consecutive sequenced operations on the distributed data structure, each of the identified operations being included in a coordination window for the operations, each operation having a pending acknowledgement; representing a first version of the distributed data structure, the first version represented as including each of the consecutive sort operations; representing a second version of the distributed data structure to include a first operation, the first operation being sequenced after a last operation in the consecutive sequenced operations; sending a second message, wherein the second message indicates the first operation and further indicates an association between the first operation and the first version; receiving a third message indicating an updated collaboration window, the updated collaboration window excluding the identified operation; as well as Based on the excluded operations, garbage collection is performed.

13. The apparatus of claim 12, the operations further comprising: representing a third version of the distributed data structure to include a second operation; receiving a fourth message indicating an additional operation and a further indication that the additional operation was applied to the distributed data structure prior to the second operation; as well as The second version of the distributed data structure is modified to be consistent with the fourth message.

14. The apparatus according to claim 12, wherein: The representation of the second version of the distributed data structure comprises: storing first data defining each operation in the continuous sorting operations; and Second data defining the first operation based on the first data is stored.

Citation Information

Patent Citations

  • Implementing a consistent ordering of operations in collaborative editing of shared content items

    US20140280463A1