<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Caitlin Bestler on Medium]]></title>
        <description><![CDATA[Stories by Caitlin Bestler on Medium]]></description>
        <link>https://medium.com/@caitlin.bestler_47639?source=rss-3029b07f3b12------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*CHus9Gh9c5hUbmE5.</url>
            <title>Stories by Caitlin Bestler on Medium</title>
            <link>https://medium.com/@caitlin.bestler_47639?source=rss-3029b07f3b12------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 10:37:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@caitlin.bestler_47639/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Namespace Manifests]]></title>
            <link>https://medium.com/@caitlin.bestler_47639/namespace-manifests-82063a3a9c82?source=rss-3029b07f3b12------2</link>
            <guid isPermaLink="false">https://medium.com/p/82063a3a9c82</guid>
            <category><![CDATA[nexentaedge]]></category>
            <category><![CDATA[eventual-consistency]]></category>
            <category><![CDATA[distributed-storage]]></category>
            <category><![CDATA[snapshot-storage]]></category>
            <dc:creator><![CDATA[Caitlin Bestler]]></dc:creator>
            <pubDate>Mon, 18 Jun 2018 20:15:50 GMT</pubDate>
            <atom:updated>2018-06-18T20:15:50.491Z</atom:updated>
            <content:encoded><![CDATA[<h4>NexentaEdge Architecture Series (http://nexentaedge.io)</h4><p>NexentaEdge metadata is kept in a distributed record-store, or to be more precise it is kept in two different tiers of record stores.</p><p>The first tier is kept on the distributed storage targets holding the Version Manifests themselves. Version Manifests are the root chunk for each object version. Because it is on the same targets the index can be updated as the manifests are created on each target. New object versions can be accepted and quickly retrieved. Each target can respond independently as quickly as its persistent storage and network resources allow.</p><p>The second tier allows for more aggregate operations collected on a cluster-wide basis, but with higher latencies. The second tier is represented by distributed record stores called “Namespace Manifests”. Namespace Manifests are automatically maintained on an asynchronous basis</p><p>We will illustrate how these two tiers interact by examining how names are resolved. NexentaEdge metadata has special features:</p><ul><li>It supports flat lookup of names no matter how many directories are included in the full path name. This is handled by the first tier fully distributed per-storage-target index.</li><li>It still supports directory rename operations which can be implemented in a single write. This is handled by the cluster-wide namespace manifest tier.</li><li>No form of cluster-wide synchronization is required before the put of a new object version can be completed. That is, the new object version is visible to all users and is safely persistently stored. Newly put versions may have a slight delay before they are supported in certain cluster-wide queries.</li></ul><p>The challenge with distributed metadata is balancing between the speed of safe updates versus the ability to efficiently search the metadata. You can be totally distributed, making creation of a new object version as simple as creating the required replicas but at the cost of making queries hard work. This is the first tier solution. Or, you can resolve all metadata edits to a single persistent record store so that queries are easy but each update is far more work involving more bottlenecks to complete.</p><p>NexentaEdge’s architecture adopts a two-tier strategy:</p><ul><li>Fully distributed creation of new object versions: When the Version Manifest for a new object version has been put the object is visible. This root manifest, known as a “Version Manifest”, is constrained to be within a target group that is selected based upon hashing the fully qualified name of the object (including the Tenant name). As soon as a Version Manifest has been put to targets within the name hash selected group it can be found by anyone searching that group. Network splits may temporarily hide some versions from some users, but they will eventually become visible to all users as the network heals. Most distributed object systems will prevent new object versions from being put during a network split, at least to anyone who is not part of a plurality.</li><li>Asynchronous consolidation of information about all Version Manifests in a distributed object known as a “Namespace Manifest”. The Namespace Manifest may lag on being aware of all new object versions, but it will always know what timestamp it is complete through. Typically, eventually consistent systems propagate updates fairly quickly but make absolutely no guarantees. Namespace Manifests include which timestamp has been fully processed from each Initiator.</li></ul><p>With the direct metadata layer NexentaEdge provides efficient puts of new object versions and retrieval of the current version of all objects . With efficient group messaging a group of storage targets can manage the collective responsibility for storing and retrieving both payload and metadata Chunks. The Version Manifest metadata does not include the precise location of any replica so that it can be immutable. This enables efficient distributed processing.</p><p>This tier does not easily address confirmation of an edit, specifically that the new object version is the first published to the object of its generation. Multiversion Concurrency Control (MVCC), or “optimistic locking”, is an efficient solution for ensuring that there is exactly one successor to any object version when concurrent updates are rare. But in the fully distributed solution it is difficult to gather evidence that proves that other object versions have not been created.</p><p>Each storage target could maintain a complete list of all versions that are known to it, and the initiator could merge those lists when it collected replies. But unless non-responding nodes are guaranteed to be expelled from the cluster there is no way to know when the version list is complete. But maintaining a Version List on each storage target requires an extra disk write operation on each update when compared to merely tracking the most current version. handling potentially long lists of verions on each storage target also increases code complexity.</p><p>NexentaEdge’s second metadata tier resolves this problem.</p><p>Version Manifests are immutable. That means that information about a Version Manifest is also immutable. If each Version Manifest is uniquely identified, then the records describing each Version Manifest are also uniquely identified. What NexentaEdge takes advantage of is that if you have a vast distributed collection of immutable unique records can be coalesced into fewer locations where they can be efficiently searched using MapReduce techniques.</p><p>MapReduce techniques are typically required because it would generally be undesirable to consolidate all the Namespace Manifest information to a single record store, or even N replicas of a record store containing all of the Namespace Manifest records. Having the entire record store behind one process limits the speed of the entire cluster to create new versions to the rate at which that single process can accept new records.</p><p>Sharding the record store spreads out the storage requirements for Namespace Manifests to multiple targets. More importantly it spreads out put and search requests so that no single record store is overwhelmed with Namespace Manifests transactions.</p><p>Keeping multiple replicas in synch requires being able to process additions out of order. Having unique records means that three replicas of a shard can add a set of new records in any order and they will all end up with the same set of records once they are all added. As long as each replica of this repository eventually receives notices of the same set of version manifests the resulting record stores will be identical.</p><p>Because all records are unique it is also possible to shard the Namespace Manifest into as many pieces as required. If updating the namespace manifest is becoming a bottleneck, merely shard it into more pieces. Any search of a namespace manifest is done in parallel. Doubling the number of servers conducting the search only minimally increases the time required for the search. Specifically from ‘longest delay from N searches’ to ‘longest delay from 2*N searches’.</p><p>The only issue with this asynchronous collection of information describing Version Manifests is not the data associated with any Version Manifest (it is immutable) but knowing the range of Version Manifests which <strong>might</strong> exist but could be as of yet unknown to the collected record store.</p><p>To solve we include data from each Initiator about what cutoff timestamp they have for new Version manifests. When Initiator X forwards data about Version Manifests it has collected in a batch it notes that it is no longer creating new Version Manifests with a timestamp prior to X.</p><p>The collective master manifest therefore knows that it knows all versions manifests dated earlier than these cutoff timestamps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*seIqIWe2UXrgCgtqkkjJog.png" /></figure><p>The process for maintaining a Namespace Manifest is a continuous MapReduce job. The Map function is done on each storage target as new Object Versions are logged. The new records are collected into batches based upon the target shard. Batches are dispatched to the target when they are sufficiently old and/or sufficiently full. The batches from each source are sequentially numbered, so the target shards can request retransmission of any missing batches.</p><p>Upon receipt of an in-order batch the target logically merges the result into the record store. It can defer creating new data by processing several batches as once as a deferred merge operation. It just has to search the master record set and all received but unmerged batches until the new records have been merged. Merge processing is heavily deferrable. Ultimately it only has to keep up with the sustained new transaction rate, which is typicaly far slower than the peak transaction rate.</p><h4>Immutable, but Expungable</h4><p>The IPFS website (https://github.com/ipfs/issues/93) summarizes an important distinction very well:</p><ul><li>Permanence != Persistence .</li></ul><p>The records describing Object Versions in a Namespace Manifest are permanent in that they are just like the Version Manifests they describe — they can never be updated, but they can be expunged.</p><p>While you could maintain a Namespace Manifest as a write-only permanent journal, like Blockchain, it can also automatically prune records about Object Versions that have already been deleted.</p><p>A permanent ledger referencing expunged version manifests could still be useful for some historical analysis. Pruning old versions is optional, and probably dependent on how cheap extremely cold storage is.</p><p>Not requiring keeping the journal forever is one difference from Blockchain. The more important difference is that there is no required consensus before new posts can be added. The records in a Namespace Manifest are validated by inclusion of the Initiator’s network address, not deliberately expensive “mining” algorithms.</p><h4>Enabled by Unique Immutable Metadata</h4><p>The benefits outlined here are all enabled by the definition of NexentaEdge metadata as being immutable, self-validating and location-indenpendent. The methods of collecting, indexing and publishes these derivatives will vary as NexentaEdge evolves as a product. But all of these solutions are enabled by the fact that the information about a Version Manifest can never become obsolete.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82063a3a9c82" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Supporting Directory Operations With a Flat Name Index]]></title>
            <link>https://medium.com/@caitlin.bestler_47639/supporting-directory-operations-with-a-flat-name-index-905001f8f7be?source=rss-3029b07f3b12------2</link>
            <guid isPermaLink="false">https://medium.com/p/905001f8f7be</guid>
            <category><![CDATA[hierarchical-directories]]></category>
            <category><![CDATA[nexentaedge]]></category>
            <category><![CDATA[flat-name-index]]></category>
            <category><![CDATA[storage-bucket]]></category>
            <dc:creator><![CDATA[Caitlin Bestler]]></dc:creator>
            <pubDate>Thu, 14 Jun 2018 14:30:23 GMT</pubDate>
            <atom:updated>2018-06-14T14:30:23.363Z</atom:updated>
            <content:encoded><![CDATA[<h4>NexentaEdge Architecture Series (http://nexentaedge.io)</h4><p>Traditional file systems allow renaming of directories or moving files from one directory to another, but with a giant asterisk. Rename operations are not allowed unless the existing and new names are both part of the same file system.</p><p>You probably think of your entire file namespace as ‘the file system’, so breaking that namespace down into multiple ‘file systems’ may well strike you as just as excuse for telling you that they won’t support the rename that you just requested. It is especially annoying that you are expected to remember which of your directories you created as ‘file systems’ and which are mere directories.</p><p>However, there are actually reasons why renaming across file systems are difficult. These issues ultimately require a different implementation strategy to support efficient rename operations for scale-out cloud storage.</p><p>Hierarchical directories enable efficient renaming within a single-server file system, but are ultimately incompatible with scale-out storage. Most object storage solutions have solved this problem by disallowing rename operations, but there is a way to support directory operations while keeping the efficient “flat” name indexes used in object storage.</p><p>Distributed multi-user storage systems either have to be copy-on-write or have very complex algorithms to ensure read operations are completed consistently. Nobody want a read operation to return a mix of data that was overwritten with partial new data. They want the read to either return the data as it was before someone else’s write or to yield data that is entirely after the other user’s write. Both NexentaStor and NexentaEdge are copy-on-write solutions.</p><p>The challenge for copy-on-write systems is that any update to an object/file theoretically requires updating all of its parent directories. This would result in a tremendous write amplification if each write required its own write to each of its parent directories. Each server is required to only acknowledge a write only after the write and all derived writes are “done”. You can’t say ‘it’s done’ and later say “oops, sorry”. “Done” means “done”.</p><p>Fortunately the acknowledgement does not require all of those writes be “done” in the sense that they are in their final format, just that the write is “persistently stored”. Updating of parent directories can be deferred as long as the deferred edits will be reflected in all transactions going forward and tht the changes will not revert if the system reboots. Basically, the edit has to be reflected in working memory and saved persistently to disk. But it does not have to be saved to disk in the permanent format. Instead the final format writes can be deferred until later. Until then journal entries guarantee the writes will be eventually completed and not forgotten during a system restart.</p><p>Deferring writes spreads them out. The number of writes required <strong>before </strong>the<strong> </strong>initial write can be acknowledged is greatly reduce.<strong> </strong>Even the eventual number of writes<strong> </strong>can be reduced because a single committing write to a parent directory can frequently reflect more than one pending transaction.</p><p>The reason that writing to the journal is considered safe is that each file system will reapply pending writes from the journal when restarting.</p><p>Ensuring that an acknowledged transaction will always look as though it was fully completed no matter what is not simple logic. But it is at least a tractable problem on a single server file system. Maintaining a journal across multiple servers is far more complex. Just consider how many different recovery scenarios have to be dealt with. Any one of the servers can fail. A second server might fail while a first server is attempting to recover. Enumerating the problem is difficult, solving it correctly even more so.</p><p>There are ways to maintain a journal across multiple servers, but not without slowing down each and every commit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*YJRB1oZpu3KLrAn6wjB1Sg.png" /><figcaption>Traditional File System referenced by a Mount Point</figcaption></figure><p>Federated NAS solutions, such as NFSv4, solve this by mapping prefix names to different ‘mount points’. Each is its own root file system, journal and a distinct storage pool for at least the metadata, and each has its own repository for the file system metadata. The question is how big should each file system be? Larger file systems enable a wider scope of rename operations but also create a processing bottleneck for metadata operations.</p><p>That is why object storage systems have favored eliminating bottlenecks. They effectively make each object its own file system. Having a scope of a single file means there are no directory rename operations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*2j7lC64_thTBvI25oJKKpg.png" /><figcaption>Flat Name Index</figcaption></figure><p>You can clone an existing object with a new name and hopefully only have the system copy metadata, not payload. But even that requires two operations: creating the clone and then marking the old name for deletion. Cloning an entire tree, if supported, requires copying metadata for each object within the renamed tree. Not having to replicate the payload is a big advantage, but an entire tree of metadata is still an extensive copy operation can be acknowledged.</p><p>Object storage systems restrict move operations for a very good reason. Getting and putting unmoveable objects is simple and straight-forward. Creation of each replica can be acknowledged by the single storage target creating that replica. The creation of each replica can be a simple atomic operation that a single target either completes or does not.</p><p>These simplifications allow quick completion of the most common transactions. It is hard to even imagine a scenario where directory rename operations would be more common than puts.</p><p>What we want is to keep the benefits of simple puts while enabling directory move operations to be performed. Our goals are simple:</p><ul><li>The number of operations required to get an object should not be dependent on the number of sub-directories in the path name.</li><li>The put of each replica of the Version Manifest must remain a single atomic transaction performed on a single storage target.</li><li>Directory Operations need to have linear execution times that are not dependent on the number of objects that are conceptually enclosed in a directory.</li></ul><p>Directory Operations can be supported by defining a new type of Object Version that encodes Links. These objects are otherwise like any other Object Version except that they have abbreviated Version Manifest formats.</p><p>A <strong>File Link</strong> encodes minimal key-value metadata, including a linked-to Version Manifest. This specifies the linked to NHID and the VM-CHID of the specific version.</p><p>A <strong>Directory Link</strong> encodes mapping of all names matching a prefix to a new prefix. Versions must be created both for the Directory Link From and Directory Link To names.</p><p>These records enable resolving names created either by a ‘ln’ command or by a ‘mv’ command.</p><p>The namespace manifest records for these Link objects enable mapping a time-dependent name that may have been linked or renamed to a stable name in the fully distributed namespace. It avoids the need to edit the names in the Namespace Manifest.</p><p>NexentaEdge’s ability to make coherency guarantees while operating with the efficiency of eventual consistency is dependent on two rules:</p><ul><li>Every operation is performed atomically by a specific storage target. That storage target can acknowledge the creation of a replica once the atomic put of the chunk is safe via journaling local to that storage target.</li><li>All operations on metadata are commutable. It does not matter which order the operations are performed, as long as they are all eventually applied the final results are identical (the same records are in all replicas of the namespace manifest and the fully distributed name iindexes all have the same current version of the object).</li></ul><p>Modifying Namespace Manifest records from ‘/X/Y’ to ‘/X/Z’ would break these rules s:</p><ul><li>Two rename operations cannot be applied in either order if they both seek to change the same name.</li><li>Changing all ‘/X/Y’ records to ‘/X/Z’ records can involve two or more namespace manifest shards.</li></ul><p>We can solve this with Directory Links. A Directory Link specifies where objects/files within this Directory can be found in the fully distributed namespace. This is itself a versioned object. Of course moving a directory requires creating two of these object versions, one to activate the new name and one to hide the old name.</p><p>Updating a Link is just putting a new object version. The new object versions have unique version identifiers, making noting their existence in the Namespace Manifest safe.</p><p>An Initiator can transactionally ‘edit’ a directory by putting the new version of the Direcotry Link We can extend the Version Manifest put transaction to define a ‘conditional put’ which requires that successful completion of the new version can only complete if it is the only version for this generation.</p><p>Rather than requiring all name resolutions to go through this process we can require that all namespaces follow the normal object rules, that is they are unmoveable, unless movability has been specifically enabled with a metadata key-value pair for an enclosing directory.</p><p>These extra object types enable support for directory renames without negatively impacting the performance of object gets and puts. The user regains the ability to publish using links and to re-organize their namespace by moving directories.</p><p>Defining Link objects effectively allows direcgtory operations while keeping the benefits of a flat name index. Further, it does not require pre-designating specific directories as “file systems” and limiting the scope of certain oprations to conform to file system boundaries. Nor are we forcing all objects into top-level “buckets” with no support at all for directory rename operations.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=905001f8f7be" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Snapshot Manifests]]></title>
            <link>https://medium.com/@caitlin.bestler_47639/snapshot-manifests-cd87c317b060?source=rss-3029b07f3b12------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd87c317b060</guid>
            <category><![CDATA[snapshot]]></category>
            <category><![CDATA[distributed-snapshot]]></category>
            <category><![CDATA[nexentaedge]]></category>
            <category><![CDATA[eventual-consistency]]></category>
            <category><![CDATA[distributed-storage]]></category>
            <dc:creator><![CDATA[Caitlin Bestler]]></dc:creator>
            <pubDate>Wed, 13 Jun 2018 15:44:36 GMT</pubDate>
            <atom:updated>2018-06-13T15:44:36.433Z</atom:updated>
            <content:encoded><![CDATA[<h4>NexentaEdge Architecture Series (http://nexentaedge.io)</h4><p>Snapshot Manifests are NexentaEdge’s implementation of a traditional copy-on-write snapshot applied to a fully distributed eventually consistent storage cluster.</p><p>Snapshot Manifests are versioned objects which specify a precise set of object versions. The are created as a subset of a master distributed record store describing all object versions within a specific namespace, typically a Tenant. We will describe the Namespace Manifest and its construction in the next blog.</p><p>Snapshot Manifests can be used in all the ways that traditional file system snapshots can be used. They can even be used in many additional ways.</p><p>Snapshot Manifests are created by users. Unlike traditional file system snapshots they are not file system objects. Snapshots can be taken of any subset of a Namespace Manifest, not just of pre-designed file systems. There are no file system limits imposed on the number of snapshots that can be kept. They are created by end users for end user purposes.</p><h4>Deferred Enumeration Snapshots</h4><p>A new version of a Snapshot Manifest can be created in an instant capturing a true point in time snapshot of the selected subset of the namespace. The version is first expressed as a rule which specifies the set of information to be extracted from a Namespace Manifest. The actual information extracted replaces this content once it has been extracted. Before then the version exists, but cannot be retrieved.</p><p>The set of objects referenced by a Snapshot Manifest does not have to be known by the creator of the Snapshot. The Snapshot does not even have to be for ‘now’. Snapshots can be created covering any point-in-time in the past where the referenced data has not yet been expunged.</p><p>Because snapshots are a subset of a Namespace Manifest they can even be the starting point for further refining the subset by applying further qualifiers to further limit the included set. New snapshots can also be created by merging the records from existing snapshots as long as they were both subsets of the same original namespace.</p><h4>Consistent Snapshots</h4><p>By following some simple rules for time-stamping Object Versions it is easy to create Snapshot Manifests which can be consistent for a specific application. They are consistent in that they either fully include a transaction or fully exclude it, a snapshot never captures a transaction that is halfway done.</p><p>When it is complete it is a true point-in-time snapshot of a distributed cluster that never stalls any Initiator from creating new object versions because of network issues or the actions of any other initiator. The snapshot time is <strong>not</strong> when a set of target machines ‘takes’ a bunch of distributed snapshots, it is the filter that identifies the set of records to be extracted.</p><p>It is not even necessary to identify the snapshot time in real-time. Rather than co-ordinating a cluster-wide quiescent point in real time it would be possible to compare transaction logs after the fact to determine when the application was quiescent after the fact.</p><h4>No ‘Freeze’ Allowed</h4><p>Chandry and Lamport in their 1985 paper[1] compare the problem of taking a snapshot of a distributed system to that of taking a photograph of a sky full migrating birds. The image is too immense to be captured by a single photograph, and the photographers cannot demand the birds “freeze” to enable photo gathering.</p><p>Any “snapshot” solution that impedes ongoing transactions in any way is the equivalent of demanding the migrating birds to freeze. The birds won’t listen to you, and the distributed storage servers <strong>shouldn’t</strong> be interfered with.</p><p>Some “snapshot” solutions require the application layer to effectively gather this ultra-wide screen photo collage themselves by “snapshotting” only the versions known to a specific node at the time of the snapshot. You can snapshot a directory, but only if you already know the latest version of everything in that directory.</p><p>This is not effective when the whole purpose of the snapshot is to enable processing of all data collected as of time X. You can only get the list of all data collected by time X if you already know all data collected by time X.</p><p>Other solutions merely support creating a clone of a specific object version and then calling that clone a “snapshot”.</p><p>NexentaEdge provides a true distributed snapshot. Chandry and Lamport algorithm requires end-to-end communication. Ours does not require end-to-end communication to take the snapshot, merely to publish an extract. Periodic snapshots can be taken every hour on the hour, not every hour at the first second of that hour when the network was fully healthy.</p><p>With this strategy, NexentaEdge can be accepting new object versions from hundreds of sources concurrently, and still take a point-in-time snapshot at any time that specifies a consistent set of object versions. These snapshots can be taken automatically at specified times even when the network is partitioned. The 2:00 AM snapshot will reflect 2:00 AM, not the first moment after 2:00 AM when the network was fully healed.</p><p>Because all of the information about a Version Manifest is unique and immutable a Snapshot can cache any portion of the information form the Version Manifest in the snapshot itself. While this makes the snapshot object larger, it can speed up access to the snapshot objects. This can allpw distributed compute jobs to publish results as a snapshot, allowing single-step access to the referenced chunks by clients who effectively “mount” the snapshot.</p><h4>File System Snapshots</h4><p>Traditional file system snapshots from copy-on-write filesystems such as ZFS enabled taking snapshots without making the world ‘freeze’ first. Snapshots enable rollback to prior points, reading old versions of files and efficient replication of file system changes between multiple sites.</p><p>The initial design goal for NexentaEdge snapshots was simply to replicate those features. Taking point-in-time snapshots on single-system file servers is relatively easy, because ultimately there is a single transaction queue. Snapshots can be taken between transactions. Doing that in a distributed system would require complex cluster-wide synchronization. But building snapshots as an extract of a collection of transaction log entries enables something even more powerful — the snapshots are no longer bound to be for a limited number of pre-identifiable snapshot-eligible mount points. Snapshots can be for <strong>any</strong> set of objects/files no matter what directory they are located ‘within’, and selection is lot limited to specifying a directory and all descendants.</p><ul><li>The chosen subset can be for any set of matching object/file names.</li><li>The subset can be further refinded by requiring any number of metadata field matches. For example a snapshot could be limited to objects owned by a specific user.</li><li>The snapshot time can be chosen after the fact to be a time when no node had initiated a transaction but not yet completed it It is not necessary to determine this instant in real-time, merely before the earliest possible expunging of data that the snapshot should protect.</li></ul><p>There is even an easier method for an application to avoid the risk of a snapshot inlucing only a portion of a transaction, it can force the timestamps for all object versions created as part of a transaction to have the same timestamp.</p><h4>Multiple Applications Can Snapshot The Same Data</h4><p>Because a snapshot is an application object that merely pins the referenced data different applications can create their own snapshots that reference the same files.</p><p>Multiple snapshots taken “at the same time” do not slow the system down any at the nominal snapshot time. There is a non-zero amount of metadata creation required for each snapshot, but no payload chunks need to be replicated and there are no critcall path dependencies waiting for the new snapshots to finish thier extraction job.</p><h4>One Application Can Snapshot The Same Data Many Times</h4><p>It even makes sense for a single application to take different snapshots of different subsets of a larger pool of data. Machine Learning applications work with both Training Sets and Testing Sets. Both are subsets of a larger set of objects. Snapshots are a storage and communications efficient method of identifying these sets.</p><p>Snapshots provide the same “containerizing” of a set of data as aggregating container formats such as HDF5, but without replicating the actual payload.</p><p>Snapshots can become the representation of “datasets” as used in Machine Learning applications. Multiple snapshots can each specify different selections of data, providing a single handle for referencing that set.</p><p>Snapshots can be any set of object versions, making them useful for reporting the results of object queries.</p><h4>Snapshot Optimized Data Retrieval</h4><p>Snapshots are not liited to identifying the set of object versions referenced behind a given tag. They can be used to optimize retrieval of the data referenced in a specific snapshot:</p><ul><li>Any record within a Version Manifest can be included in the Snapshot Manifest. This can eliminate some or all access to the Version Manifest when the client accesses the object using the snapshot.</li><li>The local storage layer can pre-fetch non-cached Version Manifests and/or payload chunks as soon as the client indicates that it intends to access data via a snapshot (by “mounting” the snapshot). This can particularly optimize multi-stage HPC jobs.</li></ul><h4>Summary</h4><p>Snapshot Manifests enable creation of true point-in-time snapshots of an eventually consistent distributed storage system. Any criteria can be applied to identify the specific subset of objects to be included in the snapshot. Once created the Snapshot Manifest can be used to access that data, to optimize processing of that data as a set, to clone that point in hisotry or rollback to it.</p><p>The Snapshot Manifest goes beyond the traditional file system snapshot and becomes a far more generalized expression of a dataset.</p><p>[1]: Leslie Lamport, K. Mani Chandy: Distributed Snapshots: Determining GlobalStates of a Distributed System.<br>In: ACM Transactions on Computer Systems 3. Nr. 1, February 1985.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd87c317b060" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unique Version IDs and Generations, but no Version Numbers]]></title>
            <link>https://medium.com/@caitlin.bestler_47639/unique-version-ids-and-generations-but-no-version-numbers-234e8f889f06?source=rss-3029b07f3b12------2</link>
            <guid isPermaLink="false">https://medium.com/p/234e8f889f06</guid>
            <category><![CDATA[distributed-storage]]></category>
            <category><![CDATA[nexentaedge]]></category>
            <category><![CDATA[eventual-consistency]]></category>
            <category><![CDATA[version-numbers]]></category>
            <dc:creator><![CDATA[Caitlin Bestler]]></dc:creator>
            <pubDate>Tue, 12 Jun 2018 17:16:25 GMT</pubDate>
            <atom:updated>2018-06-12T22:21:20.050Z</atom:updated>
            <content:encoded><![CDATA[<h4>NexentaEdge Architecture Series (http://www.nexentaedge.io)</h4><p>How do you assign a unique version number for a new object version even when the network is split? Two clients, A and B, both want to create a new version of Object X, but there is no network connectivity between them. What do you do?</p><ul><li>Only allow the client connected with a quorum to put their new version. Keep in mind that <strong>neither</strong> might be within the quorum. Any version not accepted is in danger of loss from client machine or drive failure.</li><li>Create a unique identifier that does not require any form of serialization.</li></ul><p>NexentaEdge does the latter, creating a Unique Version Identifier (UVID) by extending a high precision timestamp with the network id of the client. Now the versions created by A and B will be unique, and all nodes will agree on which one was posted later.</p><p>While it works the UVID is somewhat awkward. It is large, it is difficult to sequence, and it does not identify when there are two potentially conflicting edits.</p><p>NexentaEdge solves this by adding a “Generation’ metadata field. A client sets this to 1 greater than what it perceives the current Generation to be.</p><p>So, A and B both observe object X with UVID Y and Generation 7. A then puts object X UVID Y1 Generation 8, while B puts object X UVID Y2 Generation 8. Even if they put the versions at exactly the same tick their network address will break the tie. All nodes will agree that B’s version is later than A’s because even though their timestamp is identical the tie is broken by B’s “later” address.</p><p>We now have two Generation 8 object versions. This is actually good, because the alternative is to not accept one of them. What the Generation field does is flag that a version has been eclipsed, a ‘later’ version has superceded it without its contents having been fetched while preparing that ‘later’ version.</p><p>Was information lost? There is no automated method that can automatically correctly evaluate two versions. A human editor is going to have to review the two edits and decide what if any change is required to create a Generation 9 version. Citing the additional ‘based upon’ versions signals that the split has been resolved. The split no longer needs to be highlighted or have an extended hold on those versions.</p><p>Normally the ‘Generation’ field will look like a normal “version number”. It will monotonically increase. Putting more than one version during the short get-through-put cycle will be rare. But when it happens the system can notify the authors of the confict and automatically hold the eclipsed versions until a merged later Generation is posted.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=234e8f889f06" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Location Independent Chunk References]]></title>
            <link>https://medium.com/@caitlin.bestler_47639/location-independent-chunk-references-b4039f106ca6?source=rss-3029b07f3b12------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4039f106ca6</guid>
            <category><![CDATA[nexentaedge]]></category>
            <category><![CDATA[metadata-references]]></category>
            <category><![CDATA[consistent-hashing]]></category>
            <category><![CDATA[dynamic-load-balancing]]></category>
            <category><![CDATA[distributed-storage]]></category>
            <dc:creator><![CDATA[Caitlin Bestler]]></dc:creator>
            <pubDate>Wed, 23 May 2018 22:07:12 GMT</pubDate>
            <atom:updated>2018-05-23T22:10:27.709Z</atom:updated>
            <content:encoded><![CDATA[<h4>NexentaEdge Architecture Series</h4><p>In the prior blog on NexentaEdge (https://nexentaedge.io) we mentioned that Chunks were unique and immutable and that Chunk References merely identify how a Chunk is used to rebuild an object, but do not specify the locations where the chunk is stored. Leaving location out of metadata chunk references allows the metadata to remain immutable even as replicas of the chunk are inevitably migrated because objects live longer than disk drives.</p><p>This time we will expand on how Chunk References are kept location independent.</p><p>NexentaEdge stores the metadata for an object version in a Version Manifest, and optionally in sub-manifests that are referenced by the Version Manifest. Each Version Manifest specifies a single version of an object. This includes metadata key-value pairs, including a few mandatory fields, and a series of Chunk References which reference the payload chunks.</p><p>A typical Chunk Reference contains:</p><ul><li>The CHID (Content Hash Identifieer) of the referenced chunk.</li><li>The Logical Offset of this content in the object version.</li><li>The Logical Length of the decompressed chunk.</li></ul><p>What it does not specified is any locations where the replicas are held. This means that the content can be migrated either for maintenance or load-balancing purposes without updating the Version Manifest.</p><p>Actually systems using consistent hashing also have location-free references. What is different about NexentaEdge is that the location-free Chunk References can specify a dynamic set of locations that can change merely to load-balance the cluster. The set of targets selected by a consistent hash algorithm can only change when a server is added or dropped.</p><p>NexentaEdge hashes the relevant cryptographic hash (content or name) to a Negotiating Group rather than to a set of target machines. Storing and<br>retrieving chunks is negotiated dynamically within the group. Dynamically negotiating over the entire cluster would require too much network traffic. The Negotiating Group is sized to gain the benefit of some dynamic load balancing while limiting the cost of the negotiation. The current target size is 9 to 12.</p><p>We’ll explain the four most critical transactions that implement this strategy:</p><ul><li>Getting a Payload Chunk.</li><li>Putting a Payload Chunk.</li><li>Getting a Version Manifest.</li><li>Putting a Version Manifest.</li></ul><h4>Get Chunk with CHID</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*nkEEo_r2dSPOZG-jeyEnhA.png" /></figure><p>Payload chunks are found by sending a find request identifying the CHID (Content Hash IDentifier) of the desired chunk to every member of the TargetGroup. This target group is selected by hashing the CHID.</p><p>Each receiving Target responds to the Initiator with either an indication that it has Chunk X and could deliver it at time Y, or that it does not have Chunk X.</p><p>Once sufficient replies have been received to make a selection the Initiator sends a message to the TargetGroup specifying the selection it has made.<br>This is sent to the same group so that nodes not selected can cancel tentative resource reservations.</p><p>Lastly the selected storage target delivers the requested chunk at the specified time. Because this was negotiated, a network with a non-blocking core can transmit the chunks at the full rate provisioned for payload transfers.</p><h4>Put Chunk With CHID</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*6BDg5qfLH8ig1EMD6m2edA.png" /></figure><p>Of course before we can get Chunk X from somewhere within a TargetGroup we have to put it to that group.</p><p>Each member of the group identifies when it could accept the transfer. The Initiator picks the best set of targets with an overlapping delivery window<br>to receive the required number of replicas.</p><p>The number of replicas can be reduced when some replicas already exist. This message can also complete the transaction if there are already<br>sufficient replicas.</p><p>There is also a nearly identical Replicate Chunk transaction to test if there are sufficient replicas of an already existing Chunk and to put this missing<br>replicas if there is not.</p><h4>Get Version Manifest With NHID</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*X-Z_wxznBpETTdRRHLx2Sw.png" /></figure><p>Of course a storage system that only allowed you to retrieve content previously stored if you remembered a 256 or 512 arbitrary identifier wouldn’t be very useful. We need to put and get named objects. Typically we want the current version of a named object.</p><p>Each object version is described by a Version Manifest. Version Manifests are also Chunks, but they are assigned to TargetGroups based upon their fully qualified object name (it is fully qualified because what the tenant perceives of as the “Fully Qualified” name is prefixed by the Tenant name).</p><p>Current Version Manifests are found by sending a named find requesting identifying the NHID (Name hash Identifier) of the Version Manifest desired. This is send to the TargetGroup hashed from the NHID. The default request<br>seeks the most current version stored by each target in the group. The Group is derived from the NHID rather than the CHID.</p><p>Each receiving Target responds saying it could deliver a Version Manifest with NHID X and UVID Y (the unique version identifier, including the version’s timestamp. It is made unique by adding the original Initiator’s<br>IP address as a tie-breaker).Each is the most current version known to that Target.</p><p>Once sufficient replies have been collected, the Initiator selects the Version Manifest it wants, and sends a message to the TargetGroup speciyfing which<br>Target should supply the Version Manifest and at what time. Again, this allows the non-selected targets to release tentative resource claims.</p><p>Lastly the selected storage target delivers the selected Version Manifest to the Initiator at the negotiated time at the configured full rate.</p><h4>Put Version Manifest</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*h-YZGc44bpWJFR6YqabcPQ.png" /></figure><p>Putting a new Version Manifest is nearly identicalvto putting a Payload Chunk, except that the Putvrequest is sent to the NHID-derived group<br>(rather than CHID-derived) and that there will not be a pre-existing Version Manifest with the same UVID (Unique Version IDentifier).</p><h4>Dealing With Old Versions and More</h4><p>The early releases of NexentaEdge implemented Version searches by having each Target maintain a list of Version Manifests stored for each Object stored.</p><p>We have a planned approach that uses a two track system:</p><ul><li>The Targets only track the current version. This is the most common version requested, and we save one persistent storage write for each new object version by only tracking the current version.</li><li>A “Namespace Manifest” which is a distributed object that uses MapReduce techniques to collect and query a distributed key-value store of all Version Manifests logged by any target in the cluster.</li></ul><p>Namespace Manifests enable doing queries on any directory, or even any wildcard mask. Other object stores use some equivalent of Swift’s ContainerDB to enumerate all versions within a single container. The Namespace Manifest allows queries for *any* directory, not just the root directories. It also allows the Namespace Manifest to be updated asynchronously, but reliably. Being a single distributed object there are no capacity or rate limitations on the number of objects within any portion of the namespace. The user can have a single directory holding billions of objects recorded by IOT devices and nothing will break or slow down.</p><p>We’ll cover the Namespace Manifest next time, and then how the Namespace Manifest enables true point-in-time snapshots even in a cluster with no cluster-wide synchronization.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4039f106ca6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Consensus, Who Needs It?]]></title>
            <link>https://medium.com/@caitlin.bestler_47639/consensus-who-needs-it-85da7513dec7?source=rss-3029b07f3b12------2</link>
            <guid isPermaLink="false">https://medium.com/p/85da7513dec7</guid>
            <category><![CDATA[cryptographic-hash]]></category>
            <category><![CDATA[eventual-consistency]]></category>
            <category><![CDATA[consensus-algorithm]]></category>
            <category><![CDATA[transactional-consistency]]></category>
            <category><![CDATA[distributed-storage]]></category>
            <dc:creator><![CDATA[Caitlin Bestler]]></dc:creator>
            <pubDate>Tue, 22 May 2018 21:24:15 GMT</pubDate>
            <atom:updated>2018-06-05T15:13:36.117Z</atom:updated>
            <content:encoded><![CDATA[<p>The Architecture of NexentaEdge — 1st of many.</p><p>NexentaEdge is a distributed storage cluster (<a href="https://nexentaedge.io/">https://nexentaedge.io</a>). This is the first of a series exploring its architecture.</p><p>The conventional tradeoff for distributed storage clusters is between transactional consistency and eventual consistency. Eventual consistency is usually viewed as the cheaper solution, both in terms of desirability and system cost. The critical cost of transactional consistency is the need to reach a consensus on ordering updates.</p><p>Many think of eventual consistency as simply a policy for tolerance of inconsistency on the presumption that momentary contradictions are acceptable as long as they go away eventually. Brief inconsistencies are an acceptable price for the savings that eventual consistency enables. But of course on a full budget anyone would want transactional consistency.</p><p>But that attitude is missing the importance of these different models. The tradeoff is not one of how much users are willing to sacrifice to accomodate lazy storage servers, but what constraints the storage system is creating on putting new content.</p><p>Transactional consistency forces each update to wait until the storage cluster can guarantee the new content will be universally available. Eventual consistency wants to complete the transaction quickly without making the poster wait on other users.</p><p>NexentaEdge takes a different approach. Users posting new content do not have to wait, but neither are users left with no guarantees.</p><p>NexentaEdge stores all data as chunks, whether metadata or payload. All chunks are unique, immutable and self-validated. Chunk References do not include the locations where chunks are stored, but still enable chunks to be efficiently retrieved.</p><p>This strategy allows NexentaEdge to provide guarantees beyond making thing consistent “eventually”:</p><ul><li>Clients will never retrieve a version older than one that they have put.</li><li>Changes in any new version will never be automatically erased by later versions that were not a successor to this version.</li><li>A version will only be expunged according to client policy and after a version that is a successor to it has been posted.</li><li>No network partition will prevent a client from putting a new object version. Indeed no client will ever prevent another client from putting a new object version.</li></ul><p>Never blocking a new object version because of the actions of another client is a feature, not a bug or limitation. Transactional systems can only guarantee non-overlapping edits after reaching a consensus. The consensus may be on which updater has the exclusive right to update an object now (distributed locking) or on which of multiple conflicting updates can be committed (<a href="https://nexentaedge.io/">https://nexentaedge.io</a> or multi-version consensus control). Effectively the cluster must be serialized either before the update is initiated or before it can be completed. Distributed locking is more efficient when conflicting attempted edits are common, MVCC for the far more common situation where conflicts are rare.</p><p>So eventual consistency is actually what end consumers want for versioned document archives. Not accepting, or even delaying, the ability to record a new version is not good. What they would prefer is to reliably know when other versions are created and to minimize the time when a new update is not visible to someone wanting to further edit the same document.</p><p>What NexentaEdge offers is eventual consistency with the benefits of immutability and knowledge of what range of possible object versions could exist but which have not yet been propagated.</p><p>What lies behind this capability is simple, NexentaEdge has defined its metadata so that no consensus algorithm is needed. Other storage solutions may have clever consensus algorithms, but you cannot be more clever than no consensus algorithm at all.</p><h4><strong>Consensus is Expensive</strong></h4><p>The fundamental issue on consensus is that it is impossible to update the same information at multiple locations at exactly the same time. This has been expressed many ways, including CAP Theorem.</p><p>Distributed Storage systems that offer transactional consistency by requiring a cluster-wide consensus before the put transaction creating a new object version can complete. This may be based upon <em>a priori</em> locks or optimistic locking which detects conflicting edits and immediately applies the conflicting edits before reapplying the attempted edit.</p><p>Either strategy requires end-to-end communications covering at least a relevant quorum of node members. Of course, a quorum based consensus is dependent on agreement about how many votes are needed, which is why consensus algorithms always get complex. If a quorum consensus on either the lock or the specific edit cannot be achieved then the requested operation cannot proceed or complete. Disallowing puts of new versions is the <em>last</em> thing that a storage cluster supporting versioned documents should do.</p><h4><strong>Unique Chunks Do Not Require Consensus</strong></h4><p>NexentaEdge defines object versions in metadata chunks called Version Manifests. These chunks include metadata fields specifying the fully qualified object name and a unique version identifier.</p><p>Chunks are located using a cryptographic hash identifier of the chunk. For Version Manifests this is the Name Hash Identifier (NHID). All Version Manifests for a given object are stored within storage servers addressed by a single multicast group derived from the NHID. Payload Chunks, by contrast, are located based on the Content Hash Identifier (CHID). Depending on options selected the cryptographic hashes may be 256 or 512 bits.</p><p>Further, because the Version Manifests include their unique identifier, their Content Hash Identifiers (CHIDs) are also unique.</p><h4>NexentaEdge Always Accepts New Versions</h4><p>All NexentaEdge chunks are unique. They either have unique payload identified by a 256 or 512 bit cryptographic hash, or they have a Version Manifest that includes a unique identifier of the the version.</p><p>Two nodes can both put the same payload chunks without harm. Because the unique version identifier includes the IP address of the originating node there is only a single source for any new version. This does impose the onerous constraint that no single source can put two versions of the same object within a single system tick, currently 1/10,000th of a second. The round trip times to negotiate and confirm putting a new chunk will take longer than that.</p><p>Because the same Version Manifest has a unique identifier the source creating it does not need to consult with any other node before creating it. The only entity that is qualified to have an opinion on whether it created a new version of a given object at a given timestamp is itself. Instant consensus.</p><h3>Namespace Manifest and Snapshots</h3><p>Because Version Manifests are unique they can always be created. NexentaEdge collects and processes the transaction log entries noting each new Version Manifest to create a permanent registry of all Version Manifest that we call a Namespace Manifest. The Namespace Manifest can support complex metadata queries and makes it possible to take true point-in-time snapshots of a distributed storage cluster without requiring any consensus deriving blockage.</p><p>We’ll follow up on the Namespace Manifest and Snapshots in our next blog.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85da7513dec7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>