<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="371941" data-post-id="371941">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="garrison" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  garrison
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>First, keep in mind I am not the OP.</p>
<aside class="quote no-group" data-username="Asd" data-post="21" data-topic="72038">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/c68b51/48.png" class="avatar"> Asd:</div>
<blockquote>
<p>Well, yeah, I understand that, but you use <code>dets</code> as a storage which is unordered. And <code>dets</code> can store data as erlang terms. But you still encode keys into binary.</p>
</blockquote>
</aside>
<p>Yes, <code>dets</code> is not appropriate as a storage engine here because it is unordered. It cannot serve range scans (regardless of how you encode the keys). I assume, as you say, that it’s temporary. I actually wrote a longer reply about why <code>dets</code> cannot be used for this case not long ago on another thread.</p>
<aside class="quote no-group" data-username="Asd" data-post="21" data-topic="72038">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/c68b51/48.png" class="avatar"> Asd:</div>
<blockquote>
<p>And when you allow only some keys to be encoded, it means that your abstraction is leaking and the limitation of storage level is getting exposed to the end user</p>
</blockquote>
</aside>
<p>In FoundationDB the abstraction <em>is</em> an ordered binary/binary key/value store. Exposing this abstraction was an explicit design decision which they made very carefully.</p>
<aside class="quote no-group" data-username="Asd" data-post="21" data-topic="72038">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/c68b51/48.png" class="avatar"> Asd:</div>
<blockquote>
<p>Introduce ordering with comparators instead of binary comparison</p>
</blockquote>
</aside>
<p>Try to think about what this would actually mean in practice. Clients would have to somehow provide a comparison function all the way through the system to the underlying storage engine.</p>
<p>What would happen if different clients wanted to order data in different ways? How would you shard the keyspace in that case?</p>
<p>Instead, FDB offers a binary keyspace which is lexicographically encoded (sharded across many servers) and clients are required to encode their data in a way that it comes <em>out</em> sorted in a way that is useful. The tuple layer encodings are provided as a simple way to do that.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="371941" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/bedrock-a-scaleable-distributed-key-value-database-with-better-than-acid-guarantees/72038/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-371941" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="371941"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #21"></div>
  </section>
</div>
    <div class="postbit" id="371943" data-post-id="371943">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="garrison" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  garrison
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Asd" data-post="21" data-topic="72038">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/c68b51/48.png" class="avatar"> Asd:</div>
<blockquote>
<p>I don’t quite get what you’re saying here</p>
</blockquote>
</aside>
<p>FDB is a tool to build databases.</p>
<p>When building a database you want to implement indexes. Like if you had <code>%User{id: 1, first_name: "Jose", last_name: "Valim"}</code>, you may want to build an index <code>{last_name, first_name, id}</code> to look up users by their names.</p>
<p>So you can encode a key <code>Valim/Jose/1</code> (where these values are actually encoded in a particular way, see those docs I linked) and store it in the database under a prefix. Say, <code>my_index/Valim/Jose/1</code>.</p>
<p>Now, say you want to look up all "Jose Valim"s in the database. You can perform a prefix query on the index, which would be a range scan from <code>my_index/Valim/Jose/</code> to <code>my_index/Valim/Jose0</code> (<code>0</code> comes after <code>/</code> in ascii).</p>
<p>That would return keys for all "Jose Valim"s for which you could then extract the <code>id</code>s.</p>
<p>Likewise, if you want to look up all <code>Valim</code>s, you could prefix scan for <code>my_index/Valim/</code>. And so on.</p>
<p>What I was saying there, essentially, is that it’s desirable for tuples to sort based on the ordering of their elements rather than their <em>length</em>. That is, <code>{"ZZZ"}</code> should sort <em>after</em> <code>{"Valim", "Jose"}</code>. In Erlang term order it would sort before, which would break the last name prefix scan. You <em>could</em> be careful to always scan for <code>{"ZZZ", ""}</code> and in certain cases that would work, but it makes things more annoying.</p>
<p>I mentioned Erlang lists because I <em>think</em> they might sort this way (I only just realized this), but either way tuples definitely sort based on length first which is incorrect.</p>
<p>Edit: After testing, lists do indeed sort correctly (unlike tuples), which is nice. That means if you disallowed tuples you could get useful behavior from the term order. Erlang also orders integers/floats weirdly, but with a schema that might not matter.</p>
<p>You do still have to actually encode them to binary in such a way that they sort in term order, though, which <code>term_to_binary</code> <em>does not</em> (your original question).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="371943" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/bedrock-a-scaleable-distributed-key-value-database-with-better-than-acid-guarantees/72038/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-371943" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="371943"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #22"></div>
  </section>
</div>
    <div class="postbit" id="372002" data-post-id="372002">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jallum" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jallum/120/38850_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jallum
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Asd" data-post="19" data-topic="72038" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/c68b51/48.png" class="avatar"> Asd:</div>
<blockquote>
<p>Hi again, here are some more questions</p>
</blockquote>
</aside>
<p><em>Always welcome!</em></p>
<aside class="quote no-group" data-username="Asd" data-post="19" data-topic="72038" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/c68b51/48.png" class="avatar"> Asd:</div>
<blockquote>
<ol>
<li>It looks like you encode transactions into binary format, then you pass them to commit proxy, which batches them and then it decodes them back it in the Finalization and streams the mutations. Why? It just looks like unnecessary encoding/decoding step. There is also transaction encoding after sharding for logs and then transaction decoding in log.</li>
</ol>
</blockquote>
</aside>
<p>As you point out, the transactions are encoded at the client in three basic sections: mutations that change the system, read conflict information and write conflict information. Not all of these sections are useful to all parts of the system. This is done at the client so that we can enforce the transaction size limitations as well as offer a potential entry point to <em>other kinds of clients</em> submitting transactions to the system.</p>
<p>An important thing to note, is that resolution and logging can be sharded. For resolution, there will be one resolver covering sections of the keyspace. In this situation, the transaction’s read and write conflicts must be divided into the respective shards to be sent. As a default, I have temporarily split the system and user keyspaces into two shards in order to be able to test the mechanics of this splitting mechanism – sort of a worst case. In the near future, for most setups, a single resolver will be used for the entire keyspace, and this splitting can be optimized away in that case.</p>
<p>The same is true of the logging system, though sharding is more likely here. Each storage team, responsible for a range of keys has a tag. Logs are assigned one or more tags. FoundationDB examines each mutation for the shard that it touches, assigns it one or more tags. (A clear-range mutation could easily cover multiple tags, etc.) For each log that’s tag set intersects with that mutation’s tags, that mutation is queued. Each log receives a transaction, whether or not any mutations end up affecting it. This is done for synchronization.</p>
<p>As you point out, there is a bit of unnecessary work that’s going on here. My general approach is to work out the correctness of a thing, lock down the tests, and then use the tests and the correct (but perhaps slower) version of a thing to test the improved/optimized version of a thing.</p>
<aside class="quote no-group" data-username="Asd" data-post="19" data-topic="72038" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/c68b51/48.png" class="avatar"> Asd:</div>
<blockquote>
<ol start="3">
<li>I can see that you implemented custom encoding for keys and I thought that I will see the reasoning behind this somewhere in the code, but I didn’t and it looks like <code>term_to_binary</code> would do just fine. Am I missing something?</li>
</ol>
</blockquote>
</aside>
<p>Yep. term_to_binary, while wonderful in many ways, does not guarantee that the resulting binaries will be lexicographically ordered in the same way as the original value. for <em>keys</em> this is very important, for values not so much. There are several places where encoding is done, and in each it’s for a different reason. term_to_binary is not always going to be appropriate for all of the needs.</p>
<aside class="quote no-group" data-username="Asd" data-post="19" data-topic="72038" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/c68b51/48.png" class="avatar"> Asd:</div>
<blockquote>
<ol start="4">
<li>It looks like documentation in the code is inconsistent, because some very simple functions are extensively documented (for example, <code>mutation_to_key_or_range</code>) and others have no doc at all and use single letter variables (for example, <code>Tx</code> module and it’s children modules). What’s the reasoning behind it?</li>
</ol>
</blockquote>
</aside>
<p>Yep. You quite correctly point out that it’s not a polished / finished product. The team is very small, and we’re doing our best.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="372002" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/bedrock-a-scaleable-distributed-key-value-database-with-better-than-acid-guarantees/72038/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-372002" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="372002"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #23"></div>
  </section>
</div>
    <div class="postbit" id="372005" data-post-id="372005">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jallum" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jallum/120/38850_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jallum
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="garrison" data-post="22" data-topic="72038" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/3bc359/48.png" class="avatar"> garrison:</div>
<blockquote>
<p>Yes, <code>dets</code> is not appropriate as a storage engine here because it is unordered. It cannot serve range scans (regardless of how you encode the keys). I assume, as you say, that it’s temporary. I actually wrote a longer reply about why <code>dets</code> cannot be used for this case not long ago on another thread.</p>
</blockquote>
</aside>
<p>Unordered on-disk storage is <em>fine</em>, as long as you have an indexing mechanism above it where order can be established. This is how mnesia uses :dets under the hood – it uses ordered :ets tables to index over it. I’m using :dets in the example storage driver because it’s built into the BEAM, it’s reliable if used correctly and in the case of a severe failure, the data is easily recoverable as key/values using minimal tooling.</p>
<p>The ultimate goal is to have a proper shard-management layer (DataDistributor, fdb calls it) that would split/merge shards such that none of them get near the limitations of :dets.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="372005" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/bedrock-a-scaleable-distributed-key-value-database-with-better-than-acid-guarantees/72038/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-372005" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="372005"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #24"></div>
  </section>
</div>
    <div class="postbit" id="372007" data-post-id="372007">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Asd" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Asd
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="jallum" data-post="24" data-topic="72038">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jallum/48/38850_2.png" class="avatar"> jallum:</div>
<blockquote>
<p>for <em>keys</em> this is very important, for values not</p>
</blockquote>
</aside>
<p>I don’t understand why it is. I mean, data storage layer can just index things. You can compare keys as keys when doing log routing too.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="372007" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/bedrock-a-scaleable-distributed-key-value-database-with-better-than-acid-guarantees/72038/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-372007" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="372007"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #25"></div>
  </section>
</div>
    <div class="postbit" id="372008" data-post-id="372008">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="garrison" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  garrison
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>For the record, if you’re arguing in favor of exposing a tuple/record API instead of a binary key/value API I don’t really disagree with you.</p>
<p>But under the hood if you want to re-use an existing storage engine (LMDB, RocksDB, WiredTiger, etc) they pretty much all expose a binary/binary lexicographically-ordered API so that’s what you’re going to be dealing with.</p>
<p>I think some of these embedded DBs allow you to pass a custom comparator but then you would have to hand-write a “term order” comparator and pass it down. And would that really be faster? I doubt it.</p>
<p>At least internally I think byte-order is a pretty good abstraction. It’s universally understood.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="372008" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/bedrock-a-scaleable-distributed-key-value-database-with-better-than-acid-guarantees/72038/27">Post #26</a>
	                </div>
	            </div>
              <div id="likers-container-372008" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="372008"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #26"></div>
  </section>
</div>
    <div class="postbit" id="372010" data-post-id="372010">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="garrison" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  garrison
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="jallum" data-post="25" data-topic="72038">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jallum/48/38850_2.png" class="avatar"> jallum:</div>
<blockquote>
<p>Unordered on-disk storage is <em>fine</em>, as long as you have an indexing mechanism above it where order can be established.</p>
</blockquote>
</aside>
<p>This will cause a lot of read amp for range scans.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="372010" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/bedrock-a-scaleable-distributed-key-value-database-with-better-than-acid-guarantees/72038/28">Post #27</a>
	                </div>
	            </div>
              <div id="likers-container-372010" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="372010"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #27"></div>
  </section>
</div>
    <div class="postbit" id="372015" data-post-id="372015">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jallum" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jallum/120/38850_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jallum
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Nothing is free. LSMs don’t do range scans cheaply, either. Btrees do range scans well, but cost you on writes. Every way you go, there are gonna be trade-offs – and I’m not going to get too hung up on it. As long as the storage servers are easy to swap out, then a user can choose the one (or combination) that makes the most sense for their workload.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="372015" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/bedrock-a-scaleable-distributed-key-value-database-with-better-than-acid-guarantees/72038/29">Post #28</a>
	                </div>
	            </div>
              <div id="likers-container-372015" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="372015"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #28"></div>
  </section>
</div>
    <div class="postbit" id="372588" data-post-id="372588">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jallum" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jallum/120/38850_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jallum
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Asd" data-post="19" data-topic="72038">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/a/c68b51/48.png" class="avatar"> Asd:</div>
<blockquote>
<p>But these are not macros which generate <code>defp</code> definitions, these are imports and imports are just a syntax sugar for <code>Module.function</code> and these are always compiled into so-called remote calls which do not inline and introduce overhead (though very very little overhead).</p>
</blockquote>
</aside>
<p>You’re right! I did this on another project, and forgot to carry that over to here. I’ll fix that!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="372588" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/bedrock-a-scaleable-distributed-key-value-database-with-better-than-acid-guarantees/72038/30">Post #29</a>
	                </div>
	            </div>
              <div id="likers-container-372588" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="372588"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #29"></div>
  </section>
</div>
    <div class="postbit" id="372987" data-post-id="372987">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jallum" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jallum/120/38850_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jallum
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<h1><a name="p-372987-bedrock-020-1" class="anchor" href="#p-372987-bedrock-020-1" aria-label="Heading link" rel="nofollow"></a>Bedrock 0.2.0</h1>
<p><strong>Major Features</strong>:</p>
<ul>
<li>KeySelector API: Added comprehensive key selector support across storage, gateway, and repo layers with range query capabilities</li>
<li>New Olivine Storage Engine: New B+ tree(ish) storage implementation with advanced indexing and persistence</li>
<li>Range Reads: Full range-read support with key selectors, conflict detection and read-your-writes within transactions</li>
<li>Enhanced Transaction Processing: Refactored commit proxy finalization with synchronous sequencer notification and exactly-once reply guarantees</li>
</ul>
<p><strong>Architecture Improvements</strong>:</p>
<ul>
<li>Reworked transaction tree balancing and processing</li>
<li>Improved resolver capabilities with enhanced telemetry and tracing</li>
<li>Director recovery system with capability-based retry mechanisms</li>
<li>Shale log consistency fixes and transaction stream enhancements</li>
</ul>
<p><strong>Developer Experience</strong>:</p>
<ul>
<li>Updated documentation with transaction format guides and architecture deep-dives</li>
<li>Subspaces and fast tuple packing/unpacking</li>
<li>Enhanced example bank livebook with range query demonstrations</li>
<li>Comprehensive test coverage for new features</li>
</ul>
<p>This release represents a significant evolution of Bedrock’s transactional capabilities with improved performance, reliability, and developer ergonomics.</p>
<p><a href="https://livebook.dev/run?url=https%3A%2F%2Fraw.githubusercontent.com%2Fjallum%2Fbedrock%2Frefs%2Fheads%2Fdevelop%2Flivebooks%2Fexample_bank.livemd" rel="noopener nofollow ugc"><img src="https://livebook.dev/badge/v1/blue.svg" alt="Run in Livebook" width="170" height="40"></a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="372987" data-batch-url="/posts/batch_likers">
                        5
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/bedrock-a-scaleable-distributed-key-value-database-with-better-than-acid-guarantees/72038/31">Post #30</a>
	                </div>
	            </div>
              <div id="likers-container-372987" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="372987"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #30"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/72038/load_more?page=4">Load more posts (37 remaining)</a>
</div></template></turbo-stream>