Patent Description:
<CIT> relates to a 'Database system with database engine and separate distributed storage service'.

While embodiments are described herein by way of example for several embodiments and illustrative drawings, those skilled in the art will recognize that the embodiments are not limited to the embodiments or drawings described. It should be understood, that the drawings and detailed description thereto are not intended to limit embodiments to the particular form disclosed, but on the contrary, the intention is to cover all modifications, equivalents and alternatives falling within the scope as defined by the appended claims. The headings used herein are for organizational purposes only and are not meant to be used to limit the scope of the description or the claims. As used throughout this application, the word "may" is used in a permissive sense (i.e., meaning having the potential to), rather than the mandatory sense (i.e., meaning must). The words "include," "including," and "includes" indicate open-ended relationships and therefore mean including, but not limited to. Similarly, the words "have," "having," and "has" also indicate open-ended relationships, and thus mean having, but not limited to. The terms "first," "second," "third," and so forth as used herein are used as labels for nouns that they precede, and do not imply any type of ordering (e.g., spatial, temporal, logical, etc.) unless such an ordering is otherwise explicitly indicated.

" As used herein, this term is used to describe one or more factors that affect a determination. This term does not foreclose additional factors that may affect a determination. That is, a determination may be solely based on those factors or based, at least in part, on those factors. Consider the phrase "determine A based on B. " While B may be a factor that affects the determination of A, such a phrase does not foreclose the determination of A from also being based on C. In other instances, A may be determined based solely on B.

Various embodiments of versioned hierarchical data structures in a distributed data store are described herein. Typically a hierarchical data store, such as directory data store, limits access to a consistent and current version of a hierarchical data structure (e.g., tree, graph, or other hierarchy-based data structure). This allows for the hierarchical data store to provide consistency in the face of concurrent access requests. Such implementations force all access requests to be performed utilizing similar processing paths, providing similar consistency and isolation levels, which offers little flexibility to clients who may not always desire consistency or isolation at the cost of speed or other performance considerations when accessing a hierarchical data structure. Providing versioned hierarchical data structures allows for multiple types of consistency models to be implemented so that different requests can specify a desired isolation and/or consistency level and thus control the performance of the request with respect to accessing the hierarchical data structure.

<FIG> is a logical block diagram illustrating a hierarchical data store that provides versioned hierarchical data structures, according to some embodiments. Hierarchical data store <NUM> may offer multiple versions of the hierarchical data structure <NUM> over time so that various kinds of consistency and isolation levels may be implemented when servicing access requests <NUM>. For example, each version, such as versions 132a, 132b, and 132c of a hierarchical data structure may be maintained so that historical queries (or queries that do not care if there is a chance of stale data) can utilize the version of the hierarchical data structure that is quickly available (e.g., at a storage node maintaining the hierarchical data structure in memory). Other access requests <NUM> that desire or require a strongly consistent version of the hierarchical data structure can invoke operations that provide serializable isolation for the access request, such as by evaluating the request with respect to a transaction log utilizing optimistic concurrency as discussed below. Access requests <NUM> may also invoke path-based traversals to determine various information stored as part of hierarchical data structure <NUM>.

Please note, <FIG> is provided as a logical illustration of a hierarchical data store providing versioned hierarchical data structures, and is not intended to be limiting as to the physical arrangement, size, or number of components, modules, or devices, implementing a distributed data store.

The specification first describes an example of a distributed data store as a directory storage service, according to various embodiments. The example directory storage service may store hierarchical data structures for many different clients, in various embodiments. Included in the description of the example network-based database service are various aspects of the example network-based directory storage service along with the various interactions between the directory storage service and clients. The specification then describes a flowchart of various embodiments of methods for versioned hierarchical data structures in a distributed data store. Next, the specification describes an example system that may implement the disclosed techniques. Various examples are provided throughout the specification.

<FIG> is a block diagram illustrating a provider network that implements a directory storage service that implements a hierarchical data store that provides versioned hierarchical data structures, according to some embodiments. Provider network <NUM> may be set up by an entity such as a company or a public sector organization to provide one or more services (such as various types of cloud-based computing or storage) accessible via the Internet and/or other networks to clients <NUM>. Provider network <NUM> may include numerous data centers hosting various resource pools, such as collections of physical and/or virtualized computer servers, storage devices, networking equipment and the like (e.g., computing system <NUM> described below with regard to <FIG>), needed to implement and distribute the infrastructure and services offered by the provider network <NUM>. In some embodiments, provider network <NUM> may implement a directory storage service <NUM>, described, provide other computing resources or services, such as a virtual compute service and storage services, such as object storage services, block-based storage services, data warehouse storage service, archive storage service <NUM> and/or any other type of network based services <NUM> (which may include various other types of storage, processing, analysis, communication, event handling, visualization, and security services). Clients <NUM> may access these various services offered by provider network <NUM> via network <NUM>. Likewise network-based services may themselves communicate and/or make use of one another to provide different services. For example, various ones of other service(s) <NUM> may store, access, and/or rely upon hierarchical data structures stored in directory storage service <NUM>.

In various embodiments, the components illustrated in <FIG> may be implemented directly within computer hardware, as instructions directly or indirectly executable by computer hardware (e.g., a microprocessor or computer system), or using a combination of these techniques. For example, the components of <FIG> may be implemented by a system that includes a number of computing nodes (or simply, nodes), each of which may be similar to the computer system embodiment illustrated in <FIG> and described below. In various embodiments, the functionality of a given service system component (e.g., a component of the database service or a component of the storage service) may be implemented by a particular node or may be distributed across several nodes. In some embodiments, a given node may implement the functionality of more than one service system component (e.g., more than one database service system component).

Directory storage service <NUM> may store, manage, and maintain hierarchical data structures, such as a directory structure discussed below with regard to <FIG>, stored at various ones of hierarchy storage node(s) <NUM> (in single tenant or multi-tenant fashion). Clients of directory storage service <NUM> may operate on any subset or portion of the hierarchical data structure with transactional semantics and/or may perform path-based traversals of hierarchical data structures. Such features allow clients to access hierarchical data structures in many ways. For instance, clients may utilize transactional access requests to perform multiple operations concurrently, affecting different portions (e.g., nodes) of the hierarchical directory structure (e.g., reading parts of the hierarchical directory structure, adding a node, and indexing some of the node's attributes, while imposing the requirement that the resulting updates of the operations within the transaction are isolated, consistent, atomic and durably stored).

In various embodiments, directory storage service <NUM> may implement routing layer <NUM> to direct access requests from internal or external clients to the appropriate hierarchical storage node(s) <NUM>. For example, routing layer <NUM> may implement a fleet of routing nodes that maintain mapping information which identifies the locations of a hierarchical data structures on hierarchy storage host(s) <NUM>. When an access request is received, routing layer nodes may then determine which one of the hierarchy storage node(s) that hosts the hierarchical data structure identified in the access request to send the access request. Consider a scenario where hierarchical data structures may be replicated across multiple different hierarchy storage nodes <NUM> as part of a replica group, such as illustrated in <FIG> discussed below. Routing <NUM> may implement various load balancing schemes to direct requests from different clients to different hierarchy storage nodes within the replica group, so that no single hierarchy storage node becomes overburdened. Moreover, as hierarchy storage nodes <NUM> may utilize tokens to maintain state across different access requests sent by clients so that different hierarchy storage node(s) <NUM> may handle each request from the client, routing <NUM> need not track which hierarchy storage node is communicating with which client (as sticky sessions may be obviated by token state management techniques discussed below with regard to <FIG> and <FIG>).

Control plane <NUM> may implement various control functions to manage the hierarchy storage node(s) <NUM> and other components of directory storage service <NUM> that provide storage of hierarchical data structures, such as directing creation and placement of new hierarchical data structures on hierarchy storage node(s) <NUM>, storage scaling, heat management, node repair and/or replacement. For example, various placement schemes may utilize techniques such as consistent hashing (e.g., based on hashing an identifier for individual hierarchical data structures) to identify hierarchy storage node(s) to store versions of the hierarchical data structure, or randomly mapping hierarchical data structures to a number hierarchy storage node(s) <NUM> that form a replica set. To provide heat management, for example, control plane <NUM> may collect hierarchy storage host(s) <NUM> metrics published by each host. Each host may have various thresholds for performance characteristics, such as memory utilization, CPU utilization, disk utilization, and request-rate capacity. When a hierarchy storage node reports metrics that exceed a threshold (or multiple thresholds), control plane <NUM> may direct the migration of one or more hierarchical data structures to different hierarchy storage nodes. Similarly, control plane <NUM> may detect when certain hierarchy storage nodes are unable to keep up with access requests directed to a particular replica group for a hierarchical data structure and may provision additional hierarchy storage node(s) to horizontally scale the replica group to better meet the access request demand.

Hierarchy storage node(s) <NUM> may maintain and handle access to hierarchical storage nodes in directory storage service <NUM>. <FIG> is a block diagram illustrating a hierarchy storage node, according to some embodiments. Hierarchy storage node <NUM> may implement request handler <NUM> to process access requests and pass along appropriate instructions or requests to other components, such as storage engine <NUM>, transaction log interface <NUM> or archive interface <NUM>. For example, access request handler <NUM> may interpret various requests formatted according to a programmatic interface, such as an application programming interface (API) like interface <NUM> discussed below with regard to <FIG>. Access requests may include various ones of the requests described in the aforementioned figures as well as other types of requests (which may include or embed the requests or operations described in <FIG> below), such as various access requests to create, update, attach, detach, delete and query nodes in a hierarchical data structure, and access requests to define, populate, discover, and query a local index (which may be strongly consistent and maintained as part of or separately from the hierarchical data structure) on hierarchical data structure node attributes.

In various embodiments, storage engine <NUM> may be a storage engine configured to interact with structure or format of data as it is stored in current hierarchical data structure store <NUM> and historical hierarchical data structure store <NUM> (e.g., a key-value storage engine for data maintained in key-value storage format, relational data storage engine for data maintained in a relational storage format, etc.), which may be maintained according to the models discussed below with regard to <FIG>. In some embodiments, current hierarchical data structure store <NUM> may be partially or completely implemented in memory or other quick access storage devices, such as random access memory devices (RAM), as well as utilizing persistent block-based storage devices to store historical hierarchical data structure <NUM>, including magnetic disk or solid state drives. In some embodiments, caching techniques may be implemented so that frequently accessed portions of data, such as frequently access portions of current hierarchical data structures are maintained in memory components whereas other portions are maintained in block-based persistent storage components. Hierarchy storage node <NUM> may operate multi-tenant storage for hierarchical data structures so that different hierarchical data structures maintained on behalf of different clients, accounts, customers, and the like may be maintained in current hierarchical data structure store <NUM> and current hierarchical data structure store <NUM>. For example, hierarchy storage node <NUM> may participate in different replica groups with different hierarchy storage nodes for the different hierarchical data structures stored at hierarchy storage node <NUM>.

Transaction log interface <NUM> may provide capabilities to interact with (e.g., validate transactions) with respect to the logs corresponding to hierarchical data structures stored in transaction log storage <NUM> for the hierarchical data structures, according to the various techniques discussed below with regard to <FIG>. Similarly, archive interface <NUM> may be implemented to retrieve archived transactions or snapshots to service an access request for historical changes to the hierarchical data structure, a historical query, or other access requests that require a version of the hierarchical data structure that is older than that maintained in historical hierarchical data structure store.

Turning back to <FIG>, transaction log storage <NUM> may provide a fault tolerant, high performance, durable, log publishing service. Transaction log storage <NUM> may be used as a commit log underlying strongly consistent distributed applications such as databases, key-value stores, and lock managers, and as illustrated in <FIG> directory storage service <NUM> providing hierarchical data storage. Transaction log storage <NUM> may provide strong consistency guarantees and support constraints between committed records, to enable features like deduplication, sequencing, and read-write conflict detection. For example, in the various requests illustrated in <FIG>, <FIG>, <FIG>, <FIG>, and <FIG> below, transaction log storage <NUM> may determine whether or not to commit changes to hierarchical data structures (e.g., write requests and other modifications) by examining a proposed transaction for conflicts with other committed transactions. Such a feature may provide a fine-grained locking model over the hierarchical data structure (e.g., only those portions of the hierarchical data structure affected by a conflict between transactions may be locked). Transaction log storage may maintain a separate log or chain of log records for each hierarchical data structure, serving as an authoritative definition of the changes to the state hierarchical data structure over time. Transactions may be ordered according to transaction sequence numbers, which may be monotonically increasing to reference the state of a hierarchical data structure at individual points in time. Note that in some embodiments, transaction log storage <NUM> may be a separate network-based storage service implemented as part of provider network <NUM> external to directory storage service <NUM>.

Archival management <NUM> may utilize transactions stored for different hierarchical data structures stored in respective transaction logs in transaction log storage <NUM> to generate and store snapshots of the hierarchical data structure at different points in time in archive storage service <NUM>. For example, archival management may determine when snapshots of a hierarchical data structure should be captured, provision appropriate storage locations in archive storage service <NUM>, and direct archive worker nodes (not illustrated) to perform the read, write, and other operations to generate and place the snapshots in archive storage service <NUM>. Similarly, archival management <NUM> may direct the copying and storage of individual log records/transactions and/or groups of log records and transactions to be stored as part of an archived transaction log for hierarchical data structures in archive storage service <NUM>.

Generally speaking, clients <NUM> may encompass any type of client configurable to submit network-based services requests to provider network <NUM> via network <NUM>, including requests for directory services (e.g., a request to create or modify a hierarchical data structure to be stored in directory storage service <NUM>, etc.). For example, a given client <NUM> may include a suitable version of a web browser, or may include a plug-in module or other type of code module configured to execute as an extension to or within an execution environment provided by a web browser. Alternatively, a client <NUM> may encompass an application such as a database application (or user interface thereof), a media application, an office application or any other application that may make use of persistent storage resources to store and/or access one or more hierarchical data structures to perform techniques like organization management, identity management, or rights/authorization management. In some embodiments, such an application may include sufficient protocol support (e.g., for a suitable version of Hypertext Transfer Protocol (HTTP)) for generating and processing network-based services requests without necessarily implementing full browser support for all types of network-based data. That is, client <NUM> may be an application configured to interact directly with network-based services platform <NUM>. In some embodiments, client <NUM> may be configured to generate network-based services requests according to a Representational State Transfer (REST)-style network-based services architecture, a document- or message-based network-based services architecture, or another suitable network-based services architecture.

In some embodiments, a client <NUM> may be configured to provide access to network-based services to other applications in a manner that is transparent to those applications. For example, client <NUM> may be configured to integrate with an operating system or file system to provide storage in accordance with a suitable variant of the storage models described herein. However, the operating system or file system may present a different storage interface to applications, such as a conventional file system hierarchy of files, directories and/or folders. In such an embodiment, applications may not need to be modified to make use of the storage system service model. Instead, the details of interfacing to provider network <NUM> may be coordinated by client <NUM> and the operating system or file system on behalf of applications executing within the operating system environment.

Clients <NUM> may convey network-based services requests (e.g., access requests directed to hierarchical data structures in directory storage service <NUM>) to and receive responses from network-based services platform <NUM> via network <NUM>. In various embodiments, network <NUM> may encompass any suitable combination of networking hardware and protocols necessary to establish network-based-based communications between clients <NUM> and platform <NUM>. For example, network <NUM> may generally encompass the various telecommunications networks and service providers that collectively implement the Internet. Network <NUM> may also include private networks such as local area networks (LANs) or wide area networks (WANs) as well as public or private wireless networks. For example, both a given client <NUM> and network-based services platform <NUM> may be respectively provisioned within enterprises having their own internal networks. In such an embodiment, network <NUM> may include the hardware (e.g., modems, routers, switches, load balancers, proxy servers, etc.) and software (e.g., protocol stacks, accounting software, firewall/security software, etc.) necessary to establish a networking link between given client <NUM> and the Internet as well as between the Internet and network-based services platform <NUM>. It is noted that in some embodiments, clients <NUM> may communicate with network-based services platform <NUM> using a private network rather than the public Internet.

Different types of hierarchical data structures may be stored, managed, and or represented in different ways. <FIG> is a block diagram illustrating one example of a data model for a hierarchal data store that provides versioned hierarchical data structures, according to some embodiments. A node may be the basic element of a hierarchical data structure, such as directory structures 410a or 410n and may be represented with circles or squares in the graph depicted of <FIG> (e.g., nodes <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, and <NUM>). A node may have a globally unique identifier (GUID), zero or more attributes (key, value pairs), and zero or more links to other nodes. In some embodiments, a directory may be one type of node which has zero or more child links to other nodes, either directories or resources. Directory nodes may have zero or one parent directory node, implying that directory nodes and inks define a tree structure, in some embodiments. In <FIG>, node <NUM> is an example of a directory node. Node <NUM> may be a root node that is the logical root multiple directory structures <NUM> and may not be visible to clients of directory storage service <NUM>. Resource nodes (represented by squares such as resource nodes <NUM>, <NUM>, <NUM>, and <NUM>) may be leaf nodes in a directory structure <NUM>. A resource node may have a unique external Id (e.g., client specified) and client-defined attributes. Resource nodes can have more than one parent node (which would allow for some hierarchical data structures to be configured as a Directed Acyclic Graph (DAG). Node <NUM> in <FIG> is an example of a resource node and it has two parents (nodes <NUM> and <NUM>).

In some embodiments, multiple types of resource nodes may be implemented. For example, in some embodiments, policy nodes may be a type of resource node with two user-defined attributes: a policy type and policy document (e.g., describing a policy applied to applicable nodes). For example, resource node <NUM> in <FIG> may be an example of a policy resource node. Another type of resource node may be an index resource node. For example, an index resource node be an index on various attributes values of nodes in the child nodes and other descendant nodes of the directory node to which the index node is attached. For example, if resource node <NUM> is an index node, then index node <NUM> may provide an index node for the attributes of child nodes <NUM> and <NUM> as well as descendant nodes <NUM>, <NUM>, and <NUM>.

In some embodiments, a link may be a directed edge between two nodes defining a relationship between the two nodes. There may be many types of links, such as client visible link types and another link type for internal operation implementation. In some embodiments, a child link type may create a parent - child relationship between the nodes it connects. For example, child link 'bb' connects node <NUM> and node <NUM>. Child links may define the hierarchies of directory structures <NUM>. Child links may be named in order to define the path of the node that the link points to. Another type of client visible link may be an attachment link. An attachment link may apply a resource node, such as a policy resource node or index resource node, to another resource node or directory node. Attachment links may not define the hierarchical structures of directory structures <NUM>. For example, attachment link 'xx' applies the policy attribute stored in policy resource node <NUM> to directory node <NUM>. Nodes can have multiple attachments. In some embodiments, some attachment restrictions may be enforced, such as a restriction that not more than one policy resource node of any given policy type can be attached to a same node. A non-client visible type of link or implied link type may also be implemented in some embodiments, a reverse link. Reverse links may be used for optimizing traversal of directory structures <NUM> for common operations like resource node look-ups (e.g., policy lookups). Directory storage service <NUM> may maintain reverse links in the opposite direction of child and attachment links.

In various embodiments, nodes in directory structures <NUM> can be identified and found by the pathnames that describe how to reach the node starting from the logical root node <NUM>, starting with the link labeled "/" and following the child links separated by path separator "/" until reaching the desired node. For example, node <NUM> can be identified using the path: "/directory A /aa/dd". As some nodes may be children of multiple directory nodes, multiple paths may identify an For example, the following path can also be used to identify node <NUM>: "/directoryA /bb/ee". As directory structures <NUM> may be a collection of nodes whose boundary is defined by the hierarchy of those nodes in the collection (e.g., the resulting hierarchical data structure, such as the tree or DAG created by the links between nodes). In this way, directory structures <NUM> may represent separate, independent, or partially independent, organizations.

To store the illustrated directory structures in current hierarchical data structure store <NUM> and historical hierarchical data structure store <NUM>, the described nodes, links attributes, and the like may be modeled after a Resource Description Framework (RDF) data, in some embodiments. To maintain multiple versions of the hierarchical data structures, versioning information may also be included to express how the data has changed over time. RDF data may be structured as (Subject, Predicate, Object) tuples. When including additional versioning information this structure may become: (Subject, Predicate, Object, Version, PreviousVersion). To represent the hierarchical data structures based on RDF, there may be multiple types of RDF predicates. In some embodiments, one type of RDF predicates may represent links of the hierarchical data structure and another type of RDF predicates may represent attributes of the hierarchical data structure. Different types of predicts may represent the hierarchical data structure differently. Link predicates may be between two Nodes, whereas attribute predicates may be between a node and a value. Since a single node might participate in several predicates of the same type, but with different values, predicates may begin with a common prefix and end in some additional type or naming information to aid in lookups. For example, the version entry in a tuple of a predicate may be the logical timestamp (e.g., transaction sequence number) at which the link or attribute was created, as all changes to a hierarchical data structure may utilize the transaction resolution process provided by transaction log storage <NUM> and may be assigned an ordered logical timestamp by transaction log storage <NUM>.

As noted above in <FIG>, hierarchical storage nodes may maintain a current version of a hierarchical data structure and past versions of a hierarchical data structure. In at least some embodiments, different respective tables may be maintained for each hierarchical data structure, one table that stores the data for the current version, such as current version table <NUM> in <FIG>, and another table that stores immutable records for the previous versions, such as prior version table <NUM> in <FIG>. Using the example directory structure 410a in <FIG>, table <NUM> and table <NUM> may illustrate the content of the current and previous version tables. Instead of GUID values, the table shows GUID_401, GUID_402 etc. for readability. While predicate names may be shown as strings, the actual representation in the store may use a binary representation that will be more compact than string representation. Current version table <NUM> may store the latest version data for each row in the table and the value in the previous version column may provide the index into previous version table <NUM> in order to locate the previous value for this row. In previous version table <NUM>, the current version may be appended to the predicate so that it can be filtered upon. The previous version column in previous version table <NUM> may allow for a storage engine to locate older versions, further back in logical time to perform various access requests, such as access requests to operate on a hierarchical data structure at a specified point-in-time. Note that while the structure of tables <NUM> and <NUM> may be shown as relational tables, such an illustration is not limiting. For example, as noted above the current version hierarchical data structure store <NUM> and historical hierarchical data structure store <NUM> may be key value stores that are non-relational, where the key is formed by concatenation of subject and predicate values and where the value may be formed by the concatenation of the rest of the column values illustrated. For example, the first row in table <NUM> may be represented logically as the following <Key,Value> pair: <GUID_401+link. aa, GUID_402+ Ver_1+Null>.

In various embodiments one or both tables <NUM> and <NUM> may be accessed to perform various operations. For example an access request may specify a query: "Find all children for Node whose ID is GUID_401 select GUID_401. * from CurrentVersion" or a query: "Find all policies for a resource Node who's ID is GUID_405 along all paths to the root. To service such queries, a depth first traversal may be executed along the parent links. At each node along the path to the root, the following internal queries may be executed: internal query <NUM>: "Find if the Node has policies: select GUID _405. * from CurrentVersion;" internal query <NUM>: "If the node has policies returned in internal query <NUM>, use the value from the link to get the policy document value from the policy node: select GUID _406. PolicyDoc from CurrentVersion;" internal query <NUM>: "Find all parents for current node and perform internal queries <NUM> -<NUM> for each parent node until reaching the root of the directory structure. Please note that previous examples are not intended to be limiting as to the format, structure, syntax, or other ways in which queries may be expressed or processed with respect to tables <NUM> and <NUM>.

<FIG> is a block diagram illustrating the use of a separate transaction log store to provide consistent storage for versioned hierarchical data structures, according to some embodiments. Multiple clients, such as clients 510a, 510b, and 510c may perform various access requests to a hierarchical data structure concurrently, such as various write requests 512a, 512b, 512c. In a least some embodiments, replica group <NUM> may include multiple storage nodes, such as hierarchy storage node 522a, 522b, and 522c that maintain versions of the hierarchical data structure that are available for servicing various access requests from clients <NUM>. For example, clients <NUM> may submit different write requests <NUM> to hierarchy storage nodes <NUM> according to a routing schema which may direct access requests from each client to a different storage node in replica group <NUM> according to a load balancing scheme. Upon receiving the request, each hierarchy storage node <NUM> may perform various operations upon a current version of the hierarchical data structure at the storage node, then offer the writes <NUM> to transaction log storage <NUM> for commitment to directory structure log <NUM> including various information such as the affected or accessed data by performing the write request, the write request itself, and a transaction sequence number of other indication identifying the point-in-time of the current version of the hierarchical data structure at the storage node <NUM>. Indications of commitment <NUM> or conflict may be provided to the respective storage nodes <NUM>. For those writes that are committed, the directory structure log may be read (as discussed below with regard to <FIG>) and committed writes applied <NUM> to the respective versions of the hierarchical data structure maintained at storage nodes <NUM>.

In some embodiments, archival management <NUM> may also read the directory structure log <NUM> to retrieve writes <NUM> for transmission as archived transactions or snapshots. Archival management <NUM> may then periodically or aperiodically update <NUM> an archived log <NUM> in archive storage service <NUM> and generate and send new snapshots <NUM> to be maintained as part of archived snapshots <NUM>. In this way, the hierarchical data structure can be recreated at any point-in-time, for example by loading a snapshot onto a storage node and applying transactions from archived log <NUM> to reach a certain transaction sequence number so that the version of the hierarchical data structure at the storage number is consistent with a specified point-in-time.

<FIG> is a sequence diagram illustrating processing of an access request with serializable isolation utilizing transaction log storage, according to some embodiments. Hierarchy storage node <NUM>, and other storage nodes discussed in <FIG>, may implement interface <NUM> to handle requests from clients. In various embodiments, interface <NUM> may be a programmatic interface (API) which may be invoked by command line, graphical user interface, or other interface control/generation components at client <NUM>. Serializable access request <NUM> may be a request, such as an access request that changes data in the hierarchical data store, or a request that reads data from the consistent version across the entire distributed data store for the hierarchical data structure is performed. Request <NUM> may include the specified operation to perform (e.g., read or write operation). Once received, hierarchy storage node <NUM> may access an identified version of the hierarchical data structure (e.g., the current version) and determine the exact changes to be made to the hierarchical data structure to perform the operation, including the accessed (read) and/or affected (written) data, such as the nodes, links, attributes, etc., read or changed) Hierarchical storage node <NUM> may then construct a conflict validation request <NUM> to send to transaction log storage <NUM> for evaluation that includes the accessed/affected data, the specified operation, and the last applied transaction number of the hierarchical data structure at hierarchical storage node <NUM>.

Transaction log storage <NUM> may perform conflict analysis to determine whether the prospective transaction in conflict validation request <NUM> may be performed without conflict with committed transactions in the transaction log. Conflicting transactions may occur when the presumed state of a transaction (e.g., data read and used to perform the transaction) is changed by another transaction prior to the completion and commitment of the transaction (e.g., optimistic concurrency). A conflict validation indication <NUM> may be provided by transaction log storage <NUM> to hierarchy storage node <NUM> to indicate whether or not the transaction committed (or was in conflict and thus rejected). Hierarchical storage node <NUM> may pass on the acknowledgment of committal (and the transaction number token indicating the transaction sequence number for the transaction) or the exception or denial of the request <NUM>.

<FIG> is a sequence diagram illustrating processing of an access request with snapshot isolation utilizing a version of a hierarchical data structure maintained at a storage node, according to some embodiments. For snapshot read request, no access to the transaction log storage is performed. Instead, the most recent or current version of the hierarchical data structure is accessed to service the read request. Client <NUM> may send the snapshot read request <NUM> to hierarchical storage node <NUM>. Hierarchical storage node <NUM> may identify that the request is a snapshot read and proceed to process the request utilizing the current version of the hierarchical data structure. Then hierarchal storage node <NUM> may send the read response <NUM> indicating the results of the read request.

<FIG> is a sequence diagram illustrating processing of a conditional access request with serializable isolation utilizing transaction log storage, according to some embodiments. In some instances, access requests may be predicated upon the satisfaction of a condition for the hierarchical data store. For example, an expected condition may identify a particular point-in-time (logical time) or point at which the hierarchical data structure on the storage node has progressed (e.g., if the last applied sequence number is greater than X). In another example, the expected condition may be based on expected data value(s) for nodes, attributes, etc., of the hierarchical data structure. The expected condition may be included along with a specified operation (e.g., read or write) as part of conditional access request <NUM> sent to hierarchy storage node <NUM>. Hierarchy storage node <NUM> may evaluate the condition and if satisfied proceed to process the access request similar to a serializable access request as discussed above in <FIG>, by sending a conflict validation request <NUM> to transaction log storage <NUM> that includes accessed data, the specified operation, and the last applied transaction number of the hierarchical data structure at hierarchy storage node <NUM>. Transaction log storage <NUM> may then commit or reject as conflicted the transaction in conflict validation indication <NUM>. Hierarchy storage node <NUM> may then send the access request response <NUM>, indicating acknowledgment or denial of the request and the transaction number token. Response <NUM> may also be sent indicating a condition failure (e.g., that the hierarchical data structure did not satisfy the condition.

<FIG> is a sequence diagram illustrating processing of a batch access request with serializable isolation utilizing transaction log storage, according to some embodiments. In some scenarios, multiple operations of a same or different type (e.g., read operations, write operations or read and write operations) may be performed to make a large scale change to a hierarchical data structure (e.g., moves to rebalance or rearrange a subtree within the hierarchical data structure). As indicated in <FIG>, client <NUM> may send a batch access request <NUM> with specified operations to commit or fail together. For example, batch access request <NUM> may include multiple requests to create different nodes in a hierarchical data structure. In at least some embodiments, the performance of an operation in the batch access request <NUM> may be dependent upon the successful performance of another operation in the batch access request in order to be performed. For example, batch access request <NUM> may include operations to create three nodes and then other operations to attach or link the three nodes together. The attach operations may be dependent upon the success of the creation operations (which if fail then the attach operations will not succeed either). In another example, data generated as a result of one or more of the operations (e.g., identifiers or other metadata about the creation of the nodes) may be used as input into other operation(s). Various other operations that depend upon the result of other operations in the batch request may be included, and thus the previous examples are not intended to be limiting. Hierarchy storage node <NUM> may submit a conflict validation request <NUM> that includes the multiple operations, affected/accessed data (e.g., resource nodes, directory nodes, links, etc.), and a last applied transaction number for the current version of the hierarchical data structure at hierarchy storage node <NUM>. Transaction log storage <NUM> may perform a conflict validation on the entire set of operations and either commit or reject the entire set of operations in conflict validation indication <NUM>. Hierarchy storage node <NUM> may then provide batch response <NUM> to client <NUM> in order to indicate whether the batch operations have been acknowledged as committed (including a transaction number token) or denied.

<FIG> is a sequence diagram illustrating processing of client-specified transaction request with serializable isolation utilizing transaction log storage and a transaction state token, according to some embodiments. Instead of grouping like operations as a single batch, a client-specified transaction may be performed so that a client can perform multiple access requests as part of the same transaction without having to commit the requests until the end. In this way, various contingent or conditional scenarios may be accounted for so that the transaction could be aborted (not illustrated) if not all of the access requests perform as desired. Moreover, transaction state may be passed from client to hierarchy storage node so that no one storage node has to handle the client-specified transaction (e.g., without a sticky session), but the work can be spread among multiple hierarchy storage nodes. For example, client <NUM> may send a request <NUM> to begin a transaction including multiple initial operations to hierarchy storage node <NUM>. Hierarchy storage node <NUM> performs the initial operations and returns results in the form of transaction state <NUM>.

Client <NUM> may then evaluate transaction state <NUM> to determine next steps. For example, the transaction state <NUM> may include data read from the hierarchical data structure which may or may not be the expected or desired state for client <NUM>. If so, then client <NUM> proceeds to commit the transaction and includes additional operations in commit transaction request <NUM>, which includes transaction state token (generated from the transaction state information <NUM>) and additional operations. Because transaction state token contains all of the necessary information from another storage node to perform the transaction, load balancing techniques to evenly distributed requests may be implemented and may direct commit transaction request <NUM> to hierarchy storage node <NUM>. Hierarchical storage node <NUM> then generates and sends the conflict validation request <NUM> to transaction log storage <NUM> for conflict evaluation. Transactions state token may include the transaction sequence number of the hierarchical data structure at the time the transaction was begun at hierarchical storage node <NUM> and may include the transaction start number (e.g., the transaction sequence number) in the conflict validation request. Transaction storage log <NUM> may then send a conflict validation indication <NUM> to hierarchy storage node <NUM> which in turn may acknowledge whether the transaction committed or an exception triggered in response <NUM>. In some embodiments, a transaction number token may be included to indicate the sequence number of the transaction that was committed.

<FIG> is a sequence diagram illustrating processing of an access request with paginated results delivery utilizing a pagination token, according to some embodiments. In some scenarios, results generated by a query, or other access request are too large to send in a single response message. Rather than tying up individual hierarchy storage nodes with certain clients so that state is maintained at the storage node while the client is retrieving the data, pagination techniques may be utilized in order to allow a client to retrieve results from any storage node without requiring a sticky session with a single storage node. For example, as illustrated in <FIG>, client <NUM> sends a read request <NUM> via interface <NUM> that results in a large data set (e.g., a query to retrieve all user nodes that are male). Instead of providing a stream of read responses that require hierarchy storage node <NUM> to idle or maintain result processing state, read response <NUM> may include initial results and a result pagination token. The result pagination token may indicate remaining results to be retrieved and how to retrieve them. In some embodiments, result pagination token may be modified by the client to change the consistency and/or isolation levels used to perform the read operation so that remaining results may be modified according to the changed version accessed as result of the change to the consistency and/or isolation levels. Client <NUM> may then send another read request <NUM> with the result pagination token to hierarchy storage node <NUM> or another hierarchy storage node. Hierarchy storage node <NUM> may then identify additional results to provide and include them in a subsequent response <NUM> based on the information provided in the result pagination token. Such a technique could be performed for many iterations until an entire result set is provided to client <NUM>.

The directory storage service, access requests, and other techniques discussed in <FIG> provide examples of a distributed data store storing a hierarchical data structure for a client and providing access to multiple versions of a hierarchical data structure in different scenarios. However, various other types of distributed storage systems may implement multiple versions of the hierarchical data structure, which may utilize other numbers of types of components, which may provide distributed data storage. <FIG> is a high-level flowchart illustrating methods and techniques to implement versioned hierarchical data structures to service access requests, according to some embodiments. Various different distributed data stores including the embodiments described above may implement the techniques described below.

As indicated at <NUM>, versions of a hierarchical data structure may be maintained consistent with a transaction log for the hierarchical data structure in a distributed data store. For example, different numbers of storage nodes may independently maintain local copies or replicas of a hierarchical data structure as part of a replica or protection group. Each storage node may maintain the same or different versions of the hierarchical data structure. In some embodiments, storage nodes may implement an eventually consistent consistency model which guarantees that each storage node may eventually be consistent with updates to a hierarchical data structure performed at any other storage node. For example, the transactional log for the hierarchical data structure may act as a consistency mechanism, ordering and isolating transactions so that conflicting transactions are not allowed (e.g., utilizing optimistic concurrency). In some embodiments, transactions indicated as not conflicting are committed to the transaction log and reported as committed dot the submitting storage node. A storage node may then apply the transaction, in some embodiments, whereas in other embodiments, the storage node may apply the transaction at a later time, as discussed below with regard to <FIG>.

Overtime, storage nodes may acquire many different versions corresponding to different points in time (e.g., logical time) with respect to the transaction log. Thus when an access request is received directed to the hierarchical data structure, as indicated at <NUM>, one of the versions may need to be selected for processing the access request. Many different types of access requests may be received. For instance, some access requests may be queries or other read requests to obtain certain data, attributes, values or other information stored or represented by the hierarchical data structure (e.g., queries which may executed by utilizing an index attribute or queries to determine a directory path to a particular node, such as a resource). As illustrated above with regard to <FIG>, access requests may be transactions or batches, conditional, or may specify a particular isolation level (e.g., serializable or snapshot) to perform when processing the access request. The access request may explicitly (e.g., by including a transaction sequence number or token) identify the version of the hierarchical data structure to utilize or implicitly based on the type of access request (e.g., a snapshot read utilizes the current version at a storage node). Thus, as indicated at <NUM>, one of the versions of the hierarchical data structure for servicing the request may be identified.

The request may indicate the level of isolation and/or the level of consistency to perform when processing the request, as indicated at <NUM>. For example, the type of request may indicate snapshot isolation (e.g., by requesting a particular kind of query or lookup operation). If snapshot isolation is indicated, then as illustrated by the positive exit from <NUM>, the access request may be serviced utilizing the identified version of the hierarchical data structure, without invoking the transaction log. In this way, some access requests for which a small likelihood of stale (but still consistent) data is tolerable may be able to leverage the high speed of performing a local operation without further networking communications. In at least some embodiments, the identified version for a snapshot isolation request may be maintained in memory in order to perform high-speed processing for the request. In some embodiments, the request may indicate that dirty or inconsistent reads of individual portions of the hierarchical data structure is acceptable, indicating an isolation level that is less than snapshot isolation. In some embodiments, the request may indicate a specific point-in-time (e.g., by including a transaction sequence number) offering a different isolation level than snapshot isolation. Various combinations of isolation and consistency and consistency level may be specified by clients and thus previous examples are not intended to be limiting.

As indicated by the negative exit from <NUM>, if snapshot isolation is not indicated, then a serializable isolation may be enforced utilizing the transaction log. Note that in some embodiments, the request may need to explicitly (or implicitly) invoke the appropriate isolation level and thus it may not be (as illustrated in <FIG>) that access requests without snapshot isolation indicated are always processed with serializable isolation. As indicated at <NUM>, a new transaction based on the access request may be submitted to the transaction log. For example, affected nodes, objects, or and/or other information describing the changes in the transaction may be supplied so that conflict detection can be performed. The transaction log may perform conflict detection analysis to determine if the transaction conflicts with an already committed transaction. If yes, as indicated by the positive exit from <NUM>, then an exception, denial, or other error indication may be returned to the client that sent the access request, as indicated at <NUM>. In some embodiments, the exception may indicate the conflict (including specifically conflicting operations, such as changes to a particular resource node). If however, as indicated by the negative exit from <NUM>, the transaction does not conflict, then a committed indication has been provided for the new transaction. The commitment acknowledgment may include a sequence number indicating the transaction's location within the transaction log. As part of servicing the request, the access request may utilize the identified version, as indicated at <NUM>. For read operations this may include sending data found in the identified version. For write operations, servicing the access request may include providing an acknowledgment that the write operation is committed.

<FIG> is a high-level flowchart illustrating methods and techniques to implement maintaining versions of a hierarchical data structure at storage nodes consistent with a transaction log for the hierarchical data structure, according to some embodiments. As indicated at <NUM>, a transaction log for a hierarchical data structure may be read, in various embodiments. For example, access requests to the transaction log may be performed starting with a transaction sequence number which identifies the most recent transaction applied to the current version of the hierarchical data structure at a storage node. As indicated at <NUM>, unapplied transaction(s) for the hierarchical data structure may be identified. For example, transactions that have been committed more recently than the (e.g., with higher transaction sequence numbers) may be identified and obtained from the transaction log.

As indicated at <NUM>, the identified transactions may then be applied to a current version of the hierarchical data structure at the storage node. For example, the transactions may describe the changes performed as part of the transaction (such as the operations to add, remove, move, or modify resources, directories, attributes, links, or other portions of the hierarchical data structure). The corresponding entries in the key value or other store maintaining/describing the changed objects may be updated to reflect the changes (e.g., by adding an additional attribute to an object, changing an attribute value, adding a new attribute, etc.). Once the identified changes are complete, then in some embodiments, a transaction sequence number corresponding to the applied transaction may then be recorded in metadata or other information indicating the version of the hierarchical data structure (e.g., increasing the stored sequence number to the higher transaction sequence number).

As indicated at <NUM>, in some embodiments, historical version information for the hierarchical data structure may be updated to describe the changes applied as a result of the hierarchical transaction. In this way, a prior version of the hierarchical data structure (before the application of the transaction) can be generated, accessed, deduced, reconstructed, etc. For example, as discussed above with regard to <FIG> and <FIG>, the historical data store for hierarchical data structures may be represented as a key value store that stores prior versions of objects stored in the current version of the hierarchical data structure. The prior version object may be a copy of the object that was changed by the transaction along with a version number to identify the prior object version relative to the current object version. A pointer, link, or index value to the prior object version may be included in the current object version. Similarly, a pointer, link, or index to object versions older than the immediately prior object version, creating a chain of object versions that may be followed until an original version may be reached.

As illustrated by the loop back arrow from <NUM> (and the negative exit from <NUM>), the transaction log may be evaluated multiples times to ensure that the versions of a hierarchical data structure maintained on a storage node are eventually consistent with the transaction log. For example, transaction logs reads may be performed periodically, or upon the trigger of an event (e.g., processing of a number access requests at the storage node).

The methods described herein may in various embodiments be implemented by any combination of hardware and software. For example, in one embodiment, the methods may be implemented by a computer system (e.g., a computer system as in <FIG>) that includes one or more processors executing program instructions stored on a computer-readable storage medium coupled to the processors. The program instructions may be configured to implement the functionality described herein (e.g., the functionality of various servers and other components that implement the directory storage service and/or storage services/systems described herein). The various methods as illustrated in the figures and described herein represent example embodiments of methods.

<FIG> is a block diagram illustrating a computer system configured to implement the distributed data store providing versioned hierarchical data structures, according to various embodiments, as well as various other systems, components, services or devices described above. For example, computer system <NUM> may be configured to implement hierarchy storage nodes that maintain versions of hierarchical data structures or components of a transaction log store that maintain transaction logs for hierarchical data structures , in different embodiments. Computer system <NUM> may be any of various types of devices, including, but not limited to, a personal computer system, desktop computer, laptop or notebook computer, mainframe computer system, handheld computer, workstation, network computer, a consumer device, application server, storage device, telephone, mobile telephone, or in general any type of computing device.

Computer system <NUM> includes one or more processors <NUM> (any of which may include multiple cores, which may be single or multi-threaded) coupled to a system memory <NUM> via an input/output (I/O) interface <NUM>. Computer system <NUM> further includes a network interface <NUM> coupled to I/O interface <NUM>. In various embodiments, computer system <NUM> may be a uniprocessor system including one processor <NUM>, or a multiprocessor system including several processors <NUM> (e.g., two, four, eight, or another suitable number). Processors <NUM> may be any suitable processors capable of executing instructions. For example, in various embodiments, processors <NUM> may be general-purpose or embedded processors implementing any of a variety of instruction set architectures (ISAs), such as the x86, PowerPC, SPARC, or MIPS ISAs, or any other suitable ISA. In multiprocessor systems, each of processors <NUM> may commonly, but not necessarily, implement the same ISA. The computer system <NUM> also includes one or more network communication devices (e.g., network interface <NUM>) for communicating with other systems and/or components over a communications network (e.g. Internet, LAN, etc.). For example, a client application executing on system <NUM> may use network interface <NUM> to communicate with a server application executing on a single server or on a cluster of servers that implement one or more of the components of the directory storage systems described herein. In another example, an instance of a server application executing on computer system <NUM> may use network interface <NUM> to communicate with other instances of the server application (or another server application) that may be implemented on other computer systems (e.g., computer systems <NUM>).

In the illustrated embodiment, computer system <NUM> also includes one or more persistent storage devices <NUM> and/or one or more I/O devices <NUM>. In various embodiments, persistent storage devices <NUM> may correspond to disk drives, tape drives, solid state memory, other mass storage devices, or any other persistent storage device. Computer system <NUM> (or a distributed application or operating system operating thereon) may store instructions and/or data in persistent storage devices <NUM>, as desired, and may retrieve the stored instruction and/or data as needed. For example, in some embodiments, computer system <NUM> may host a storage system server node, and persistent storage <NUM> may include the SSDs attached to that server node.

Computer system <NUM> includes one or more system memories <NUM> that are configured to store instructions and data accessible by processor(s) <NUM>. In various embodiments, system memories <NUM> may be implemented using any suitable memory technology, (e.g., one or more of cache, static random access memory (SRAM), DRAM, RDRAM, EDO RAM, DDR <NUM> RAM, synchronous dynamic RAM (SDRAM), Rambus RAM, EEPROM, non-volatile/Flash-type memory, or any other type of memory). System memory <NUM> may contain program instructions <NUM> that are executable by processor(s) <NUM> to implement the methods and techniques described herein. In various embodiments, program instructions <NUM> may be encoded in platform native binary, any interpreted language such as JavaTM byte-code, or in any other language such as C/C++, JavaTM, etc., or in any combination thereof. For example, in the illustrated embodiment, program instructions <NUM> include program instructions executable to implement the functionality of a hierarchy storage nodes that maintain versions of hierarchical data structures or components of a transaction log store that maintain transaction logs for hierarchical data structures, in different embodiments. In some embodiments, program instructions <NUM> may implement multiple separate clients, server nodes, and/or other components.

In some embodiments, program instructions <NUM> may include instructions executable to implement an operating system (not shown), which may be any of various operating systems, such as UNIX, LINUX, SolarisTM, MacOSTM, WindowsTM, etc. Any or all of program instructions <NUM> may be provided as a computer program product, or software, that may include a non-transitory computer-readable storage medium having stored thereon instructions, which may be used to program a computer system (or other electronic devices) to perform a process according to various embodiments. A non-transitory computer-readable storage medium may include any mechanism for storing information in a form (e.g., software, processing application) readable by a machine (e.g., a computer). Generally speaking, a non-transitory computer-accessible medium may include computer-readable storage media or memory media such as magnetic or optical media, e.g., disk or DVD/DIRECTORY STORAGE SERVICE <NUM>-ROM coupled to computer system <NUM> via I/O interface <NUM>. A non-transitory computer-readable storage medium may also include any volatile or non-volatile media such as RAM (e.g. SDRAM, DDR SDRAM, RDRAM, SRAM, etc.), ROM, etc., that may be included in some embodiments of computer system <NUM> as system memory <NUM> or another type of memory. In other embodiments, program instructions may be communicated using optical, acoustical or other form of propagated signal (e.g., carrier waves, infrared signals, digital signals, etc.) conveyed via a communication medium such as a network and/or a wireless link, such as may be implemented via network interface <NUM>.

In some embodiments, system memory <NUM> may include data store <NUM>, which may be configured as described herein. For example, the information described herein as being stored by the hierarchy storage nodes or transaction log store described herein may be stored in data store <NUM> or in another portion of system memory <NUM> on one or more nodes, in persistent storage <NUM>, and/or on one or more remote storage devices <NUM>, at different times and in various embodiments. In general, system memory <NUM> (e.g., data store <NUM> within system memory <NUM>), persistent storage <NUM>, and/or remote storage <NUM> may store data blocks, replicas of data blocks, metadata associated with data blocks and/or their state, database configuration information, and/or any other information usable in implementing the methods and techniques described herein.

In one embodiment, I/O interface <NUM> may be configured to coordinate I/O traffic between processor <NUM>, system memory <NUM> and any peripheral devices in the system, including through network interface <NUM> or other peripheral interfaces. In some embodiments, I/O interface <NUM> may perform any necessary protocol, timing or other data transformations to convert data signals from one component (e.g., system memory <NUM>) into a format suitable for use by another component (e.g., processor <NUM>). In some embodiments, I/O interface <NUM> may include support for devices attached through various types of peripheral buses, such as a variant of the Peripheral Component Interconnect (PCI) bus standard or the Universal Serial Bus (USB) standard, for example. In some embodiments, the function of I/O interface <NUM> may be split into two or more separate components, such as a north bridge and a south bridge, for example. Also, in some embodiments, some or all of the functionality of I/O interface <NUM>, such as an interface to system memory <NUM>, may be incorporated directly into processor <NUM>.

Network interface <NUM> may be configured to allow data to be exchanged between computer system <NUM> and other devices attached to a network, such as other computer systems <NUM> (which may implement embodiments described herein), for example. In addition, network interface <NUM> may be configured to allow communication between computer system <NUM> and various I/O devices <NUM> and/or remote storage <NUM>. Input/output devices <NUM> may, in some embodiments, include one or more display terminals, keyboards, keypads, touchpads, scanning devices, voice or optical recognition devices, or any other devices suitable for entering or retrieving data by one or more computer systems <NUM>. Multiple input/output devices <NUM> may be present in computer system <NUM> or may be distributed on various nodes of a distributed system that includes computer system <NUM>. In some embodiments, similar input/output devices may be separate from computer system <NUM> and may interact with one or more nodes of a distributed system that includes computer system <NUM> through a wired or wireless connection, such as over network interface <NUM>. Network interface <NUM> may commonly support one or more wireless networking protocols (e.g., Wi-Fi/IEEE <NUM>, or another wireless networking standard). However, in various embodiments, network interface <NUM> may support communication via any suitable wired or wireless general data networks, such as other types of Ethernet networks, for example. Additionally, network interface <NUM> may support communication via telecommunications/telephony networks such as analog voice networks or digital fiber communications networks, via storage area networks such as Fibre Channel SANs, or via any other suitable type of network and/or protocol. In various embodiments, computer system <NUM> may include more, fewer, or different components than those illustrated in <FIG> (e.g., displays, video cards, audio cards, peripheral devices, other network interfaces such as an ATM interface, an Ethernet interface, a Frame Relay interface, etc.).

It is noted that any of the distributed system embodiments described herein, or any of their components, may be implemented as one or more network-based services. For example, a database engine head node within the database tier of a database system may present database services and/or other types of data storage services that employ the distributed storage systems described herein to clients as network-based services. In some embodiments, a network-based service may be implemented by a software and/or hardware system designed to support interoperable machine-to-machine interaction over a network. A network-based service may have an interface described in a machine-processable format, such as the Web Services Description Language (WSDL). Other systems may interact with the network-based service in a manner prescribed by the description of the network-based service's interface. For example, the network-based service may define various operations that other systems may invoke, and may define a particular application programming interface (API) to which other systems may be expected to conform when requesting the various operations.

In various embodiments, a network-based service may be requested or invoked through the use of a message that includes parameters and/or data associated with the network-based services request. Such a message may be formatted according to a particular markup language such as Extensible Markup Language (XML), and/or may be encapsulated using a protocol such as Simple Object Access Protocol (SOAP). To perform a network-based services request, a network-based services client may assemble a message including the request and convey the message to an addressable endpoint (e.g., a Uniform Resource Locator (URL)) corresponding to the network-based service, using an Internet-based application layer transfer protocol such as Hypertext Transfer Protocol (HTTP).

In some embodiments, network-based services may be implemented using Representational State Transfer ("RESTful") techniques rather than message-based techniques. For example, a network-based service implemented according to a RESTful technique may be invoked through parameters included within an HTTP method such as PUT, GET, or DELETE, rather than encapsulated within a SOAP message.

Claim 1:
A system, comprising:
a plurality of storage nodes (<NUM>, <NUM>), comprising a processor and a memory, that store respective versions of a hierarchical data structure consistent with a transaction log for the hierarchical data structure;
a transaction log store (<NUM>), that maintains a transaction log for the hierarchical data structure;
a client device (<NUM>);
one of the storage nodes (<NUM>), configured to:
receive a request issued from the client device to commit a transaction to a hierarchical data structure that includes a transaction state token, the transaction state token generated by the client device from transaction state information received by the client device from another one of the plurality of storage nodes, the transaction state information formed by the another one of the plurality of storage nodes on performing one or more prior operations requested by the client device, wherein the request to commit the transaction includes one or more additional operations to perform by the one storage node as part of the transaction;
generate a conflict validation request for the transaction including the one or more prior operations and the one or more additional operations and send the conflict validation request to the transaction log store; and
responsive to determining that the transaction does not conflict based on the conflict validation received from transaction log store, perform the one or more additional operations on a version of the hierarchical data structure stored at the one storage node and return a response to the request to the client device acknowledging that the transaction has been committed to the hierarchical data structure.