Method, computer readable medium, and system for resolution of violations in client synchronization - Patents.com

The client synchronization service employs tree data structures to manage and resolve conflicts in content management systems, ensuring efficient and deterministic synchronization of content items across devices, addressing synchronization challenges and improving system performance.

JP7595046B2Active Publication Date: 2024-12-05DROPBOX INC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2022118107
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2018-01-10
Filing Date
2022-07-25
Publication Date
2024-12-05
Estimated Expiration
2038-12-10

AI Technical Summary

Technical Problem

Content management systems face challenges in synchronizing content items across multiple devices due to out-of-order communications, network delays, and conflicts arising from simultaneous modifications by different users, leading to inefficient use of computing resources and increased latency.

Method used

A client synchronization service using tree data structures to track server and client device states, identifying discrepancies, and performing operations to synchronize content items efficiently, while monitoring and resolving conflicts to ensure deterministic and orderly synchronization.

Benefits of technology

The solution ensures efficient and deterministic synchronization of content items across devices, reducing computational complexity and resource usage, and minimizing conflicts, thereby enhancing the scalability and performance of content management systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007595046000001
    Figure 0007595046000001
  • Figure 0007595046000002
    Figure 0007595046000002
  • Figure 0007595046000003
    Figure 0007595046000003
Patent Text Reader

Abstract

A computer-implemented method and a non-transitory computer-readable medium are provided. [Solution] A content management system 110 that interacts with client devices 150 stores content items in association with accounts and performs various content item management tasks such as retrieving, modifying, viewing, and / or sharing content item(s), enabling accounts to access content item(s) from multiple client devices.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to U.S. Non-provisional Application No. 15 / 867,496, filed January 10, 2018, and U.S. Provisional Application No. 62 / 611,473, filed December 28, 2017, both of which are expressly incorporated by reference in their entireties herein. [Background technology]

[0002] Content management systems allow users to access and manage content items on multiple devices using a network. Some content management systems may provide additional features that allow users to share content items and help users collaborate using content items. Content management systems typically store content items on a server and may allow users to access the content items over a network. Some content management systems also allow local copies to be stored on the client device to provide users with faster access to the content items in a more natural interface (e.g., in a native application or within the client device's file system). In addition, this allows users to access the content items when offline. Content management systems attempt to synchronize copies of content items across several client devices and servers so that each copy is identical. However, synchronizing content items is difficult and involves many technical obstacles.

[0003] These and other advantages and features of the present technology will become apparent from reference to certain embodiments illustrated in the accompanying drawings. Those skilled in the art will appreciate that these drawings merely illustrate some examples of the present technology and are not intended to limit the scope of the present technology to these examples. Moreover, those skilled in the art will understand the principles of the present technology as described and explained with greater specificity and detail through the use of the accompanying drawings. [Brief description of the drawings]

[0004] [Figure 1] FIG. 1 illustrates an example of a content management system and a client device according to some embodiments. [Diagram 2] FIG. 1 illustrates an example of a client synchronization service, according to some embodiments. [Diagram 3] FIG. 2 illustrates an example of a tree data structure, according to various embodiments. [Figure 4] FIG. 2 illustrates an example of a tree data structure, according to various embodiments. [Diagram 5] 1 illustrates an exemplary method for synchronizing a server state with a file system state using a tree data structure, in accordance with various embodiments of the subject technology. [Figure 6] 1 illustrates an exemplary method for resolving conflicts when synchronizing a server state with a file system state using a tree data structure, in accordance with various embodiments of the subject technology. [Figure 7] 4 is a diagram of an example tree data structure illustrating violations of rules for an add operation, in accordance with various embodiments. [Figure 8] FIG. 2 illustrates an exemplary method for gradually converging a server state and a file system state in accordance with various embodiments of the subject technology. [Figure 9] FIG. 2 illustrates an example of a tree data structure, according to various embodiments. [Figure 10] FIG. 1 illustrates an exemplary scenario. [Figure 11]1 is an exemplary Venn diagram representation of two operation plans, according to various embodiments of the subject technology. [Figure 12] 1 illustrates an example method for managing changes to an operation plan in accordance with various embodiments of the subject technology. [Figure 13] FIG. 1 illustrates an example of a system for implementing certain aspects of the present technology. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0005] Various examples of the present technology are described in detail below. While specific implementations are described, it should be understood that this is done for purposes of illustration only. Those skilled in the relevant art will recognize that other components and configurations may be used without departing from the spirit and scope of the present technology.

[0006] Various advances in computing and networking technologies have enabled content management systems to provide users with access to content items across multiple devices. Content items may include, but are not limited to, files, documents, messages (e.g., email messages or text messages), media files (e.g., photos, videos, and audio files), folders containing other content items, or any other unit of content. Content items may be shared, edited, deleted, added, renamed, or moved with multiple users. However, synchronizing these content items across multiple computing devices (e.g., server and client devices) and several user accounts remains incomplete and fraught with technical obstacles.

[0007] To account for some of the technical obstacles, a first machine (e.g., a client device or a server) may send communications to a second machine that provide information about how a user has modified a content item managed by the content management system. These communications may be used by the second machine to synchronize the content item on the second machine such that actions performed on the content item on the first machine are reflected in the content item on the second machine, making the content item on the first machine substantially identical to the content item on the second machine.

[0008] However, some communications may be transmitted and received out of order as a result of various network routing protocols used by one or more networks used to transmit the communications, technical operations of the first or second machine, or other reasons. Furthermore, a user may be performing multiple modifications to multiple content items, undoing previous modifications in a short time, or performing additional modifications immediately to a previously modified content item or set of content items. This increases the likelihood that these communications will be received out of order, that a particular communication will be out of date, or that the second machine will perform operations on the content item that are not up to date. As a result, many of the operations may not fit the current state of the content item. In fact, it may even be difficult to detect whether some operations are in conflict with other operations or the current state of the content item.

[0009] Additionally, there is an inherent delay associated with synchronous actions. For example, an action taken on a first machine is first detected by the first machine, and a communication is generated and then transmitted over the network. This communication is received by a second machine, which may still be processing the previous communication and performing the action detailed in the communication. In this exemplary scenario, there are several points where delays are introduced by the limited computing resources (e.g., bandwidth, memory, processing time, processing cycles, etc.) of the first machine, the second machine, and / or the network. As delays increase, there is an increased likelihood that a communication will somehow conflict with the current state of the content item. Furthermore, processing these conflicting communications and resolving the conflict consumes unnecessary computing resources, e.g., processing time, memory, energy, or bandwidth, further increasing delays.

[0010] To further complicate matters, modifications to the content item may be performed by the same or different users on a second machine and / or additional machines that have access to the content item, so that the above problems may be multiplied, creating further technical issues regarding whether local actions conflict with remote actions and / or whether local actions affect the most up-to-date content item.

[0011] The disclosed technology addresses the need in the art for a client synchronization service for content management systems that provides a technical solution to the above and other technical problems. The client synchronization service can be configured to operate on a client device and identify synchronization discrepancies between content items on a server of the content management system and corresponding content items on the client device. For each synchronization discrepancy, the client synchronization service can identify operations required to synchronize the content items and initiate those operations.

[0012] The client synchronization service may use a set of tree data structures ("trees") to track the status of content items on the server, the status of content items on the client device, and their synchronization states. According to some embodiments, a set of three trees may be used. The three trees may include a remote tree representing the server state, a local tree representing the file system state on the client device, and a synchronization tree representing a merge base of the local and remote trees. The merge base may be thought of as the common ancestor of the local and remote trees, or the last known synchronized state between the local and remote trees. Thus, the client synchronization service may determine that the server state and the client device state are synchronized if all three trees (e.g., the remote tree, the synchronization tree, and the local tree) are identical.

[0013] When a modification to the server state of a content item or the client device file system state of a content item (the "file system state") is detected, the client synchronization service updates the appropriate trees and determines whether the server state and the file system state are synchronized based on a triplet of trees. Based on an update to one of the trees, the server state and the file system state may be synchronized, desynchronized, or further desynchronized. If the server state and the file system state are not synchronized, the client synchronization service may identify at least an initial set of operations required to converge the server state and the file system state and to bring the server state and the file system state closer to being synchronized.

[0014] Relying on a set of tree data structures to monitor server and file system states provides computing technology-based alternatives and / or solutions to various technical problems. For example, a client synchronization service can track server and file states and store a merge-based representation of the two states. As a result, various embodiments of the subject technology avoid the technical problems associated with receiving several communications indicating how a user is modifying a content item remotely, determining the order in which these modifications should be performed locally, and determining whether the modifications conflict with or are out of date with other modifications and whether the remote modifications conflict with local modifications performed locally by the user. Many of these problems arise from the inability of other solutions to track the states of the various parties involved (e.g., server and client device) and quickly determine whether the states are in sync. Instead, these other solutions rely on receiving instructions on how to modify the content item locally without the context of whether the server and file system states are in sync.

[0015] Furthermore, because the server state and the file system state are continuously monitored, determining whether they are synchronized is much more efficient in terms of procedural complexity and computational time and resources. As described in more detail below, the client synchronization service enables gradual and orderly synchronization of the server state and the file system state in a more deterministic manner. As a result, scaling and testing of the functionality of the content management system is also more efficient.

[0016] Content Management System In some embodiments, the disclosed technology is deployed in the context of a content management system having, among other things, content item synchronization and collaboration capabilities. An exemplary system configuration 100 is shown in FIG. 1A, which illustrates a content management system 110 interacting with a client device 150.

[0017] account

[0018] Content management system 110 can store content items in association with accounts and perform various content item management tasks such as retrieving, modifying, viewing, and / or sharing the content item(s). Additionally, content management system 110 can enable accounts to access the content item(s) from multiple client devices.

[0019] The content management system 110 supports multiple accounts. An entity (such as a user, a group of users, a team, a company, etc.) can create an account with the content management system and the account details can be stored in an account database 140. The account database 140 can store profile information for registered entities. In some cases, the profile information for registered entities includes usernames and / or email addresses. The account database 140 can include account management information, such as account type (e.g., various tiers of free or paid accounts), allocated storage space, used storage space, client devices 150 on which registered content management client applications 152 reside, security settings, personal configuration settings, etc.

[0020] The account database 140 can store groups of accounts associated with an entity. Groups can have permissions based on group policies and / or access control lists, and members of a group can inherit permissions. For example, a marketing group can access one set of content items, an engineering group can access another set of content items, an administrator group can modify groups, modify user accounts, etc.

[0021] Storing Content Items

[0022] One function of the content management system 110 is the storage of content items, which may be stored in the content storage 142. A content item may be any digital data, such as a document, a collaboration content item, a text file, an audio file, an image file, a video file, a web page, an executable file, a binary file, etc. A content item may also include a collection or other mechanism for grouping content items with different behaviors, such as a folder, a zip file, a playlist, an album, etc. A collection may refer to a folder or multiple content items that are related or grouped by a common attribute. In some embodiments, the content storage 142 is combined with other types of storage or databases to address specific functions. The content storage 142 may store content items, and metadata about the content items may be stored in the metadata database 146. Similarly, data about where the content items are stored in the content storage 142 may be stored in the content directory 144. In addition, data about changes, accesses, etc. may be stored in the server file journal 148. Each of the various storages / databases, such as content storage 142, content directory 144, server file journal 148, and metadata database 146, may be comprised of multiple such storages or databases and may be distributed across multiple devices and locations. Other configurations are possible. For example, data from content storage 142, content directory 144, server file journal 148, and / or metadata database 146 may be combined into one or more content storages or databases or further segmented into additional content storages or databases. In this manner, content management system 110 may include more or fewer storages and / or databases than shown in FIG. 1.

[0023] In some embodiments, the content storage 142 is associated with at least one content storage service 116, which includes software or other processor-executable instructions for managing the storage of content items, including, but not limited to, receiving content items to be stored, preparing content items to be stored, selecting storage locations for content items, retrieving content items from storage, etc. In some embodiments, the content storage service 116 may divide content items into smaller chunks for storage in the content storage 142. The location of each chunk that makes up a content item may be recorded in a content directory 144. The content directory 144 may include a content entry for each content item stored in the content storage 142. The content entry may be associated with a unique ID that identifies the content item.

[0024] In some embodiments, the unique IDs that identify content items in the content directory 144 may be derived from a deterministic hash function. This method of deriving a unique ID for a content item may allow duplicates of a content item to be recognized as such, because the deterministic hash function outputs the same identifier for all copies of the same content item, but different identifiers for different content items. Using this methodology, the content storage service 116 may output a unique ID for each content item.

[0025] The content storage service 116 may also specify or record a content path for a content item in the metadata database 146. The content path may include the name of the content item and / or a folder hierarchy associated with the content item. For example, the content path may include a folder or a path of a folder in which the content item is stored in a local file system on the client device. Content items are stored in blocks in the content storage 142 and may not be stored under a tree-like directory structure, although such a directory structure is a comfortable navigation structure for a user. The content storage service 116 may define or record a content path for a content item, and the "root" node of the directory structure may be a namespace for each account. Within the namespace, there may be a directory structure defined by the user of the account and / or the content storage service 116. The metadata database 146 may store the content path for each content item as part of the content entry.

[0026] In some embodiments, the namespace may include additional namespaces nested within the directory structure as if they were stored within the root node. This may occur when an account has access to shared collections. Shared collections may be assigned their own namespace within the content management system 110. Some shared collections may actually be the root node of the shared collections, but may be located below the account's namespace in the directory structure and appear as folders within the account's folders. As noted above, the directory structure is simply a convenient navigation structure for the user, but does not correlate to the storage location of the content items within the content storage 142.

[0027] The directory structure in which an account sees content items does not correlate to storage locations in content management system 110, but the directory structure may correlate to storage locations on client device 150 depending on the file system used by client device 150.

[0028] As noted above, a content entry in content directory 144 may also include the location of each chunk that makes up a content item. More specifically, a content entry may include a content pointer that identifies the location in content storage 142 of the chunk that makes up the content item.

[0029] In addition to the content path and content pointer, a content entry in the content directory 144 may also include a user account identifier that identifies a user account that can access the content item, and / or a group identifier that identifies a group that can access the content entry, and / or a namespace to which the content entry belongs.

[0030] The content storage service 116 can reduce the amount of storage space required by identifying duplicate content items or duplicate blocks that make up a content item or version of a content item. Instead of storing multiple copies, the content storage 142 can store a single copy of a content item or block of a content item, and the content directory 144 can include pointers or other mechanisms that link the duplicates to the single copy.

[0031] The content storage service 116 may also store metadata describing the content item, the content item type, the folder, the file path, and / or the content item's relationship to various accounts, collections, or groups in the metadata database 146 in association with the content item's unique ID.

[0032] The content storage service 116 may also store logs of data regarding changes, accesses, etc. in a server file journal 148. The server file journal 148 may contain a unique ID for the content item and a description of the change or access action along with a timestamp or version number and any other associated data. The server file journal 148 may also contain pointers to blocks affected by the change or content item access. The content storage service may provide undo capabilities using content item versioning, which tracks changes to content items, different versions of the content item (including branched version trees), and change histories that can be obtained from the server file journal 148.

[0033] Synchronizing Content Items

[0034] Another function of the content management system 110 is the synchronization of content items with at least one client device 150. The client device(s) can take various forms and have various functions. For example, client device 1501 is a computing device having a local file system accessible by multiple applications residing thereon. Client device 1502 is a computing device where content items are accessible only to a particular application or by permissions granted by a particular application, and where content items are typically stored either in an application-specific space or in the cloud. Client device 1503 is any client device that accesses the content management system 110 via a web browser and accesses content items via a web interface. Although exemplary client devices 1501, 1502, and 1503 are illustrated with form factors such as a laptop, a mobile device, or a web browser, it should be understood that the description is not limited to devices of these exemplary form factors. For example, a mobile device such as client 1502 may have a local file system accessible by multiple applications residing thereon, or client 1502 may access the content management system 110 via a web browser. Thus, the form factor should not be considered a limitation when considering the capabilities of client 150. One or more features described herein with respect to client device 150 may or may not be available on all client devices, depending on the particular capabilities of the device, with the file access model being one such feature.

[0035] In many embodiments, the client device is associated with an account on content management system 110, however, in some embodiments, the client device can access the content using a shared link and does not require an account.

[0036] As noted above, some client devices may access content management system 110 using a web browser. However, client devices may also access content management system 110 using client applications 152 stored on and running on client device 150. Client applications 152 may include a client sync service 156.

[0037] The client synchronization service 156 can communicate with the server synchronization service 112 to synchronize changes to content items between the client device 150 and the content management system 110 .

[0038] Client devices 150 can synchronize content with content management system 110 via client sync service 156. Synchronization can be platform independent; that is, content can be synchronized across multiple client devices of different types, capabilities, operating systems, etc. Client sync service 156 can synchronize any changes to content items (new, deleted, modified, copied, or moved content items) in a specified location in the file system of client device 150.

[0039] Content items can be synchronized from client device 150 to content management system 110 and vice versa. In embodiments where synchronization is from client device 150 to content management system 110, a user can manipulate content items directly from the file system of client device 150, and client sync service 156 can monitor directories on client device 150 for changes to files in monitored folders.

[0040] When the client synchronization service 156 detects a write, move, copy, or delete of content in a monitored directory, the client synchronization service 156 can synchronize the change to the content management system service 116. In some embodiments, the client synchronization service 156 can perform some of the functions of the content management system service 116, including the functions described above, such as splitting content items into blocks and hashing content items to generate unique identifiers. The client synchronization service 156 can index the content in the client storage index 164 and store the results in the storage index 164. Indexing can include storing, for each content item, a unique server identifier and a unique client identifier in addition to the path. In some embodiments, the client synchronization service 156 learns the unique server identifier from the server synchronization service 112 and the unique client identifier from the operating system of the client device 150.

[0041] The client synchronization service 156 can use the storage index 164 to facilitate synchronization of at least a portion of the content in the client storage with the content associated with the user account on the content management system 110. For example, the client synchronization service 156 can compare the storage index 164 to the content management system 110 to detect differences between the content on the client storage and the content associated with the user account on the content management system 110. The client synchronization service 156 can then attempt to reconcile the differences by uploading, downloading, modifying, and deleting the content on the client storage as appropriate. The content storage service 116 can store changed or new blocks of the content item and update the server file journal 148, metadata database 146, content directory 144, content storage 142, account database 140, etc. as appropriate.

[0042] When synchronizing from the content management system 110 to the client device 150, mounting, modifying, adding, deleting, or moving a content item recorded in the server file journal 148 can trigger a notification to be sent to the client device 150 using the notification service 117. When the client device 150 is notified of a change, the requests listed in the server file journal 148 since the last synchronization point known to the client device are changed. If the client device 150 determines that it is out of sync with the content management system 110, the client synchronization service 156 requests the content item blocks containing the changes and updates its local copy of the changed content items.

[0043] In some embodiments, the storage index 164 stores a tree data structure where one tree reflects the latest representation of the directory by the server synchronization service 112 and the other tree reflects the latest representation of the directory by the client synchronization service 156. The client synchronization service can work to ensure that the tree structures match by requesting data from the server synchronization service 112 or by committing changes on the client device 150 to the content management system 110.

[0044] Client device 150 may not even have a network connection available. In this scenario, client synchronization service 156 can monitor linked collections for changes to content items and queue those changes to be synchronized later to content management system 110 when a network connection is available. Similarly, a user can manually start, stop, pause, or resume synchronization with content management system 110.

[0045] The client sync service 156 may synchronize all of the content associated with a particular user account on the content management system 110. Alternatively, the client sync service 156 may selectively synchronize a portion of the content of the total content associated with a particular user account on the content management system 110. Selectively synchronizing only a portion of the content may conserve space on the client device 150 and save bandwidth.

[0046] In some embodiments, the client synchronization service 156 selectively stores portions of the content associated with a particular user account and stores placeholder content items in the client storage for the remaining portions of the content. For example, the client synchronization service 156 can store placeholder content items that have the same filename, path, extension, and metadata as the respective complete content items on the content management system 110, but that lack the data of the complete content items. The placeholder content items can be a few bytes or less in size, whereas the respective complete content items can be very large. After the client device 150 attempts to access the content item, the client synchronization service 156 can retrieve the content item data from the content management system 110 and provide the complete content item to the accessing client device 150. This approach can provide significant space and bandwidth savings while still providing full access to the user's content on the content management system 110.

[0047] Collaboration Features

[0048] Another feature of the content management system 110 is to facilitate collaboration between users, including sharing content items, commenting on content items, collaborating on content items, instant messaging, providing presence and viewing state information about content items, etc.

[0049] share

[0050] The content management system 110 can manage the sharing of content via the sharing service 128. Sharing content by providing a link to the content can include making the content item accessible from any computing device in network communication with the content management system 110. However, in some embodiments, the link can be associated with access restrictions enforced by the content management system 110 and the access control list 145. Sharing content can also include sharing content in the content management system 110 with at least one additional user account (in addition to the original user account associated with the content item) by linking the content using the sharing service 128 so that each user account has access to the content item. The additional user accounts can access the content by approving the content, which is then accessible via the web interface service 124 or directly from within the directory structure associated with those accounts on the client device 150. Sharing can be performed in a platform-independent manner; that is, content can be shared between multiple client devices 150 of different types, capabilities, operating systems, etc. Content can also be shared between different types of user accounts.

[0051] To share a content item within the content management system 110, the sharing service 128 can add a user account identifier or multiple user account identifiers to a content entry in the access control list database 145 associated with the content item to grant access to the content item to the added user accounts. The sharing service 128 can also remove the user account identifier from the content entry to restrict access to the content item by the user account. The sharing service 128 can record the content item identifier, the user account identifiers granted access to the content item, and the access level in the access control list database 145. For example, in some embodiments, the user account identifiers associated with a single content entry can specify different permissions for each user account identifier with respect to the associated content item.

[0052] To share a content item outside of the content management system 110, the sharing service 128 can generate a custom network address, such as a uniform resource locator (URL), that allows any web browser to access a content item or collection in the content management system 110 without authentication. To accomplish this, the sharing service 128 can include content identification data in the generated URL, which can be later used to properly identify and return the requested content item. For example, the sharing service 128 can include an account identifier and a content path or content item identification code in the generated URL. Once a URL is selected, the content identification data included in the URL can be sent to the content management system 110, which can use the received content identification data to identify the appropriate content item and return the content item.

[0053] In addition to generating the URL, the sharing service 128 may also be configured to record in the access control list database 145 that a URL to a content item has been created. In some embodiments, a content entry associated with a content item may include a URL flag that indicates whether a URL to the content item has been created. For example, the URL flag may be a Boolean value that is initialized to 0 or false, indicating that a URL to the content item has not been created. After the sharing service 128 generates a URL to the content item, it may change the value of the flag to 1 or true.

[0054] In some embodiments, the sharing service 128 can associate a set of permissions with a URL of a content item. For example, when a user attempts to access a content item via a URL, the sharing service 128 can provide a limited set of permissions to the content item. Examples of limited permissions include restrictions such as not allowing a user to download the content item, not allowing the user to save the content item, not allowing the user to copy the content item, not allowing the user to modify the content item, etc. In some embodiments, the limited permissions include restrictions that allow the content item to be accessed only from a specified domain, i.e., from within a corporate network domain, or by an account associated with a specified domain, e.g., an account associated with a corporate account (e.g., @acme.com).

[0055] In some embodiments, the sharing service 128 may also be configured to deactivate the generated URL. For example, each content entry may also include a URL active flag indicating whether the content should be returned in response to a request from the generated URL. For example, the sharing service 128 may return the content item requested by the generated link only if the URL active flag is set to 1 or true. In this manner, access to the content item for which the URL was generated may be easily restricted by changing the value of the URL active flag. This allows a user to restrict access to a shared content item without having to move the content item or delete the generated URL. Similarly, the sharing service 128 may reactivate the URL by changing the value of the URL active flag back to 1 or true. In this manner, a user may easily restore access to the content item without having to generate a new URL.

[0056] In some embodiments, content management system 110 can specify a URL for uploading a content item. For example, a first user with a user account can request such a URL and provide the URL to a posting user, who can then use the URL to upload the content item to the first user's user account.

[0057] Team Service

[0058] In some embodiments, the content management system 110 includes a team service 130. The team service 130 can provide functionality for creating and managing teams of defined user accounts. Teams can be created for a company with sub-teams (e.g., business units, or project teams, etc.) and user accounts can be assigned to teams and sub-teams, or teams can be created for any defined group of user accounts. The team service 130 can provide a common shared space for teams, private user account folders, and restricted access shared folders. The team service can also provide an administration interface for administrators to manage collections and content items within a team, and can manage user accounts associated with a team.

[0059] Authorization Services

[0060] In some embodiments, the content management system 110 includes an authorization service 132. The authorization service 132 verifies that a user account attempting to access a namespace has the appropriate permissions to access the namespace. The authorization service 132 can receive a token following a request to access the namespace from a client application 152 and can return the capabilities granted to the user account. For user accounts with multiple levels of access (e.g., a user account with user and administrator privileges), the authorization service 132 can also require explicit privilege escalation to prevent unintended actions by an administrator.

[0061] Presence and viewing status

[0062] In some embodiments, the content management system can provide information about how users with whom a content item has been shared are or have been interacting with the content item. In some embodiments, the content management system 110 can report that a user with whom a content item has been shared is currently viewing the content item. For example, the client collaboration service 160 can notify the notification service 117 when a client device 150 is accessing a content item. The notification service 117 can then notify all client devices of other users who have access to the same content item of the presence of the user of the client device 150 with respect to the content item.

[0063] In some embodiments, the content management system 110 can report the history of user interactions with shared content items. The collaboration service 126 can query data sources such as the metadata database 146 and the server file journal 148 to determine that a user has saved a content item, that a user has not yet viewed the content item, etc., and can use the notification service 117 to communicate this status information to other users so that they know who is currently viewing or has viewed or modified the content item.

[0064] The collaboration service 126 can facilitate comments related to content even if the content item does not natively support comment functionality. Such comments can be stored in the metadata database 146.

[0065] The collaboration service 126 can originate and send notifications to users. For example, a user can mention another user in a comment and the collaboration service 126 can send a notification to the user that the user was mentioned in the comment. Various other content item events can trigger notifications, including deletion of a content item, sharing of a content item, etc.

[0066] The collaboration service 126 may provide a messaging platform that allows users to send and receive instant messages, voice calls, emails, and the like.

[0067] Collaborative Content Items

[0068] In some embodiments, the content management service may also include a collaborative document service 134, which may provide an interactive content item collaboration platform whereby users can simultaneously create collaborative content items, comment on collaborative content items, and manage tasks within collaborative content items. Collaborative content items may be files that users can create and edit using a collaboration content item editor, and may include collaboration content item elements. Collaborative content item elements may include collaboration content item identifiers, one or more author identifiers, collaboration content item text, collaboration content item attributes, interaction information, comments, shared users, and the like. Collaborative content item elements may be stored as database entities, which allows for search and retrieval of collaboration content items. Multiple users may access, view, edit, and collaborate on collaboration content items at the same time or at different times. In some embodiments, this may be managed by requiring two users to access the content item via a web interface, where they can work on the same copy of the content item at the same time.

[0069] Collaboration Companion Interface

[0070] In some embodiments, client collaboration services 160 can provide a native application companion interface for the purpose of displaying information related to a content item being presented on client device 150. In embodiments where a content item is accessed by a native application stored on and running on client device 150, the native application may not provide a native way to display the above collaboration data if the content item is in a specified location in the file system of client device 150 such that the content item is managed by content application 152. In such an embodiment, client collaboration services 160 can detect that a user has opened a content item and can provide an overlay with additional information about the content item, such as collaboration data. For example, the additional information can include comments on the content item, the status of the content item, and activity of other users who have previously viewed or are currently viewing the content item. Such an overlay can alert the user that changes may be lost because another user is currently editing the content item.

[0071] In some embodiments, public or private application programming interfaces may be used to access one or more of the services or storage / databases mentioned above.

[0072] Certain software applications can access content storage 142 on behalf of a user through the API. For example, software packages such as applications running on client device 150 can programmatically make API calls directly to content management system 110 when a user provides authentication credentials to read, write, create, delete, share, or otherwise manipulate content.

[0073] A user may view or manipulate content stored in a user account through a web interface generated and served by web interface service 124. For example, a user may navigate in a web browser to a web address provided by content management system 110. Changes or updates to content in content storage 142 made through the web interface, such as uploading a new version of a content item, may be propagated back to other client devices associated with the user's account. For example, multiple client devices, each with its own client software, may be associated with a single account, and content items in that account may be synchronized among each of the multiple client devices.

[0074] A client device 150 may connect to content management system 110 on behalf of a user. For example, if client device 150 is a desktop or laptop computer, a telephone, a television, an Internet of Things device, etc., a user may directly interact with client device 150. Alternatively or additionally, if client device 150 is a server, for example, client device 150 may act on behalf of a user without the user having physical access to client device 150.

[0075] Some functionality of client device 150 is enabled by applications installed on client device 150. In some embodiments, the applications may include content management system specific components. For example, the content management system specific components may be standalone applications 152, one or more application plug-ins, and / or browser extensions. However, a user may also interact with content management system 110 through a third party application, such as a web browser, that resides on client device 150 and is configured to communicate with content management system 110. In various embodiments, client-side application 152 may present a user interface (UI) through which a user interacts with content management system 110. For example, a user may interact with content management system 110 through a file system explorer integrated with a file system or through web pages displayed using a web browser application.

[0076] In some embodiments, client application 152 can be configured to manage and synchronize content for multiple accounts in content management system 110. In such embodiments, client application 152 can remain logged into and provide normal service to multiple accounts. In some embodiments, each account can be viewed as a folder in the file system, and all content items within that folder can be synchronized with content management system 110. In some embodiments, client application 152 can include a selector for selecting one of the multiple accounts to be the primary or default account.

[0077] Although content management system 110 is presented with particular components, those skilled in the art will appreciate that the architectural configuration of system 100 is only one possible configuration and that other configurations having more or fewer components are possible. Additionally, services may have more or less functionality and may include functionality even that is described with other services. Additionally, features described herein with respect to one embodiment may be combined with features described with respect to other embodiments.

[0078] Although system 100 is presented with particular components, those skilled in the art will appreciate that the architectural configuration of system 100 is only one possible configuration and that other configurations having more or fewer components are possible.

[0079] Client Synchronization Service Figure 2 illustrates an example of a client sync service 156, according to some embodiments. According to some embodiments, the client sync service 156 may be implemented on the client device of Figure 1. However, in other embodiments, the client sync service 156 may be implemented on other computing devices. The client sync service 156 is configured to synchronize changes to content items between a content management system and the client device on which the client sync service 156 operates.

[0080] Client synchronization services 156 may include file system interface 205, server interface 210, tree storage 220, planner 225, and scheduler 230. Additional or alternative components may also be included. A high level description of client synchronization services 156 and its components is provided below with respect to Figure 2. However, further details and embodiments of client synchronization services 156 and its components are described throughout.

[0081] The file system interface 205 is configured to process changes to content items on the local file system of the client device and update the local tree. For example, the file system interface 205 can communicate with the client synchronization service 156 of FIG. 1 to detect changes to content items on the local file system of the client device. Changes can also be made and detected via the client application 152 of FIG. 1. The file system interface 205 can make updates to the local tree. Updates to the local tree can be made based on changes to content items on the client device (new, deleted, modified, copied, renamed, or moved content items).

[0082] The server interface 210 is configured to assist in handling remote changes to content items in the content management system's remote storage and updating the remote tree. For example, the server interface 210 may communicate with the server synchronization service 112 of FIG. 1 to synchronize changes to content items between the client device 150 and the content management system 110. Changes to content items in the content management system 110 (new, deleted, modified, copied, renamed, or moved content items) may be detected and updates may be made to the remote tree to reflect the changes in the content management system 110.

[0083] The tree storage 220 is configured to store and maintain tree data structures used by the client synchronization service 156. For example, the tree storage 220 may store local trees, synchronization trees, and remote trees. According to some embodiments, the tree storage 220 may store the tree data structures in a persistent memory (e.g., a hard disk or other secondary storage device) as well as in a main memory (e.g., a RAM or other primary storage device) to reduce latency and response time. For example, upon startup of the client device or the client synchronization service 156, the tree data structures may be retrieved from the persistent memory and loaded into the main memory. The tree storage 220 may access and update the tree data structures on the main memory, and before the client device or the client synchronization service 156 is shut down, the tree storage 220 may store the updated tree data structures in the persistent memory. Because main memory is expensive and often of limited size on most client devices, additional technical improvements are implemented to reduce the footprint of the tree data structures on the main memory. These technical solutions are further described below.

[0084] The planner 225 is configured to detect differences between a server state associated with the content management system and a file system state associated with the client device based on the state of the tree data structure. For example, the planner 225 may determine whether there are differences between the remote tree and the synchronized tree. Differences between the remote tree and the synchronized tree indicate that actions performed remotely on one or more content items stored in the content management system have caused the server state and the file system state to become out of sync. Similarly, the planner 225 may also determine whether there are differences between the local tree and the synchronized tree. Differences between the local tree and the synchronized tree indicate that actions performed locally on one or more content items stored in the client device have caused the server state and the file system state to become out of sync. If differences are detected, the planner 225 generates a set of operations to synchronize the tree data structure.

[0085] In some scenarios, the operation set generated based on the differences between the remote tree and the synchronization tree and the operation set generated based on the differences between the local tree and the synchronization tree may conflict. Planner 225 may also be configured to merge the two operation sets into a single merged operation plan.

[0086] Scheduler 230 is configured to take the generated operation plan and manage the execution of those operations. According to some embodiments, scheduler 230 converts each operation in the operation plan into a sequence of one or more tasks that need to be executed to perform the operation. In some scenarios, some tasks may become stale or no longer relevant. Scheduler 230 is configured to identify and cancel these tasks.

[0087] Tree Data Structure Figure 3 illustrates an example of a tree data structure, according to various embodiments, that may be stored on a client device and managed by a client synchronization service, such as client synchronization service 156 of Figure 2. Figure 3 illustrates a tree data structure that includes a remote tree 310, a synchronization tree 330, and a local tree 350.

[0088] The remote tree 310 represents the server state, i.e., the state of the content items stored remotely from the client device (e.g., on a server of a content management system). The local tree 350 represents the file system state, i.e., the state of the corresponding content items stored locally on the client device. The sync tree 330 represents a merge base of the local and remote trees. The merge base can be thought of as the common ancestor of the local and remote trees, or the last known synchronized state between the local and remote trees.

[0089] Each tree data structure (e.g., remote tree 310, sync tree 330, or local tree 350) may include one or more nodes. Each node may have one or more child nodes, with the parent-child relationship represented by an edge. For example, remote tree 310 includes nodes 312 and 314. Node 312 is the parent of node 314, and node 314 is the child of node 312. This parent-child relationship is represented by edge 316. A root node, such as root node 312, does not have a parent node. A leaf node, such as node 314, does not have a child node.

[0090] Each node of the tree data structure may represent a content item (e.g., a file, a document, a folder, etc.). For example, root node 312 may represent a root folder associated with the content management system, and node 314 may represent a file located in that root folder (e.g., a text file named "Foo.txt"). Each node of the tree data structure may include data such as, for example, a directory file identifier ("DirFileID") indicating the file identifier of the parent node of the content item, the file name of the content item, the file identifier of the content item, and metadata for the content item.

[0091] As described above, the client synchronization service may determine that the server state and the client device's file system state are synchronized if all three trees (e.g., remote tree 310, sync tree 330, and local tree 350) are identical. In other words, the trees are synchronized if their tree structures and the relationships they represent are identical, and the data contained in their nodes is also identical. Conversely, if the three trees are not identical, the trees are not synchronized. In the exemplary scenario shown in FIG. 3, the remote tree 310, sync tree 330, and local tree 350 are illustrated as being identical and synchronized, resulting in the server state and the file system state being synchronized.

[0092] Tracking changes using a tree data structure Figure 4 illustrates an example of a tree data structure, according to various embodiments. Similar to the tree data structure illustrated in Figure 3, the tree data structure illustrated in Figure 4 (including remote tree 410, synchronization tree 430, and local tree 450) may be stored on a client device and managed by a client synchronization service, such as client synchronization service 156 of Figure 2. Figure 4 illustrates a tree data structure.

[0093] Figure 4 illustrates a scenario after a previously synchronized state, such as that shown in Figure 3, where additional actions have been performed on the content items represented in the tree to modify the content items such that the tree is no longer synchronized. The synchronization tree 430 holds a representation of the previously known synchronized state and can be used by the client synchronization service to identify differences between the server state and the file system state and to generate operations for the content management system and / or client device to perform in order to converge the server state and file system state into synchronization.

[0094] For example, a user (either the same user associated with the client device or another user with access to the content item) may make a modification to the "foo.txt" content item stored by the content management system. This content item is represented by node 414 in remote tree 410. The modification shown in remote tree 410 is the removal (e.g., removal of the content item from a space managed by the content management system) or deletion of the foo.txt content item. These modifications may be performed, for example, on other client devices and then synchronized to the content management system or performed via a web browser connected to the content management system.

[0095] When a change is made on the content management system, the content management system generates modification data indicating the change made and sends the modification data to the client synchronization service on the client device. For example, using a push model, the content management system may unilaterally send or "push" the changes to the client device. In another embodiment, a pull model, where the server sends the changes in response to a request by the client device. Additionally, a hybrid model including a long pull, where the client device initiates a request but leaves the connection open for a period of time to allow the content management system to push additional changes as needed while the connection is live. The client synchronization service updates the remote tree, which represents the server state of the content item stored by the content management system, based on the modification data. For example, in the remote tree 410, node 414, which represents the foo.txt content item, is illustrated as being deleted.

[0096] The client synchronization service may identify differences between remote tree 410 and synchronization tree 430 and, as a result, determine that modifications to content items in the content management system have caused the server state and the file system state to become out of sync. The client synchronization service may further generate and execute a set or sequence of operations on the content items stored on the client device that are configured to converge the server state and the file system state so that they are in sync.

[0097] Additionally or alternatively, a user (either the same user associated with the modification in the content management system or another user with access to the content item) may make modifications to a content item stored locally on a client device associated with the content management system. For example, a user may add a " / bar" folder to the " / root" folder and add a "Hi.doc" document to the " / bar" folder.

[0098] When changes are made on a client device, the client device (e.g., client synchronization service 156 or client application 152 of FIG. 1) generates revision data indicating the changes made. The client synchronization service updates the local tree representing the file system state of the content item stored on the client device based on the revision data. For example, in local tree 450, nodes 452 and 454 are shown being added. Nodes 452 and 454 represent the " / bar" folder and the "Hi.doc" document, respectively.

[0099] The client synchronization service may identify differences between local tree 450 and synchronization tree 430 and, as a result, determine that modifications to the content items at the client device have caused the server state and the file system state to become out of sync. The client synchronization service may further generate a set or sequence of operations on the content items stored by the content management system that are configured to converge the server state and the file system state so that they are in sync. These operations may be transmitted to the content management system and executed.

[0100] As seen in Figure 4, modifications to the content items stored on the client device and the content items stored by the content management system may occur substantially simultaneously or within a certain time period. These modifications are reflected in the tree data structure and can be used by the client synchronization service to generate operations on the client device and the content management system in parallel. However, in other scenarios, the modifications may not necessarily occur within the same time period and operations may be generated as needed. Additionally, while Figure 4 illustrates the scenarios of adding a content item and deleting a content item, other types of modifications such as editing, renaming, copying, or moving a content item are also supported.

[0101] According to various embodiments, identifying differences between the two tree data structures and generating operations may include checking each node in both tree data structures to determine whether an action has been performed on the node. Actions may include, for example, adding a node, deleting a node, editing a node, or moving a node. These actions may then be used to generate operations configured to converge the server state and the file system state.

[0102] For example, if the two tree data structures are a sync tree and a remote tree, the client synchronization service may identify each node in the sync tree, for example, by requesting file identifiers of all nodes in the sync tree. For each node or file identifier of a node in the sync tree, the client synchronization service may determine whether the node or file identifier also exists in the remote tree. A node or file identifier in the sync tree that is not found in the remote tree may indicate that the node was deleted from the server state represented by the remote tree. Thus, the client synchronization service may determine that a delete action occurred on the remote tree. If the node or file identifier of a node is found in the remote tree, the client synchronization service may check whether the node in the remote tree was edited or moved.

[0103] To determine whether a node of the remote tree has been edited relative to a node of the synchronization tree, the client synchronization service may compare metadata of the node of the synchronization tree with metadata of a corresponding node of the remote tree (e.g., a node having the same file identifier). The metadata may include information that may be used to determine whether a content item represented by the node has been edited. For example, the metadata may include one or more hash values ​​that are generated based on data of the content item or a portion thereof. The metadata may additionally or alternatively include a size value, a last modified value, or other values ​​of the content item. The metadata of the node of the synchronization tree may be compared with metadata of the node of the remote tree. If the metadata do not match, an edit of the content item may have occurred in the server state represented by the remote tree. Thus, the client synchronization service may determine that an edit action has occurred for the node on the remote tree. If the metadata match, an edit may not have occurred.

[0104] To determine whether a node in the remote tree has been moved, the client synchronization service may compare the location of the node in the synchronization tree with the location of a corresponding node (e.g., a node having the same file identifier) ​​in the remote tree. The location may include, for example, the path where the node is located, the file name, and / or a directory file identifier ("DirFileID") indicating the file identifier of the node's parent. If the locations match, then a move may not have occurred. On the other hand, if the locations do not match, then a move of the content item may have occurred in the server state represented by the remote tree. Thus, the client synchronization service may determine that a move action has occurred for a node on the remote tree.

[0105] To determine whether a node was added to a remote tree, the client synchronization service may identify any node or file identifier in the remote tree that is not found in the synchronization tree. If a node or file identifier is found in the remote tree but not in the synchronization tree, the client synchronization service may determine that an add action for this node occurred in the remote tree that represents the server state.

[0106] Although the above examples are described with respect to a sync tree and a remote tree, in other embodiments, similar processing may be performed using the sync tree and the local tree to identify differences between the sync tree and the local tree and to identify actions that have occurred in the local tree that represents the file system state.

[0107] Synchronization using a tree data structure 5 illustrates an exemplary method for synchronizing a server state with a file system state using a tree data structure, in accordance with various embodiments of the subject technology. Although the methods and processes described herein may be illustrated with particular steps and actions in a particular order, additional, fewer, or alternative steps and actions performed in similar or alternative orders or in parallel are within the scope of various embodiments unless otherwise stated. Method 500 may be implemented, for example, by a system such as client sync service 156 of FIG. 2 operating on a client device.

[0108] The system is configured to identify differences between a remote tree representing a server state of a content item stored by the content management system, a local tree representing a file system state of a corresponding content item stored on a client device, and a synchronization tree representing a known synchronized state between the server state and the file system state. Based on these differences a set of operations can be generated that, when executed, causes the server state and the file system state to converge toward a synchronized state in which the three tree data structures are identical.

[0109] For example, the system may receive modified data for a content item stored by a content management system or on a client device at operation 505. At operation 510, the modified data may be used to update a remote tree or a local tree.

[0110] The correction data indicates what changes have been made to one or more content items associated with the content management service. Thus, the correction data may be received from a content management system or a client device (e.g., from a client application 152 running on client device 150 of FIG. 1). Correction data received from a content management system may be referred to as server correction data. The server correction data indicates what changes have been made to one or more content items by the content management system and may be used to update the remote tree in operation 510. Correction data received from a client device may be referred to as client correction data. The client correction data indicates what changes have been made to one or more content items on the client device and may be used to update the local tree in operation 510.

[0111] In operation 515, the system may determine whether the server state of the content item stored by the content management system and the file system state of the content item stored on the client device are synchronized. Because the local and remote trees represent the file system state and the server state and are continually updated to track changes made in the content management system and the client device, determining whether the server state and the file system state are synchronized may be done by comparing the local and / or remote trees to the synchronized tree to find differences between the trees. This process of finding differences between the trees is sometimes referred to as "diffing" the trees.

[0112] According to some embodiments and scenarios, determining whether the server state and the file system state are synchronized may include one or more of identifying differences between the remote tree and the synchronization tree and / or identifying differences between the local tree and the synchronization tree. Differences between the remote tree and the synchronization tree may indicate occurrence of changes to content items stored by the content management system that may not have been reflected in the client device. Similarly, differences between the local tree and the synchronization tree may indicate occurrence of changes to content items stored on the client device that may not have been reflected in the content management system.

[0113] If there are no differences between the trees, the server state and the file system state are in sync and no synchronization action is required, and the method may return to operation 505 to await new modified data. On the other hand, if differences are detected, the system may generate a set of operations configured to converge the server state and the file system state in operation 520.

[0114] The operation set that is generated depends on the difference or differences that are detected. For example, if the difference between the two trees is an added content item, the operation set that is generated may include a take and an add of the added content item. If the difference between the two trees is a deletion of a content item, the operation set that is generated may include a delete of the content item. According to some embodiments, the operation set may also include some checks to ensure that tree constraints are maintained. As described further below, the operation set may conflict with the current state of the server state, the file system state, or other operations that are pending execution. Thus, the system may also resolve these conflicts before proceeding.

[0115] As noted above, if there are differences between the remote tree and the synchronized tree, changes may have been made to content items stored by the content management system that may not have been reflected on the client device. Thus, in this scenario, the system may generate a client operation set configured to manipulate the content items stored on the client device to converge the server state and the file system state, which may be provided to the client device for execution in operation 525.

[0116] Similarly, if there are differences between the local tree and the synchronized tree, changes may have been made to the content items stored on the client device that may not have been reflected in the content management system. Thus, in this scenario, the system may generate a server operation set configured to manipulate the content items stored by the content management system to converge the server state and the file system state, which may be provided to the content management system for execution in operation 525. In some cases, both cases may apply, and a client operation set and a server operation set may be generated and provided to their intended recipients in operation 525.

[0117] Once the operation set(s) have been provided to the intended recipient(s), the method may return to operation 505 to await new modification data. The operation set(s) may provide one or more steps aimed at convergence of the server state and the file system state, or may provide all steps necessary to synchronize the server state and the file system state. For example, a content management system may receive the server operation set and perform the server operation set on content items stored by the content management system. Execution of the server operation set generates changes to the content items stored by the content management system, the changes are detected and specified in the server modification data, and the server modification data is sent back to the system. The system may then update the remote tree and determine whether the server state and the file system state are in sync.

[0118] The client device may receive the client operation set and execute the client operation set on the content item stored on the client device. Execution of the client operation set generates changes to the content item stored on the client device, the changes are detected and specified in client modification data, and the client modification data is passed to the system. The system may then update the local tree and determine whether the server state and the file system state are synchronized. These operations of method 500 may continue until the server state and the file system state are synchronized.

[0119] The operations of method 500 are described with respect to a client side and a server side (e.g., local and remote trees, file system state and server state, client and server operation sets, client and server modified data). In various embodiments, operations associated with the two sides may occur in parallel, in sequence, in isolation from one another, or in combination.

[0120] As will be described in more detail, according to some embodiments, before operations are provided for execution, the system may check the operations to determine whether they comply with a set of rules or invariants. If the operations violate a rule, the system executes a resolution action associated with the violation of the rule.

[0121] Additionally, according to some embodiments, a system (e.g., scheduler 230 of client sync service 156 of FIG. 2) may manage the execution of the operation set. For example, each operation in the operation set may be associated with a task, an execution thread, a series of steps, or an instruction. The system may be configured to execute the task, thread, step, or instruction and interface with client devices and / or content management systems to execute the operation set and converge server and file system states.

[0122] Conflict Handling As described above with respect to FIG. 5, differences between the sync tree and the remote tree are identified and used to generate a client operation set configured to converge the server state and the file system state. However, in some cases, the client operation set may conflict with the current state of the local tree. Similarly, differences between the sync tree and the local tree are identified and used to generate a server operation set configured to converge the server state and the file system state. However, the server operation set may conflict with the current state of the remote tree. Additionally or alternatively, the client operation set and the server operation set may conflict with each other or violate other rules or invariants maintained by the system. Thus, various embodiments of the subject technology provide additional technical improvements by resolving these conflicts.

[0123] For example, the planner 225 of the client synchronization service 156 in FIG. 2 may identify operations in an operation set (e.g., the client operation set or the server operation set) that conflict with a rule. Each rule used to identify a conflict may also be associated with a conflict resolution. The client synchronization service may resolve the conflict by updating the operation set based on the conflict resolution or by executing the operations associated with the conflict resolution before providing the operation set for execution.

[0124] 6 illustrates an exemplary method 600 for resolving conflicts when synchronizing a server state with a file system state using a tree data structure, in accordance with various embodiments of the subject technology. Although the methods and processes described herein may be illustrated with particular steps and actions in a particular order, additional, fewer, or alternative steps and actions performed in similar or alternative orders or in parallel are within the scope of various embodiments unless otherwise stated. Method 600 may be implemented, for example, by a system such as client sync service 156 of FIG. 2 operating on a client device.

[0125] The system may receive an operation set configured to converge the server state and the file system state in operation 620. The operation set may be, for example, a client operation set, a server operation set, or a combined operation set generated and described with respect to method 500 of FIG.

[0126] In operation 650, the system identifies one or more violations in the operation set based on the set of rules. The set of rules may be stored by the client synchronization service 156 of FIG. 2 and may specify some constraints, invariants, or operation conflicts to be resolved. The set of rules may be applied to a tree data structure to help control synchronization operations. Also, each rule in the set of rules may be associated with or otherwise linked to a solution for a violation of that rule. For example, the solution may include modifying one or more operations in the operation set, removing one or more operations, adding one or more operations, one or more additional actions to the server state or file system state, or a combination of actions.

[0127] For each operation in the operation set, the system may determine whether any rules in the set of rules are violated. If a rule is violated, the system identifies a solution to the violation and implements the solution in operation 655. The solution may include actions such as modifying one or more operations in the operation set, removing or adding one or more operations, or additional actions on the server state or file state.

[0128] Once the resolution action is performed, the system may generate a resolved or rebased operation set based on the solution and the operation set in operation 660, and provide the resolved operation set to an appropriate entity for execution in operation 665. For example, the resolved operation set may be provided to the scheduler 230 of the client synchronization service 156 of FIG. 2 for managed execution. Alternatively, if the operation set is a client operation set, the resolved operation set may be provided to a client device. If the operation set is a server operation set, the resolved operation set may be provided to a content management service. Additionally, the method 600 of FIG. 6 may be performed sequentially, in parallel, or in a variety of different orders with respect to the client operation set and the server operation set.

[0129] According to some embodiments, each type of operation may be associated with the same or a different set of rules. For example, operation types may include, for example, add content item, delete content item, edit content item, move content item, rename content item, etc. An operation set may consist of operations that each belong to one of the above operation types. Each operation type may be associated with a specific set of rules.

[0130] For illustrative purposes, a set of rules for an "add" operation type may include, for example, a rule that a content item's file identifier must be unique within the tree (e.g., no two nodes in the tree can have the same file identifier), a rule that a directory file identifier ("DirFileID") indicating the file identifier of the content item's parent node must be present in the opposite tree data structure, and a rule that the combination of a content item's DirFileID and filename is not used in the opposite tree.

[0131] An opposite side tree, as used herein, refers to a tree data structure that represents the state of an opposite side entity. For example, a client operation set is configured to operate on a client device and the resulting changes to the file system on the client device are reflected in the local tree. Thus, the opposite side tree of the client operation set is the remote tree. Similarly, a server operation set is configured to be sent to a content management system for execution and the resulting changes to the server state are reflected in the remote tree. Thus, the opposite side tree of the server operation set is the local tree.

[0132] FIG. 7 illustrates an example of a tree data structure illustrating a rule violation of an add operation, according to various embodiments. The tree data structure includes a remote tree 710, a sync tree 750, and a local tree 770. When referring to the local tree 770, the remote tree 710 may be considered as the opposite tree. Meanwhile, when referring to the remote tree 710, the local tree 770 may be considered as the opposite tree. FIG. 7 illustrates a set of operations to add a content item represented by node 712 in the remote tree 710. For example, the client synchronization service may compare the remote tree 710 with the sync tree 750, identify differences, and generate a set of operations including the addition of node 712. Node 712 is associated with FileID4, DirFileID3 (which references parent node 714, which is the parent of node 712), and filename "Hi". Parent node 714 is associated with FileID3, DirFileID1 (which references root node 716, which is the parent of node 714), and filename "Foo".

[0133] The client synchronization service may perform method 600 of Figure 6 and determine that the add operation for node 712 violates the rule for the "add" operation type that "the directory file identifier ("DirFileID") of the content item must exist in the opposite tree data structure." This is illustrated in Figure 7 by the local tree 770 not having a node for file ID3 that references the parent node 714 of node 712. This may occur, for example, if the "Foo" node corresponding to node 714 was removed from the opposite tree after the differences between the remote tree 710 and the synchronization tree 750 were identified and the operation set was generated.

[0134] A solution associated with this rule may include removing the nodes from the synchronization tree 750 that are missing from the local tree 770, synchronizing the synchronization tree 750 with the local tree 770, and re-diffing (e.g., finding the differences) the remote tree 710 with the synchronization tree 750. In the scenario shown in Figure 7, node 754 in the synchronization tree 750 is removed 758 and a differencing operation is initiated to identify the differences between the remote tree 710 and the synchronization tree 750. This results in an add operation for node 712 being included in the operation set in addition to the add operation for node 714.

[0135] Similarly, a violation of the rule "file identifier of a content item must be unique in a tree" for an "add" operation type can be resolved by an operation that includes requesting a new file ID of the node being added from the content management system and using the new file ID when adding the node. A violation of the rule "combination of DirFileID and file name of a content item is not used in the opposite tree" for an "add" operation type can be resolved by an operation that includes checking whether the content items are the same via metadata associated with the two nodes. If the content items are the same, it is possible that the content item being added was already added by another action. If the content items are not the same, the file name of the content item being added can be modified. For example, the text "(conflicting version)" can be appended to the file name of the content item being added.

[0136] Step-by-step planner While the various tree data structures shown in Figures 3, 4, and 7 include a relatively small number of nodes and are relatively simple in structure, tree data structures supported by the system may be much larger and more complex, with multiple levels and a potentially large number of nodes at each level. Thus, the memory usage required to store the tree data structures during operation may be significant, and the computational time and resources required to operate on the tree data structures may be significant. For example, large amounts of memory, time, and other computing resources may be required to find differences between the remote and / or local trees and synchronization trees, and to generate the operations required to converge the remote and / or local trees and synchronization trees.

[0137] Unfortunately, these computing resources are limited. For example, a client device may have a limited amount of available memory, and the length of time required to extract tree differences and generate operations may impede the usability of the content management services provided by the client device, client application, or content management system. Furthermore, the longer it takes to converge the server state and the file system state, the greater the likelihood that an intervening change to either state will cause the synchronized state of the operation set and / or object being computed or executed to be out of date. Thus, various embodiments of the subject technology provide additional technical improvements by incrementally converging the server state and the file system state along with the tree data structures that represent them.

[0138] 8 illustrates an exemplary method 800 for incrementally converging a server state and a file system state in accordance with various embodiments of the subject technology. Although the methods and processes described herein may be illustrated with particular steps and actions in a particular order, additional, fewer, or alternative steps and actions performed in similar or alternative orders or in parallel are within the scope of various embodiments unless otherwise stated. Method 800 may be implemented, for example, by a system such as client sync service 156 of FIG. 2 operating on a client device.

[0139] At operation 805, the system may receive modification data that may be used to update either the remote tree or the local tree. For example, server modification data may be received from a content management system that identifies modifications or other actions (e.g., edits, additions, deletions, moves, or renames) associated with one or more content items stored by the content management system. The server modification data may be used to update a remote tree that represents a server state of the content items stored by the content management system. Similarly, client modification data may be received from a client device (e.g., a client application) and indicate modifications or other actions associated with one or more content items stored on the client device. The client modification data may be used to update a local tree that represents a file system state of the content items stored on the client device.

[0140] Based on the received modification data indicating modifications associated with the content item, the system may identify a node corresponding to the modified content item and add the node to a list of modified content items (e.g., add a file identifier associated with the node to the list of modified content items) in operation 810. Operations 805 and 810 may be performed continuously for some time before the system proceeds to the next stage of method 800. For example, additional modification data may be received and used to update the tree managed by the system and add nodes to the list of modified content items.

[0141] To gradually converge the server state and the file system state, the system, in operation 815, retrieves each node in the list of modified content items and determines how the node was modified (e.g., what actions are associated with the node). In some embodiments, the modification data may indicate modifications to the node. However, in other embodiments, the system may determine modifications to the node based on a comparison of the remote tree to the sync tree and / or a comparison of the local tree to the sync tree. For example, modifications may include adding a node, deleting a node, editing a node, or moving a node.

[0142] For each node or file identifier of a node in the list of modified content items, the system may perform a series of checks to determine what modification, if any, was performed on the node. For example, the system may determine whether a file identifier is in the sync tree but not in the remote tree. A file identifier in the sync tree that is not found in the remote tree may indicate that the node was removed from the server state represented by the remote tree. Thus, the client synchronization service may determine that a delete modification of the node was performed on the remote tree. Similarly, the system may also determine whether a file identifier is in the sync tree but not in the local tree. A file identifier in the sync tree that is not found in the local tree may indicate that the node was removed from the file system state represented by the local tree. Thus, the client synchronization service may determine that a delete modification of the node was performed on the local tree.

[0143] To determine whether an edit modification has been performed on a node, the system may compare metadata of the node in the synchronization tree with metadata of a corresponding node (e.g., a node having the same file identifier) ​​in the remote tree and / or local tree. The metadata may include information that can be used to determine whether a content item represented by the node has been edited. For example, the metadata may include one or more hash values ​​generated based on data of the content item or a portion thereof. The metadata may additionally or alternatively include a size value, a last modified value, or other values ​​of the content item. If the metadata does not match, an edit of the content item may have been performed on the server state represented by the remote tree and / or the file system state represented by the local tree. Thus, the system may determine that an edit action has been performed on a node on the remote tree and / or the local tree.

[0144] To determine whether a node in the remote tree has been moved, the system may compare the location of the node in the synchronization tree with the location of a corresponding node (e.g., a node having the same file identifier) ​​in the remote tree and / or local tree. The location may include, for example, the path where the node is located, the file name, and / or a directory file identifier ("DirFileID") indicating the file identifier of the node's parent. If the locations match, then a move may not have occurred. On the other hand, if the locations do not match, then a move of the content item may have occurred in the remote tree or the local tree. Thus, the client synchronization service may determine that a move action has occurred for a node on the remote tree and / or the local tree.

[0145] To determine whether a node has been added to the remote tree, the system may determine whether a file identifier in the list of modified content items is in the remote tree or the local tree but not in the sync tree. If the file identifier is found in the remote tree or the local tree but not in the sync tree, the system may determine that an additional modification of this node has occurred.

[0146] Once one or more modifications to a node in the list of modified content items have been determined, the system may determine whether any of the modifications have dependencies, in operation 820. As will be further described with respect to FIG. 9, modifications to a node have dependencies if, for example, a modification cannot be performed unless another modification is made first.

[0147] If the modification has no dependencies, the system adds the modification to a list of non-blocked actions at operation 825. If the modification has dependencies, the modification is blocked for a period of time at operation 830 and cannot be executed unless other modifications are processed first, and processing therefore returns to operation 805 to await further modifications. After each modification is processed, the system may clear the file identifier associated with the modification from the list of modified content items.

[0148] Figure 9 illustrates an example of a tree data structure, according to various embodiments. The tree data structure illustrated in Figure 9 may be stored on a client device and managed by a system such as client synchronization service 156 of Figure 2. For purposes of explanation, only remote tree 910 and synchronization tree 950 are shown and described in Figure 9. Similar operations and descriptions may apply to local trees.

[0149] The remote tree 910 includes a root node 912 with file identifier 1, a node 914 with file identifier 5 and filename "Foo", a node 916 with file identifier 6 and filename "Bar", and a node 918 with file identifier 7 and filename "Bye". The sync tree includes a root node 952 with file identifier 1.

[0150] Based on the tree data structure shown in FIG. 9, the system may have determined that nodes with file identifiers 5, 6, and 7 have been modified in operation 810 and added those nodes to a list of modified content items, as shown by reference numeral 980 in FIG. 9. In operation 815, the system determines a list of modifications to the nodes in the list of modified content items. As can be seen from a comparison of the remote tree 910 and the synchronization tree 950, nodes 914, 916, and 918 have been added to the remote tree 910. More specifically, as shown by reference numeral 982 in FIG. 9, node 916 with file identifier 6 and name "Bar" has been added as a child to node 914 with file identifier 5. This is represented by the "Add(6,5,Bar)" entry in reference numeral 982. Node 918 with file identifier 7 and name "Bye" has been added as a child to node 914 with file identifier 5. This is represented by the "Add(7,5,Bye)" entry in reference numeral 982. A node 914 with file identifier 5 and name "Foo" is being added as a child to root node 912 with file identifier 1. This is represented by the "Add(5, / root,Foo)" entry at reference numeral 982.

[0151] In operation 820, the system determines that the additional modification of node 914 has no dependencies and is therefore not blocked. Thus, in operation 825, the system adds the modification associated with node 914 (e.g., the modification represented by the "Add(5, / root,Foo)" entry in reference number 982) to the list of non-blocked actions. This is seen in FIG. 9 at reference number 984. However, the modifications of nodes 916 and 918, represented by the "Add(6,5,Bar)" and "Add(7,5,Bye)" entries in reference number 982, depend on the modification represented by "Add(5, / root,Foo)" being made first. In other words, nodes 916 and / or 918 cannot be added until node 914 is added. Thus, these modifications are included in the list of blocked actions shown in FIG. 9 at reference number 986.

[0152] Returning to method 800 of FIG. 8, in operation 835, the system may select a fix set from the list of non-blocked actions and generate an operation set based on the selected fix set. The operation set is configured to converge the server state and the file system state. The generated operation set depends on the fix set selected from the non-blocked list. For example, if the selected fix set includes an add fix associated with node 914 of FIG. 9 (e.g., the fix represented by the “Add(5, / root,Foo)” entry at reference numeral 984), the generated operation set may include retrieving the added content item from the content management system and adding it to the local file system of the client device.

[0153] According to some embodiments, the system may select all modifications from the list of non-blocked actions to generate one or more sets of operations. However, in some scenarios, the number of modifications in the non-blocked list may be very large, and the computing resources (e.g., memory and processing time) required to process all the modifications may be significant. To alleviate these technical burdens, the system may select a smaller set of modifications in the list of non-blocked actions to process incrementally. For example, the system may select the first or top X or percent modifications to generate operations. In further iterations of processing, the remaining modifications in the non-blocked list may be processed.

[0154] In some embodiments, modifications to the non-blocked list may be processed in a ranked manner. These modifications may be ranked based on, for example, the modification type (e.g., a delete modification is prioritized over an add modification), metadata associated with the modification (e.g., an add modification of a smaller sized content item is prioritized over an add modification of a larger sized content item, a delete modification of a larger sized content item is prioritized over a delete modification of a smaller sized content item, etc.).

[0155] These ranking rules may be stored by the system and designed to achieve various performance goals of content synchronization. For example, deletion modifications may be prioritized over addition modifications to free up as much storage space as possible, which may be limited for a user, before new content items may be added. The addition of smaller content items may be prioritized over larger content items to provide as much progress as possible as quickly as possible in terms of the number of content items being added.

[0156] At operation 835, the system may provide the operation set to the content management system and / or the client device. As noted above, modifications associated with actions performed by the content management system may not be reflected at the client device. Thus, in this scenario, the system may generate a client operation set configured to manipulate content items stored at the client device to converge the server state and the file system state, and at operation 835, the client operation set may be provided to the client device for execution.

[0157] Meanwhile, modifications associated with actions performed by the client device may not be reflected in the content management system. Thus, in this scenario, the system may generate a set of server operations configured to manipulate content items stored by the content management system to converge the server state and the file system state, which may be provided to the content management system for execution in operation 835.

[0158] In some cases, both cases may apply, and client and server operation sets may be generated and provided to their intended recipients in operation 835. The operation sets may also include some checks to ensure that tree constraints are maintained. For example, various conflicts or constraints may be resolved by the operation sets, as described with respect to FIG.

[0159] Once the operational set(s) have been provided to the intended recipient(s), the method may return to operation 805 to await new modified data. For example, for the scenario shown in FIG. 9, the operational set may include retrieving a content item associated with node 914 from a content management system and adding it to a local file system of the client device. This will result in a node corresponding to node 914 being added to the local tree (not shown in FIG. 9) and to the synchronization tree 950. In the next iteration of process 800 in FIG. 8, further modifications of nodes 916 and 918, represented by the "Add(6,5,Bar)" and "Add(7,5,Bye)" entries at 982, will not be blocked because their parent, node 914, has already been added to the synchronization tree. Thus, the additional modifications of nodes 916 and 918, represented by the “Add(6,5,Bar)” and “Add(7,5,Bye)” entries at reference numeral 982, are added to the list of non-blocking actions and can be used to generate a set of one or more operations configured to converge the server state and the file system state.

[0160] The set(s) of operations may provide one or more steps for incrementally converging the server state and the file system state. Although incremental processing may sometimes be more complex to implement, incremental processing may result in faster processing times and reduced memory requirements. These and other initial technical improvements naturally lead to additional technical improvements. For example, reduced processing times also reduce the likelihood of further changes from client devices or content management systems that would cause a particular fix to become obsolete or out of date.

[0161] With respect to Figure 9, for purposes of explanation, the various groupings of content items, modifications, actions, or file identifiers are described as lists. Other types of data structures are compatible. For example, a list of non-blocking actions may be implemented as a B-tree data structure to keep the data sorted and allow for logarithmic time searches, sequential access, insertions, and deletions.

[0162] Scheduler In some embodiments, the client synchronization service may generate a set or sequence of operations configured to converge the server state and the file system state, and provide the operations to a content management system or client device for execution. However, in some scenarios, changes on the client device's file system or content management system may cause the generated set of operations to become stale or obsolete while the set is being executed. Various embodiments are directed to providing technical solutions to these and other technical problems. For example, the client synchronization service may be configured to monitor changes on the client device's file system or content management system, and update the client device and / or content management system as necessary. Additionally, the client synchronization service may be configured to improve performance and reduce processing time by allowing concurrent execution of operations.

[0163] According to some embodiments, the planner 225 of the client synchronization service 156 shown in FIG. 2 may generate a plan or operation plan consisting of an unordered set of operations. All operations in the plan have no dependencies and therefore can be executed simultaneously in separate threads or in any order. The operations in the plan are abstract instructions that can be taken by the content management system and / or client devices to converge the state and tree data structures, according to some embodiments. Example instructions may include adding a content item remotely or locally, deleting a content item remotely or locally, editing a content item remotely or locally, or moving a content item remotely or locally.

[0164] 2 may be configured to receive an operation plan from planner 225, manage the execution of the operations in the plan, determine whether the plan has been updated or modified, and manage the execution of the updated or modified plan. For example, scheduler 230 may work with file system interface 205 and server interface 210 to perform the tasks and steps necessary to implement the operations in the plan. This may include error handling activities such as receiving confirmation from a file system or content management system, or handling retries if there is no network connectivity or if the content item is locked by another application.

[0165] Each operation may be implemented by a script or thread called a task. A task coordinates the application of the associated operation and may include one or more steps required to implement the operation. For example, a "local add operation" may indicate that a content item has been added to the local file system of a client device and, as a result, the content item needs to be added to the content management system to synchronize the server state with the file system state. Thus, the local add operation may be associated with a "local add task" that includes one or more steps required to implement the local add operation. These steps may include one or more of notifying the content management system of the new content item, uploading the content item in one or more data blocks to the content management system, verifying that all data blocks have been received by the content management system, verifying that the content item is not corrupted, uploading metadata for the content item to the content management system, and committing the addition of the content item to the appropriate location in the content management system.

[0166] A task may begin execution, pause at well-defined points while waiting for the completion of other events, resume when the event occurs, and finally terminate. According to some embodiments, scheduler 230 is configured to cancel, respawn, or replace tasks. For example, based on changes to server state or file system state, a task may become stale before it is executed, and scheduler 230 may cancel the stale task before it is executed.

[0167] As described above, planner 225 may generate operation plans based on a set of tree data structures (e.g., a remote tree, a sync tree, and a local tree). Over time, planner 225 continues to generate operation plans based on the status of the tree data structures. If the tree data structures change to reflect the state of server states and file system states, planner 225 may also generate new updated plans that differ from previous plans. Scheduler 230 executes each operation plan generated by planner 225.

[0168] In some scenarios, changes to operations in a later plan may cause unintended synchronization conflicts with operations in a previous plan that is running. For example, one or more of the operations are canceled (or not present) in the second plan while the operations in the first plan are running. As an example, FIG. 10 illustrates an exemplary scenario in which at time t1, the server state represented by the remote tree and the file system state represented by the local tree are synchronized, as shown by the remote tree, the sync tree, and the local tree all matching. Based on this synchronized state, planner 225 may generate a plan that has no operations at t1 (e.g., an empty plan).

[0169] A user of a client device may delete content item A from the local file system or move content item A out of a folder managed by client sync service 156, which is reflected by the removal of node A from the local tree at time t2. Planner 225 may generate a plan including operation LocalDelete(A) based on the state of the tree data structure at time t2. Scheduler 230 may initiate the tasks or steps necessary to implement the LocalDelete(A) operation. These steps may include sending an instruction to the content management system to delete content item A.

[0170] After the command to delete content item A is sent to the content management system, the user on the client device may undo the deletion of content item A or move content item A back to its previous location. The local tree may be updated based on this new action at time t3, and the planner may generate a new, empty plan with no operations. Again, the tree data structures will match and the system will be in sync at time t3.

[0171] However, since a command to delete content item A was sent to the content management system, the content management system deletes content item A from the server state. Scheduler 230 may attempt to cancel the deletion of content item A, but the command may have already been sent and completed by the content management system. This change on the server is communicated to client synchronization server 156, which updates the remote tree by deleting node A at time t4. Planner 225 is informed of the change in the remote tree and the difference between the remote tree and the synchronization tree, and is able to determine that content item A has been removed in the server state. Thus, planner 225 creates a plan with a RemoteDelete(A) operation at time t4. To synchronize the server state with the file system state, content item A is eventually deleted from the client device and the local tree.

[0172] Problematically, the removal of content item A from the server state, the generation of the RemoteDelete(A) operation, and the eventual removal of content item A from the file system state are all unintended and may cause further problems for the user in the future. Furthermore, in some cases, applications or processes may also access the content item, and the unintended synchronization action may cause a cascade of additional technical problems. Various embodiments are directed to preventing unintended consequences in the synchronization of content items between the server state and the file system state.

[0173] According to some embodiments, when canceling a task for a stale operation that is no longer in the operation plan, scheduler 230 may wait for the cancellation to complete before proceeding to start execution of other tasks. For example, scheduler 230 may wait to receive confirmation of the cancellation from a client device or content management system before proceeding with other tasks. Scheduler 230 may determine whether the task has been started, and if the task has not been started, the scheduler may cancel the task and confirm that the task is no longer waiting to be executed. If the task has been started, confirmation may come from the client device or content management system to inform the scheduler that all steps related to the canceled task have been undone. According to some embodiments, scheduler 230 does not allow cancellation of a task after it has been started. This may be true for all tasks or a specific subset of tasks or task types (e.g., a commit task that sends file system state updates to a content management system to synchronize with the server state).

[0174] To improve performance and allow for concurrent execution of tasks as well as cancellation of tasks, scheduler 230 may be further configured to manage task execution and cancellation based on differences between the first operation plan and the updated second operation plan. Figure 11 illustrates an exemplary Venn diagram 1100 representation of two operation plans, according to various embodiments of the subject technology. Planner 225 may generate plan 1 1110 with a first set of operations, receive updates to the tree data structure, and generate updated plan 2 1120 with a second set of operations.

[0175] Plan 1 1110 and plan 2 1120 may share some common operations, which are represented by portion 1130 of Venn diagram 1100. Plan 1 1110 and plan 2 1120 may also share some operations that are not in common. For example, operations in plan 1 1110 that are not in plan 2 1120 become stale and out of date due to tree structure updates detected by planner 225. These stale operations in plan 1 1110 are represented by portion 1140 of Venn diagram 1100. New operations in plan 2 1120 that are not in plan 1 1110 are represented by portion 1150. Each of portions 1130, 1140, and 1150, which represent differences and commonalities between plan 1 1110 and plan 2 1120, may contain no operations or may contain multiple operations, depending on updates to the server state and file system state reflected in the tree data structure.

[0176] Because operations in portion 1140 are no longer in the current plan, scheduler 230 may cancel tasks associated with these operations. To prevent unintended synchronous operations, tasks associated with operations in plan 2 that are not in plan 1 (e.g., in portion 1150) are deferred until the cancellation of tasks associated with operations in portion 1140 is complete. However, because operations in each plan are configured to be able to execute simultaneously, tasks associated with operations in the intersection of plan 1 and plan 2, represented by portion 1130, may be executed simultaneously with the cancellation of tasks associated with operations in portion 1140 without having to wait for their completion. By allowing the cancellation of tasks associated with portion 1140 and the execution of tasks associated with portion 1130 to occur simultaneously, reduced processing time may be achieved in addition to more efficient use of available computing resources.

[0177] 12 illustrates an exemplary method for managing changes to an operation plan in accordance with various embodiments of the subject technology. Although the methods and processes described herein may be illustrated with particular steps and actions in a particular order, additional, fewer, or alternative steps and actions performed in similar or alternative orders or in parallel are within the scope of various embodiments unless otherwise stated. Method 1200 may be implemented, for example, by a system such as client sync service 156 of FIG. 2 operating on a client device.

[0178] The system may be configured to receive updates from a content management system and / or a client device regarding content items associated with the content management service. For example, the system may receive server modification data for content items stored by the content management service and update a remote tree based on the server modification data. The remote tree represents a server state of the content items stored by the content management system. The system may also receive client modification data for content items stored on the client device and update a local tree based on the client modification data. The local tree represents a file system state of the content items stored on the client device.

[0179] In operation 1205, the system may receive a first set of operations configured to converge a server state associated with the content management system and a file system state associated with the client device. For example, the system may identify differences between a synchronization tree and a remote tree or a synchronization tree and a local tree and generate the first set of operations based on any differences between the trees. The synchronization tree represents a known synchronized state between the server state and the file system state.

[0180] The system may begin performing the first set of operations. For example, in some cases, the operations are in a form ready to be sent to the content management system and / or client device for execution. In other cases, the operations may be translated into one or more tasks, scripts, or execution threads that may be managed by the system. The system may interface with the content management system and / or client device according to the tasks, scripts, or execution threads to converge the server state and the file system state.

[0181] During this time, the system may continue to receive revision data from the content management system and / or client devices regarding the content items associated with the content management service. Based on the revision data, the system may update the remote tree or the local tree and generate a second set of operations based on the updates to the tree data structure. At operation 1210, the system may receive the second set of operations.

[0182] In operation 1215, the system identifies a first operation in the first operation set, if any, that is not in the second operation set. If the system finds an operation in the first operation set that is not in the second operation set, this operation may be out of date as a result of the changes indicated in the revision data. Thus, the system initiates cancellation of the first operation in operation 1220. Cancellation of the first operation may involve several steps, receiving confirmation of some of those steps, and non-trivial processing time.

[0183] In operation 1225, the system identifies a second operation, if any, that is included in both the first and second operation sets. If the system finds an operation that is included in both the first and second operation sets, the operation may still be valid despite the changes indicated in the modification data. Furthermore, because operations in both operation sets are configured to be able to execute simultaneously or in any order relative to other operations in the sets, the second operation may continue to execute while the first operation is cancelled. Thus, the system begins executing the second operation in operation 1230 without waiting for the first operation to complete the cancellation.

[0184] In operation 1235, the system identifies a third operation, if any, that is in the second operation set but not in the first operation set. If the system finds an operation in the second operation set that is not in the first operation set, this operation may be a new operation as a result of the changes indicated in the modification data. To prevent unintended results, the system begins waiting for completion of the cancellation of the first operation. In operation 1240, the system may determine that the first operation has completed the cancellation, and as a result, begin execution of the third operation in operation 1245.

[0185] 13 illustrates an example of a computing system 1300, which may be, for example, any computing device making up a client device 150, a content management system 110, or any component thereof, where the components of the system communicate with each other using connections 1305. The connections 1305 may be physical connections via a bus or direct connections to a processor 1310, such as a chipset architecture. The connections 1305 may also be virtual, network, or logical connections.

[0186] In some embodiments, computing system 1300 is a distributed system in which the functionality described in this disclosure may be distributed among a data center, multiple data centers, a peer network, etc. In some embodiments, one or more of the system components described represent many such components, each performing some or all of the functionality described for that component. In some embodiments, these components may be physical or virtual devices.

[0187] The exemplary system 1300 includes at least one processing unit (CPU or processor) 1310 and connections 1305 coupling various system components to the processor 1310, including system memory 1315, such as read only memory (ROM) 1320 and random access memory (RAM) 1325. The computing system 1300 may include a cache of high speed memory 1312 directly connected to, adjacent to, or integrated as part of the processor 1310.

[0188] Processor 1310 may include any general purpose processor and hardware or software services, such as services 1332, 1334, and 1336 stored in storage device 1330, configured to control processor 1310, as well as special purpose processors where software instructions are incorporated into the actual processor design. Processor 1310 may essentially be a completely self-contained computing system including multiple cores or processors, buses, memory controllers, caches, etc. Multi-core processors may be symmetric or asymmetric.

[0189] To enable user interaction, the computing system 1300 includes input devices 1345, which may represent any number of input mechanisms, such as, for example, a microphone for audio, a touch-sensitive screen for gesture or graphical input, a keyboard, a mouse, motion input, voice, etc. The computing system 1300 may also include output devices 1335, which may be one or more of several output mechanisms known to those skilled in the art. In some examples, a multimodal system allows a user to provide multiple types of input / output to communicate with the computing system 1300. The computing system 1300 may include a communications interface 1340, which may generally govern and manage user input and system output. Not limited to operation with a particular hardware configuration, the basic features herein may be easily substituted with improved hardware or firmware configurations as they are developed.

[0190] The storage device 1330 may be a non-volatile memory device and may be a hard disk or other type of computer-readable medium capable of storing data accessible by a computer, such as a magnetic cassette, a flash memory card, a solid-state memory device, a digital versatile disk, a cartridge, a random access memory (RAM), a read-only memory (ROM), and / or some combination of these devices.

[0191] Storage devices 1330 may include software services, servers, services, etc. that cause the system to perform functions when code defining such software is executed by processor 1310. In some embodiments, hardware services that perform a particular function may include software components stored in computer readable media associated with necessary hardware components, such as processor 1310, connections 1305, output devices 1335, etc., to perform that function.

[0192] For clarity of explanation, in some examples, the technology may be presented as including individual functional blocks, including devices, device components, method steps or routines implemented in software, or functional blocks including a combination of hardware and software.

[0193] Any of the steps, operations, functions, or processes described herein may be performed or implemented by hardware and software services or a combination of services, alone or in combination with other devices. In some embodiments, a service may be software resident in memory of one or more servers of a client device and / or a content management system, and may perform one or more functions when a processor executes the software associated with the service. In some embodiments, a service is a program or collection of programs that performs a particular function. In some embodiments, a service may be considered a server. The memory may be a non-transitory computer-readable medium.

[0194] In some embodiments, computer readable storage devices, media, and memories may include wired or wireless signals containing bit streams, etc. However, when mentioned, non-transitory computer readable storage media explicitly excludes media such as energy, carrier signals, electromagnetic waves, and the signals themselves.

[0195] The method according to the above-mentioned examples can be implemented using computer-executable instructions stored on or otherwise available from a computer-readable medium. Such instructions can include, for example, instructions and data that cause or otherwise configure a general-purpose computer, a special-purpose computer, or a special-purpose processing device to perform a certain function or group of functions. Some of the computer resources used can be accessible over a network. The computer-executable instructions can be, for example, binaries, intermediate format instructions such as assembly language, firmware, or source code. Examples of computer-readable media that can be used to store instructions, information used, and / or information created during the method according to the described examples include magnetic or optical disks, solid-state memory devices, flash memories, USB devices provided with non-volatile memory, networked storage devices, and the like.

[0196] Devices implementing methods according to these disclosures may include hardware, firmware and / or software and may take any of a variety of form factors. Typical examples of such form factors include servers, laptops, smart phones, small form factor personal computers, personal digital assistants, etc. The functionality described herein may also be embodied in peripheral devices or add-in cards. Such functionality may also be implemented on a circuit board, among different chips or different processes running on a single device, as further examples.

[0197] These instructions, media for carrying such instructions, computing resources for executing them, and other structures for supporting such computing resources are means for providing the functionality described in these disclosures.

[0198] Although various examples and other information have been used to describe aspects within the scope of the appended claims, no limitations to the claims should be implied based on the specific features or configurations of such examples, since those skilled in the art may use these examples to derive a wide variety of implementations. Moreover, while some subject matter may be described in language specific to example structural features and / or method steps, it should be understood that the subject matter defined in the appended claims is not necessarily limited to these described features or acts. For example, such functionality may be distributed in different ways or performed by components other than those identified herein. Rather, the described features and steps are disclosed as example components of systems and methods within the scope of the appended claims.

Claims

1. On the client device: a server difference between a remote tree representing a server state for a content item stored by a content management system and a sync tree representing a known synchronized state between the server state and a file system state for the content item stored on the client device; a client difference between a local tree representing the file system state and the sync tree representing the known synchronized state between the server state and the file system state; and identifying at least one of generating, at the client device, a set of operations configured to converge the server state and the file system state, the set of operations being based on the identification of at least one of the server differences and the client differences; Detecting, at the client device, a violation of a rule by an operation in the operation set; identifying, at the client device, a resolution action for the violation of the rule; executing the resolution action at the client device; 4. A computer-implemented method comprising:

2. Detecting the violation of the rule by the operation includes: identifying an operation type of the operation in the operation set; selecting a set of rules associated with the operation type; determining that the rule in the set of rules is violated by the operation; The computer-implemented method of claim 1 , comprising:

3. The computer-implemented method of claim 1 , further comprising providing the set of operations for execution on the client device.

4. The computer-implemented method of claim 1 , further comprising providing the set of operations for execution by the content management system.

5. The computer-implemented method of claim 1 , wherein the local tree and the synchronization tree are stored on the client device.

6. The computer-implemented method of claim 1 , wherein the operation set is a client operation set configured to manipulate the content items stored on the client device.

7. The computer-implemented method of claim 1 , wherein the operation set is a server operation set configured to operate on the content items stored by the content management system.

8. A non-transitory computer-readable medium comprising instructions that, when executed by a computing system including a client device, cause the computing system to: In the client device, a server difference between a remote tree representing a server state for a content item stored by a content management system different from the computing system and a synchronization tree representing a known synchronized state between the server state and a file system state for the content item stored on the client device; a client difference between a local tree representing the file system state and the sync tree representing the known synchronized state between the server state and the file system state; and identifying at least one of generating, at the client device, a set of operations configured to converge the server state and the file system state, the set of operations being based on the identification of at least one of the server differences and the client differences; Detecting, at the client device, a violation of a rule by an operation in the operation set; identifying, at the client device, a resolution action for the violation of the rule; executing the resolution action at the client device; The non-transitory computer-readable medium.

9. The instructions further include: identifying an operation type of the operation in the operation set; selecting a set of rules associated with the operation type; determining that the rule in the set of rules is violated by the operation; The non-transitory computer-readable medium of claim 8 .

10. 10. The non-transitory computer-readable medium of claim 8, wherein the instructions further cause the computing system to provide the set of operations for execution on the client device.

11. 10. The non-transitory computer-readable medium of claim 8, wherein the instructions further cause the computing system to provide the set of operations for execution by the content management system.

12. The non-transitory computer-readable medium of claim 8 , wherein the operation set is a server operation set configured to operate on the content items stored by the content management system.

13. A client device; a non-transitory computer readable medium storing instructions; wherein the instructions, when executed by the system, cause the system to: In the client device, a server difference between a remote tree representing a server state for a content item stored by a content management system different from the system and a sync tree representing a known synchronized state between the server state and a file system state for the content item stored on the client device; a client difference between a local tree representing the file system state and the sync tree representing the known synchronized state between the server state and the file system state; and identifying at least one of generating, at the client device, a set of operations configured to converge the server state and the file system state, the set of operations being based on the identification of at least one of the server differences and the client differences; Detecting, at the client device, a violation of a rule by an operation in the operation set; identifying, at the client device, a resolution action for the violation of the rule; executing the resolution action at the client device; The system.

14. The instructions further include: identifying an operation type of the operation in the operation set; selecting a set of rules associated with the operation type; determining that the rule in the set of rules is violated by the operation; The system of claim 13 .

15. The system of claim 13 , wherein the operation set is a server operation set configured to operate on the content items stored by the content management system.

Citation Information

Patent Citations

  • System and method for synchronizing computer systems via an intermediary file system share or intermediary device

    JP2007527053A

  • Fast and reliable synchronization of file system directories

    JP2008541263A

  • File synchronization method and apparatus

    JP2014524621A