<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="374578" data-post-id="374578">
  <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>The <a href="https://www.rfc-editor.org/rfc/rfc9562.html#name-uuid-version-7" rel="noopener nofollow ugc">UUIDv7 spec</a> actually allows you to use the 12 <code>rand_a</code> bits as a sub-millisecond timestamp, or alternatively I think you’re allowed to use up to all 74 random bits as a monotonic counter if you really want to.</p>
<p>So if you want to you can absolutely order them while still following the standard.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="374578" 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/once-ecto-type-for-globally-unique-64-bits-ids-generated-by-multiple-elixir-nodes/68571/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-374578" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="374578"
                     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 #11"></div>
  </section>
</div>
    <div class="postbit" id="374579" data-post-id="374579">
  <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>BTW the bit about LSMs in this comment is actually wrong as I eventually found out.</p>
<p>LSMs can benfit from k-sortable ids in a number of ways. For one, when keys are inserted in strict monotonic order there is <a href="https://github.com/facebook/rocksdb/wiki/Compaction-Trivial-Move" rel="noopener nofollow ugc">an optimization</a> which allows the engine to avoid rewriting the SST. This is similar to the optimization you would use when building a Btree from perfectly sorted data.</p>
<p>Also I think inserts in “mostly”-sorted order would still reduce write amp in leveled LSMs.</p>
<p>The point being: there is more nuance to this than you might think, and I clearly did not deeply understand LSMs when I wrote that reply lol. The btree stuff is correct, though, and it is true that LSMs are “less” affected by random keys.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="374579" 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/once-ecto-type-for-globally-unique-64-bits-ids-generated-by-multiple-elixir-nodes/68571/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-374579" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="374579"
                     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 #12"></div>
  </section>
</div>
    <div class="postbit" id="374584" data-post-id="374584">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sbuttgereit" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sbuttgereit/120/30162_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sbuttgereit
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>This is a reasonable callout.</p>
<p>In the systems I work with, I try to keep “record identity” and things like business logic relevant dates/times, or sequencing generally, conceptually and structurally separate… even when there’s a high expectation that timing in record creation could also be used to establish business timings or that a business timing could be used as a record ID date component.   Yes, I spend extra bytes per record and related processing when I do this, but I find that keeping these distinct concepts separate I have many fewer questions after the fact about things like business relevant/sequencing and the like.</p>
<p>While building business-meaningful sequencing into your record IDs is something you can get away with for a long time (maybe forever even) I’m a veteran of enough corporate merger related data migrations to know some of the tricks we play with surrogate key IDs just to get data sets merged without collisions… and it ain’t always pretty.  Yes, UUID should avoid that sort of problem… but you never know what you’ll run into.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="374584" 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/once-ecto-type-for-globally-unique-64-bits-ids-generated-by-multiple-elixir-nodes/68571/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-374584" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="374584"
                     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 #13"></div>
  </section>
</div>
    <div class="postbit" id="380934" data-post-id="380934">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jsm" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jsm
                    <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>Rounding off a late-year cycle of releases that started with <a href="https://forum.elixirforum.com/t/speckex-speck-block-cipher-for-elixir-using-precompiled-rust-nif/73752/1" rel="nofollow">SpeckEx</a> and <a href="https://forum.elixirforum.com/t/nononcense-generate-globally-unique-nonces-in-distributed-elixir/68551/4" rel="nofollow">NoNoncense 1.0</a>, Once 1.0 is out! It adds the following:</p>
<ul>
<li>Support for Stripe-like <strong>prefixed IDs</strong> using <a href="https://hexdocs.pm/once/Once.Prefixed.html" rel="noopener nofollow ugc">Once.Prefixed</a>. The prefix is optionally persisted to the database.</li>
<li>Support for <strong>hex32-encoding</strong> of IDs using the new format <a href="https://hexdocs.pm/once/Once.html#t:format/0" rel="noopener nofollow ugc">:hex32</a>.</li>
<li>Upgraded to NoNoncense 1.0 with its <strong>improved performance and cipher support for encrypted IDs</strong>. These changes are breaking and require careful reading of the <a href="https://github.com/juulSme/Once/blob/main/MIGRATION.md" rel="noopener nofollow ugc">migration guide</a>.</li>
</ul> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="380934" 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/once-ecto-type-for-globally-unique-64-bits-ids-generated-by-multiple-elixir-nodes/68571/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-380934" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="380934"
                     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 #14"></div>
  </section>
</div>
    <div class="postbit" id="381624" data-post-id="381624">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jsm" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jsm
                    <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><strong>1.1.0 is out and full of new IDeas!</strong></p>
<p>The highlight is <a href="https://hexdocs.pm/once/Once.html#module-masked-ids" rel="noopener nofollow ugc">Masked IDs</a>, which provide a middle ground between plaintext and encrypted IDs. IDs are stored as plaintext in the database but encrypted when retrieved by the Ecto type. These can be combined with other functionality like <a href="https://hexdocs.pm/once/Once.html#module-prefixed-ids" rel="noopener nofollow ugc">prefixes</a> and <a href="https://hexdocs.pm/once/Once.html#module-id-generation-types" rel="noopener nofollow ugc">time-sortability</a>, and can be stored/rendered in all supported <a href="https://hexdocs.pm/once/Once.html#module-data-formats" rel="noopener nofollow ugc">formats</a> (signed, unsigned, hex, hex32, url64 and raw).</p>
<p><strong>Benefits</strong>: Masked IDs have the database performance of plaintext IDs (written sequentially to the right of the index), but the application sees encrypted values so they are unpredictable and can’t be enumerated. <code>ORDER BY id</code> and keyset pagination work transparently (cast decrypts input). <strong>No database migration is needed</strong> for existing IDs.</p>
<p><strong>Trade-offs</strong>: Database and application IDs look completely different (operational friction with SQL/BI tools), slight <a href="https://github.com/juulSme/NoNoncense?tab=readme-ov-file#benchmarks" rel="noopener nofollow ugc">performance cost</a> for encryption/decryption on every read/write, ordering info can leak into the application when using <code>ORDER BY id</code> queries.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="381624" 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/once-ecto-type-for-globally-unique-64-bits-ids-generated-by-multiple-elixir-nodes/68571/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-381624" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="381624"
                     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 #15"></div>
  </section>
</div>
    <div class="postbit" id="392945" data-post-id="392945">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jsm" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jsm
                    <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>Once 2.0 is now available with support for NoNoncense 2.0.</p>
<p>NoNoncense 2.0 introduces supervised machine ID management for distributed nonce generation. It can coordinate IDs through PostgreSQL/MySQL, Redis/Valkey, Kubernetes StatefulSet ordinals, or fixed host identifiers, and stops generation if an acquired lease can no longer be proven safe.</p>
<p>This lets Once users adopt NoNoncense’s new machine ID strategies for reliable ID generation in dynamic deployments. See the <a href="https://no-noncense.hexdocs.pm/NoNoncense.MachineId.html" rel="noopener nofollow ugc">NoNoncense 2.0 documentation</a> and <a href="https://no-noncense.hexdocs.pm/migration.html" rel="noopener nofollow ugc">migration guide</a> for details on supervised coordination, and the <a href="https://once.hexdocs.pm" rel="noopener nofollow ugc">Once documentation</a> for the Ecto integration.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="392945" 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/once-ecto-type-for-globally-unique-64-bits-ids-generated-by-multiple-elixir-nodes/68571/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-392945" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="392945"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>