<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="370838" data-post-id="370838">
  <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
                    <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="AstonJ" data-post="19" data-topic="71944">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/astonj/48/15_2.png" class="avatar"> AstonJ:</div>
<blockquote>
<p>Most importantly, stability/reliability and performance/speed</p>
</blockquote>
</aside>
<p>Stability and reliability (and correctness) are a given, totally agree there.</p>
<p>Performance is tricky because at the end of the day Elixir is slow. Competitive performance would definitely require some NIF abuse.</p>
<p>What level of performance would you deem necessary? Transactions/s (say 90/10 r/w split), read latency, and commit latency are good metrics.</p>
<aside class="quote no-group" data-username="AstonJ" data-post="19" data-topic="71944">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/astonj/48/15_2.png" class="avatar"> AstonJ:</div>
<blockquote>
<p>I think irrespective of which language a new DB was built on there really would need to be a compelling case to get people to switch from something like Postgres - what usp could an Elixir DB have</p>
</blockquote>
</aside>
<p>Well, for us, the convenience of Elixir integration. You could similarly ask what advantage Cachex has over Redis, and for me the answer is simply “I don’t have to deal with Redis” <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<p>But to echo what I said before, programming languages are turing complete. There is nothing that Elixir can do that is <em>impossible</em> with another language, so I don’t see the value in answering that question. Now from the perspective of the <em>implementor</em>, OTP and the BEAM give us a <em>lot</em> out of the box that many databases have to build from scratch, which can make things easier.</p>
<p>As for Postgres, well, it checks off almost none of the criteria I proposed. No native HA/replication (there is replication but not like what I mean), no scale-out, atrocious consistency model out of the box (though at least Postgres <em>has</em> serializable, except nobody uses it).</p>
<p>I have a lot of other problems with Postgres (and RDBMS in general) but if I get into it this thread will 100% get derailed and I’m trying to keep it focused on new ideas <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="370838" data-batch-url="/posts/batch_likers">
                        3
                      </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/what-would-you-like-to-see-from-a-native-elixir-database/71944/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-370838" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="370838"
                     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="370847" data-post-id="370847">
  <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
                    <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="byu" data-post="21" data-topic="71944">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/byu/48/32032_2.png" class="avatar"> byu:</div>
<blockquote>
<p>First, I preface this as I’m reading this thread as an intellectual exercise… I don’t give good odds that this may turn into a practical project since postgres (and other open source DBs) have so much momentum and world-wide support</p>
</blockquote>
</aside>
<p>It was intended as an exercise, or at least a chance to do some idea farming!</p>
<p>With that said, I disagree. I think a lot of people are desperate to move past Postgres and its very (<em>very</em>) old architecture and associated limitations. Many were excited for Cockroach (like Postgres but distributed) until it was rugpulled. Likewise many were excited for Firebase (totally rethinking the database) until it was acquired and essentially killed. There are many such stories. The lesson being: Postgres survives not because it is <em>good</em> but because it is <em>free</em> (freedom).</p>
<p>(I mean, honestly, MongoDB was a raging dumpster fire that incinerated your data <em>and</em> had an atrocious hierarchical data model and it <em>still</em> achieved wide adoption.)</p>
<p>Now for me <em>personally</em>, I could not care less about momentum or adoption. <em>I</em> want something for <em>me</em>, so I’d be happy regardless! Still, I think there could be value. People are kinda starved for databases tbh.</p>
<aside class="quote no-group" data-username="krisleech" data-post="20" data-topic="71944">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/krisleech/48/35182_2.png" class="avatar"> krisleech:</div>
<blockquote>
<p>The ability to “rewind” and see the state in the past.</p>
</blockquote>
</aside>
<p>Time travel is a fun one. You can implement time travel just using long-lived MVCC, and indeed this is necessary for long-lived read transactions anyway. But many databases have supported this (Postgres used to) and it never seemed to gain any serious adoption.</p>
<p>Datomic has a fascinating data model which I don’t know enough about to comment, but I’m glad it was brought up. I’ll throw it on the study pile and come back to it later. Would love to hear from anyone who has actually used it.</p>
<p>I know there is <a href="https://www.instantdb.com/essays/datalogjs" rel="noopener nofollow ugc">one company</a> which is trying “firebase but it’s datomic’s model underneath” which is certainly an interesting bet.</p>
<p>There is also <a href="https://www.dolthub.com/" rel="noopener nofollow ugc">Dolt</a> which is an RDBMS but underneath the entire thing is built on unicit btree variants (Prolly trees), which allows them not only to fork but to <em>merge</em> branches. They seem to have a very hard time explaining why this is actually useful, but at the same time they seem to have found many cases where it <em>is actually very useful</em>, and they’re just hard to explain.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="370847" 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/what-would-you-like-to-see-from-a-native-elixir-database/71944/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-370847" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="370847"
                     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="370853" data-post-id="370853">
  <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
                    <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="byu" data-post="21" data-topic="71944">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/byu/48/32032_2.png" class="avatar"> byu:</div>
<blockquote>
<p>Lightweight (sqlite-like) native in BEAM? Or like a serious scaling RDBMS along the lines of FoundationDB?</p>
</blockquote>
</aside>
<p>These are not mutually exclusive, and I would argue there is <em>enormous</em> benefit to being <em>both</em>. On the one hand, you could have a database which boots a new cluster in-memory for every unit test, and on the other hand you could have a database that scales out to 100 nodes. And they could be the <em>same database</em>, with the exact same API <em>and implementation</em>.</p>
<p>What’s cool is only on the BEAM does this proposition even make sense. Like I said, anywhere else “embedded+distributed” is an oxymoron.</p>
<aside class="quote no-group" data-username="byu" data-post="21" data-topic="71944">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/byu/48/32032_2.png" class="avatar"> byu:</div>
<blockquote>
<p>personally would not want to have an app deployment (e.g. fly blue-green deployments) to elevate the risk of database issue</p>
</blockquote>
</aside>
<p>I have thought about this a lot. For a serious deployment you would certainly want a separate cluster with a security boundary (some sort of binary protocol, or maybe just HTTP/WebSockets?). Not only for upgrades (which is a great point) but also because as we all know the BEAM has no security boundaries at all. If you want multitenancy you will eventually need access controls.</p>
<p>But continuing the theme here, why can we not have both? There are absolutely times where you <em>do</em> want to deploy an embedded DB, for lightweight apps when you’re just starting out and so on. If you have one node it doesn’t matter if the database goes down! Tons of people use SQLite for this reason.</p>
<p>And then if your app hits it big you can scale out without changing <em>anything</em> other than your deployment topology. Pretty killer for adoption I think.</p>
<aside class="quote no-group" data-username="byu" data-post="21" data-topic="71944">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/byu/48/32032_2.png" class="avatar"> byu:</div>
<blockquote>
<p>Didn’t Andy Pavlo-- gangster by thy name? – say something to the effect of how so many people tried to reinvent or create alt-languages, but everything eventually will consolidate back into SQL, which he implied, just skip the pain and work with SQL</p>
</blockquote>
</aside>
<p>Indeed, leading databaseologist Andy Pavlo has said this many times <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"> But what he means is not that SQL is <em>good</em> (Andy is after all a student of Stonebraker, who is, uh, not a fan), but that SQL is an inescapable industry standard and if you try to start a database company (particularly domain-specific) you will eventually be sherlocked by the RDBMS players that everyone is already using. In other words, the Vector DBs du jour are cooked. This is an entirely valid argument from a business perspective.</p>
<p>But, and I really cannot emphasize this enough, <a href="https://en.wikipedia.org/wiki/I_Love_It_(Icona_Pop_song)" rel="noopener nofollow ugc">I Don’t Care</a>.</p>
<p>Database startups are a joke anyway (see rugpulls).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="370853" 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/what-would-you-like-to-see-from-a-native-elixir-database/71944/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-370853" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="370853"
                     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="370854" data-post-id="370854">
  <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
                    <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>See also <a href="https://db.cs.cmu.edu/papers/2024/whatgoesaround-sigmodrec2024.pdf" rel="noopener nofollow ugc">this paper</a> from Andy+Stonebraker and <a href="https://people.cs.umass.edu/~yanlei/courses/CS691LL-f06/papers/SH05.pdf" rel="noopener nofollow ugc">the original</a>.</p>
<p>Both fantastic reads. But remember: just because something wins <em>does not mean it’s good</em>. I mean just look at JavaScript <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="370854" 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/what-would-you-like-to-see-from-a-native-elixir-database/71944/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-370854" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="370854"
                     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="370885" data-post-id="370885">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>After reading this thread and posts <a href="https://forum.elixirforum.com/t/what-are-the-remaining-gaps-in-the-elixir-ecosystem/69307/77" rel="nofollow">#77 - #87 about gaps in the elixir ecosystem</a>, (also <a href="https://forum.elixirforum.com/t/exesdb-a-beam-native-event-store/70200" rel="nofollow">ExESDB</a>), I’m convinced that creation of a new state-of-the-art BEAM-native database is worth considering.</p>
<p>Not only it makes perfect sense from technical standpoint, but also I would be confident of it succeeding under <a class="mention" href="/u/josevalim" rel="nofollow">@josevalim</a>’s leadership after him being open to challenging projects like <a href="https://hexdocs.pm/elixir/main/gradual-set-theoretic-types.html" rel="noopener nofollow ugc">Gradual set-theoretic types</a>, <a href="https://forum.elixirforum.com/t/tidewave-has-just-been-announced-by-jose-valim/70674" rel="nofollow">Tidewave</a>, <a href="https://github.com/elixir-nx" rel="noopener nofollow ugc">Numerical Elixir and Livebook</a>.</p>
<p>You’ve done plenty of initial exploration. If I can, I suggest that you now focus on creating a proof of concept (if possible) and crafting a great technical presentation (for an IRL event) which could be a starting point for evaluating undertaking the most ambitious elixir project yet.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="370885" 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/what-would-you-like-to-see-from-a-native-elixir-database/71944/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-370885" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="370885"
                     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="370930" data-post-id="370930">
  <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
                    <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="pawoc50825" data-post="26" data-topic="71944">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/p/e274bd/48.png" class="avatar"> pawoc50825:</div>
<blockquote>
<p>creation of a new state-of-the-art BEAM-native database</p>
</blockquote>
</aside>
<p>Nothing that has been discussed in this thread is state-of-the-art. The techniques needed to do these things (HA, scale-out, autoshard, strong consistency) have existed for about 20 years now and are widely deployed. The reason these things <em>seem</em> state-of-the-art to most developers is most developers are still using databases like Postgres which are, architecturally, 40-50 years old. Postgres in particular is literally over 40 years old!</p>
<p>Its storage engine is a bit newer, but still pre-dates the widespread availability of, ahem, <em>multi-core processors</em>. Which as you might imagine have had a rather strong influence on software architecture in the succeeding decades <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<aside class="quote no-group" data-username="pawoc50825" data-post="26" data-topic="71944">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/p/e274bd/48.png" class="avatar"> pawoc50825:</div>
<blockquote>
<p>but also I would be confident of it succeeding under <a class="mention" href="/u/josevalim" rel="nofollow">@josevalim</a>’s leadership</p>
</blockquote>
</aside>
<p>Lol I am definitely not trying to create more work for poor Jose.</p>
<p>I started this thread to collect my thoughts in one place and see if anyone else had any to share (and several have so far, thanks guys!). But it is no secret I have also been working on a database and I have indeed been sticking to the principles I laid out here. I would say I surpassed proof-of-concept several months ago.</p>
<p>I wouldn’t say “most ambitious”, though. Like I said, this is all old tech!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="370930" data-batch-url="/posts/batch_likers">
                        3
                      </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/what-would-you-like-to-see-from-a-native-elixir-database/71944/27">Post #26</a>
	                </div>
	            </div>
              <div id="likers-container-370930" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="370930"
                     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="371045" data-post-id="371045">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Strong opinions, humbly held:</p>
<p>I take it as a given that BEAM is a great fit for a distributed database.<br>
However, development model is as much, if not more, important.</p>
<p>I see this as all or nothing situation.</p>
<p>I envision this being not just a library but a crown jewel of elixir ecosystem. José providing leadership, <a href="https://erlef.org/" rel="noopener nofollow ugc">erlef.org</a> helping securing sponsors, Fly io donating engineering hours (they’re into local+distributed - <a href="https://fly.io/docs/litefs/" class="inline-onebox" rel="noopener nofollow ugc">LiteFS - Distributed SQLite · Fly Docs</a>), etc.</p>
<p>I see the future where ElixirDB is known as the hottest distributed database that you can use standalone or like <a href="https://spacetimedb.com/" rel="noopener nofollow ugc">SpacetimeDB</a>:</p>
<blockquote>
<p>a database system that allows developers to build the entire application, including game logic and real-time state management, directly within the database itself</p>
</blockquote>
<p>People joining the ecosystem at first for the db and gradually getting drawn into elixir programming.</p>
<p>First class database management/exploration panel in liveview for data scientists.</p>
<p>This is what I meant by ambitious.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="371045" 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/what-would-you-like-to-see-from-a-native-elixir-database/71944/28">Post #27</a>
	                </div>
	            </div>
              <div id="likers-container-371045" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="371045"
                     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="371049" data-post-id="371049">
  <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
                    <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="pawoc50825" data-post="28" data-topic="71944">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/p/e274bd/48.png" class="avatar"> pawoc50825:</div>
<blockquote>
<p>However, development model is as much, if not more, important.</p>
<p>I see this as all or nothing situation.</p>
</blockquote>
</aside>
<p>Can you explain what you mean by this?</p>
<aside class="quote no-group" data-username="pawoc50825" data-post="28" data-topic="71944">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/p/e274bd/48.png" class="avatar"> pawoc50825:</div>
<blockquote>
<p>This is what I meant by ambitious.</p>
</blockquote>
</aside>
<p>I think it’s important to keep the scope in check here <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"> Ecosystems are built on abstractions, each layered over the last. If you tried to force coordination on all of the things you list here I think what you would end up with is, probably, nothing. These things evolve and grow <em>naturally</em>, and if you’re trying to plant a seed you have to remember that you’re starting from the bottom, not the top.</p>
<p>Which reminds me, there was something mentioned earlier in this thread that I wanted to highlight and never did.</p>
<aside class="quote no-group" data-username="jstimps" data-post="10" data-topic="71944">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jstimps/48/41062_2.png" class="avatar"> jstimps:</div>
<blockquote>
<p>The FDB team never got the chance to implement all the Data Layers on top of their storage engine because of the acquisition. It would be exciting to have an ecosystem where those ideas could carry on.</p>
</blockquote>
</aside>
<p>This exact realization is one which I had many months ago. See, the founders of FDB were <em>obsessed</em> with the concept of layers. Whenever I see any of the FDB guys talking about the database, even relatively recently, they always mention layers. It was a really good idea that never panned out.</p>
<p>The proposition is simple: provide a low-level distributed database “tool” and let people construct higher-level databases out of it. They solve the hard distributed problems, you solve the domain-specific problems. And eventually you have a sort of “hyper-database” which contains every other type of database within it (this is often referred to as a “multi-model” database) with atomic transactions across everything.</p>
<p>But it didn’t work out. Why? Well for one, FDB was a proprietary database. Who would waste their time building a database on top of something they don’t even own? I mean, Snowflake apparently, but they had the source in escrow. There was no opportunity for a community to build up around FDB because it was behind a paywall.</p>
<p>And then it was eventually acquired and (mercifully) open-sourced, but it was open source in name only. The documentation is poor and even now everything is quite arcane. There was again no real chance for a community to form. To this day they regularly dump enormous patches without so much as a paragraph in the PR explaining what they do (let alone actually <em>documenting</em> anything). And as a result, layers never “happened”, other than their own Record Layer.</p>
<p>The idea, though, is rock solid. With a good community (like this one!) maybe it could actually work out. Of course, somebody would have to plant that seed <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="371049" 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/what-would-you-like-to-see-from-a-native-elixir-database/71944/29">Post #28</a>
	                </div>
	            </div>
              <div id="likers-container-371049" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="371049"
                     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="371077" data-post-id="371077">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/garrison" rel="nofollow">@garrison</a> : After reading more of the thread, I agree that a native Elixir/Erlang/BEAM RDBMS could be a boon to the community (and open source in general), which would bolster the “Persistable Data” point in (<a href="https://www.youtube.com/watch?v=JvBT4XBdoUE#t=36m39s" rel="noopener nofollow ugc">Sasa Juric’s Server A vs Server B</a>.</p>
<p>It could be a interesting value proposition (capability) to be able to:</p>
<ol>
<li>Deploy a new app that is all Elixir/Erlang/BEAM without the need for any external dependency (ala postgres).</li>
<li>Then be able to just spin up new nodes (cluster) as data/traffic grows – app and data still colocated</li>
<li>And if things get really serious, then there is some sort of “Cell Division” process to separate into different clusters (e.g. separate database from web-serving) – whatever data/domain topology makes sense for the project – and do it smoothly.</li>
</ol>
<p>Yes, I think we all agree that BEAM ecosystem has qualities that no-others have to even be able to support the above.</p>
<p>Side Note: Just mentioning <a href="https://www.youtube.com/watch?v=hdBm4K-vvt0" rel="noopener nofollow ugc">Bryan Hunter + Waterpark</a> as the project recently popped up again in my feeds, and it seems at least tangentially related to this thread.</p>
<aside class="quote no-group" data-username="garrison" data-post="24" data-topic="71944">
<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>SQL is an inescapable industry standard</p>
</blockquote>
</aside>
<p>If DB is relational and I can use Ecto in the app, then I’m not <em>as concerned</em> about the flavor of human-usable query language (or dialect) is used to introspect the DB.</p>
<p>I would still want some sort of story about how devs/ops/dba can safely access the DB like I might do using pgAdmin (read-only) for ad-hoc queries to help debug/solve problems that may arise, or query the data for exploratory reporting-like queries. Whatever that may be. Ecto + LiveView?  <code>iex</code> remote connection? Custom language?</p>
<aside class="quote no-group" data-username="garrison" data-post="29" data-topic="71944">
<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>I think it’s important to keep the scope in check here <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"> Ecosystems are built on abstractions, each layered over the last</p>
</blockquote>
</aside>
<p>So is the idea to take FoundationDB DNA-- ala, logical-key-ordering, key-range partitioned and replicated (LSM Tree powered?) with dynamic range splitting and migrations–, clean/tidy design details for BEAM, and use it as the “direct storage engine” lowest level lego blocks, then to build relational on top of that?</p>
<p>So is the imagination that there would be two deliverables: (1) a distributed and embeddable BEAM-native K/V (not OpenRiak), that has modern improvements to better support the (2) RDBMS for our community?</p>
<p>And that to get adoption, in addition to Ecto integration, Oban support would be required by the large populace of phoenix projects.</p>
<p>The intangibles goals/constraints being:</p>
<ul>
<li>Improving the Elixir/Erlang/BEAM ecosystem.</li>
<li>The go-to data storage for new-apps in our community, not necessarily trying to usurp postgres yet.</li>
<li>Added benefit for freedom and protection against the DB company “rug pull” inevitability?</li>
<li>Open the door for new tech to be built on top of this-- Maybe a BEAM Large Object Storage?</li>
</ul>
<p>Could an initial approach be to (top-down) implement an RDBMS feasibility toy-prototype using FoundationDB as the underlying abstraction to validate the idea, then work to rebuild the abstraction (bottom up) replace FDB?</p>
<p>I say this is all “Cool Beans”, and I hope the seed gets planted.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="371077" 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/what-would-you-like-to-see-from-a-native-elixir-database/71944/30">Post #29</a>
	                </div>
	            </div>
              <div id="likers-container-371077" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="371077"
                     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="371083" data-post-id="371083">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="byu" data-post="30" data-topic="71944">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/byu/48/32032_2.png" class="avatar"> byu:</div>
<blockquote>
<p>Could an initial approach be to (top-down) implement an RDBMS feasibility toy-prototype using FoundationDB as the underlying abstraction to validate the idea</p>
</blockquote>
</aside>
<p>I humbly submit the repos of <a href="https://github.com/orgs/foundationdb-beam/repositories" rel="noopener nofollow ugc">foundationdb-beam</a> to fit this need. Although I believe it’s more than a prototype and can support real applications even today.</p>
<p>The Ecto layer is called <a href="https://github.com/foundationdb-beam/ecto_foundationdb" rel="noopener nofollow ugc">ecto_foundationdb</a>. This implements <em>some</em> relational ideas on top of the KV. Not intending to go full RDBMS, though. We have indexes, migrations, large objects support, live queries (kinda sorta).</p>
<aside class="quote no-group" data-username="byu" data-post="30" data-topic="71944">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/byu/48/32032_2.png" class="avatar"> byu:</div>
<blockquote>
<p>Then be able to just spin up new nodes (cluster) as data/traffic grows – app and data still colocated</p>
</blockquote>
</aside>
<p>This is the intention of <a href="https://github.com/foundationdb-beam/ex_fdbmonitor" rel="noopener nofollow ugc">ex_fdbmonitor</a>: to use the BEAM dist to facilitate database clustering with minimal manual input.</p>
<aside class="quote no-group" data-username="byu" data-post="30" data-topic="71944">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/byu/48/32032_2.png" class="avatar"> byu:</div>
<blockquote>
<p>some sort of story about how devs/ops/dba can safely access the DB like I might do using pgAdmin (read-only) for ad-hoc queries to help debug/solve problems that may arise, or query the data for exploratory reporting-like queries</p>
</blockquote>
</aside>
<p><a href="https://github.com/foundationdb-beam/efsql" rel="noopener nofollow ugc">efsql</a> is meant to cover this, using <a class="mention" href="/u/schultzer" rel="nofollow">@Schultzer</a> 's <a href="https://github.com/elixir-dbvisor/sql" rel="noopener nofollow ugc">SQL</a>. efsql is very much a WIP.</p>
<p>Finally, it’s on top of a solid client library <a href="https://github.com/foundationdb-beam/erlfdb" rel="noopener nofollow ugc">erlfdb</a> which started as a fork from the Apache CouchDB project of the same name, so it has had more time to mature.</p>
<hr>
<p>Weaknesses of this approach that stand to be solved by a new DB project as <a class="mention" href="/u/garrison" rel="nofollow">@garrison</a> is discussing:</p>
<ol>
<li>Not embedded</li>
<li>Non optimal value encoding</li>
<li>Difficult or impossible to use in escript (due to client NIF)</li>
</ol> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="371083" data-batch-url="/posts/batch_likers">
                        4
                      </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/what-would-you-like-to-see-from-a-native-elixir-database/71944/31">Post #30</a>
	                </div>
	            </div>
              <div id="likers-container-371083" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="371083"
                     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/71944/load_more?page=4">Load more posts (18 remaining)</a>
</div></template></turbo-stream>