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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                    <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 group-Hex-Core-Team" data-username="wojtekmach" data-post="18" data-topic="23663">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/wojtekmach/48/999_2.png" class="avatar"> wojtekmach:</div>
<blockquote>
<p>Shameless plug: In <a href="https://github.com/elixir-ecto/myxql" rel="noopener nofollow ugc">MyXQL</a> even though the public API is so to speak stateful (by way of using db_connection), under the hood there’s a <a href="https://github.com/elixir-ecto/myxql/blob/master/lib/myxql/client.ex" rel="noopener nofollow ugc">separate module </a></p>
</blockquote>
</aside>
<p>That’s a pretty useful plug though! It’s kind of funny that after I reviewed the file I found myself agreeing with everything in it and I had like 95% the same ideas. I take it as a compliment. <img src="https://forum.elixirforum.com/uploads/default/original/2X/6/6c3193d1dd46244da3c8c6f719c9f5e2abdd5ae8.gif?v=15" title=":003:" class="emoji emoji-custom" alt=":003:" loading="lazy" width="20" height="20"> Thank you, this has been both enlightening and reassuring at the same time.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="134811" 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/advice-how-to-go-about-library-configuration-from-elixir-1-9-and-on/23663/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-134811" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="134811"
                     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="134813" data-post-id="134813">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                    <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 group-Rebar3 quote-modified" data-username="tristan" data-post="20" data-topic="23663">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/tristan/48/12307_2.png" class="avatar"> tristan:</div>
<blockquote>
<p>You are working with sqlite in this case so maybe similar to my <code>pgo</code> library, <a href="https://github.com/erleans/pgo#use" class="inline-onebox" rel="noopener nofollow ugc">GitHub - erleans/pgo: Erlang Postgres client and connection pool · GitHub</a> – configuration is specific to a pool, so they can be separated in the config file that way, allowing the option of starting them on boot or passing a config <code>pgo_pool:start_link</code> in a supervisor.</p>
</blockquote>
</aside>
<p>You are far ahead of me. Pooling I’ll delegate to <code>db_connection</code> – which I need to do when I get to the Ecto 3.1+ adapter anyway so, you know, double win. I’ll prefer configuration that’s local for each sqlite DB handle.</p>
<aside class="quote group-Rebar3" data-username="tristan" data-post="20" data-topic="23663">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/tristan/48/12307_2.png" class="avatar"> tristan:</div>
<blockquote>
<p>But I have yet to decide if this is good design in Erlang or Elixir, so interested in reading this thread. It feels like I shouldn’t provide different way to start services and should force the user to always start in their own supervisor…</p>
</blockquote>
</aside>
<p>Like <a class="mention" href="/u/lostkobrakai" rel="nofollow">@LostKobrakai</a> and <a class="mention" href="/u/wojtekmach" rel="nofollow">@wojtekmach</a>, I believe OTP wiring should not be mandatory unless it is absolutely technically unavoidable. To me it’s just a way to have the users of the library follow a 2-3 step tutorial on the library’s GitHub README page and have all their databases automatically managed by OTP while they only call an API that takes an atom name instead of an sqlite handle as a first argument. They can just as easily never register the <code>GenServer</code> wrapper I’ll provide in the library under their app’s <code>Supervisor</code> and use their own way to manage multiple sqlite handles, like a process dict, application configuration, ETS, or whatever else.</p>
<p>Speaking of that though, I figure (both by myself and reading yours and the other guys’ comments) that having a pure FP structure one can pass around should be the default and the bare minimum a library provides. Having any kind of OTP wiring should just be a convenience in terms of “how do I have something else manage all my NIF handles and I just call this API with names of the handles I choose and not care how it all happens under the hood”.</p>
<p>So if you don’t have a pure FP data structure that can be passed around then I’d say go for that and make processes optional.</p>
<aside class="quote group-Rebar3" data-username="tristan" data-post="20" data-topic="23663">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/tristan/48/12307_2.png" class="avatar"> tristan:</div>
<blockquote>
<p>As for the pdict, one reason to not use it is that it is confusing and harder to read code when state is hidden there. It is much easier to understand what is going on (and to test the code) when state is explicitly passed in and returned from functions.</p>
</blockquote>
</aside>
<p>Same as my reasoning. Coming from 15 years of imperative and OOP languages before Elixir, I am avoiding surprise mechanics like the plague. Thanks for validation! <img src="https://forum.elixirforum.com/uploads/default/original/2X/3/321dfb19bc2f1a46ac0b459b33e54785365a9ce1.gif?v=15" title=":041:" class="emoji emoji-custom" alt=":041:" 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="134813" 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/advice-how-to-go-about-library-configuration-from-elixir-1-9-and-on/23663/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-134813" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="134813"
                     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="134814" data-post-id="134814">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                    <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="LostKobrakai" data-post="21" data-topic="23663">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/lostkobrakai/48/3072_2.png" class="avatar"> LostKobrakai:</div>
<blockquote>
<p>I’d at least expect that users might already have some infrastructure in their applications to handle the many databases in their business context. Mustn’t be, but it’s nice to plug things into the places they belong instead of having similar setups in many places. For the rest you could still provide some genservers if you really want.</p>
</blockquote>
</aside>
<p>Not sure mine and your point of view contradict each other. To me making a thin <code>GenServer</code> wrapper that the user of the library can plug into their app’s <code>Supervisor</code> is <em>exactly</em> to “plug things into the places they belong” (with the caveat that the user does not want to <em>only</em> pass a self-contained state structure around; if they are not satisfied by that then IMO a thin OTP wiring is quite a good way to go beyond the pure FP approach).</p>
<p>Unless I am reading you wrong?</p>
<hr>
<p>I realise that my library, when ready, can be criticised that it comprises of 3 parts in one instead of having 1 base library and 2 plugins for it (baseline: sqlite client, plugins: OTP wiring and Ecto 3.1+ adapter) but it’s my personal programmer philosophy that having 30KB extra <code>.beam</code> files is worth the reduced complexity, as opposed to every user of the library having to manually wire the core library with its plugins – which might turn out to be an error-prone process and ruin the experience.</p>
<p>So I prefer to give you a library with some batteries included, provided the batteries are strictly opt-in and aren’t forcing you to deal with them even when you don’t need them.</p>
<p>If the batteries grow too big though then I’ll reconsider breaking the library down to smaller components. I believe it’s too early to over-optimise like this just yet though.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="134814" 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/advice-how-to-go-about-library-configuration-from-elixir-1-9-and-on/23663/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-134814" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="134814"
                     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="135404" data-post-id="135404">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>What I try to do is:</p>
<ul>
<li>
<p>If a standalone application, then put the configs in the application environment along with a function to call to have it perform things that it needs notifications about (like pool size), with override on individual function calls when appropriate.</p>
</li>
<li>
<p>If a set of GenServer’s then default application environment with override of options passed to start_link with override on individual function calls when appropriate, with a needed function call to have it be notified of config changes on things like pool size or whatever.</p>
</li>
<li>
<p>If loose modules then default application environment with override of options on individual function calls when appropriate.</p>
</li>
</ul>
<p>In addition, if defaults don’t exist in the application environment then it should call a ‘provider’ (whatever that is, database, system environment, a remote server, whatever) to populate the application environment values.</p>
<p>I want a library to make all this pattern work, yes it will require a lot of macro magic to not balloon to huge amounts of user code, but still, it should be simple to use, inline, no annoying large schema definitions just for function options, etc…</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="135404" 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/advice-how-to-go-about-library-configuration-from-elixir-1-9-and-on/23663/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-135404" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="135404"
                     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="135408" data-post-id="135408">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                    <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>Sounds like yet another library you aren’t going to write. <img src="https://forum.elixirforum.com/images/emoji/apple/stuck_out_tongue.png?v=15" title=":stuck_out_tongue:" class="emoji" alt=":stuck_out_tongue:" loading="lazy" width="20" height="20"></p>
<p>But otherwise, I partially agree. The part I wouldn’t do is to invest a lot in config providers – at least for now. Another thing I wouldn’t do is application environment – it’s unsuitable for libraries.</p>
<p>The priority order is going to be a self-sufficient structure containing both DB handle and configuration and if you find that annoying, you’ll be able to pass that configuration via <code>start_link</code> in a thin <code>GenServer</code> wrapper and not think about configurations and DB handles.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="135408" 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/advice-how-to-go-about-library-configuration-from-elixir-1-9-and-on/23663/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-135408" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="135408"
                     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="135409" data-post-id="135409">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="dimitarvp" data-post="26" data-topic="23663">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/48/38664_2.png" class="avatar"> dimitarvp:</div>
<blockquote>
<p>Sounds like yet another library you aren’t going to write. <img src="https://forum.elixirforum.com/images/emoji/apple/stuck_out_tongue.png?v=15" title=":stuck_out_tongue:" class="emoji" alt=":stuck_out_tongue:" loading="lazy" width="20" height="20"></p>
</blockquote>
</aside>
<p>Oh how I wish I had infinite free time…  ^.^;</p>
<p>But yes, that is why I described it, so maybe someone else will make it.  <img src="https://forum.elixirforum.com/images/emoji/apple/wink.png?v=15" title=":wink:" class="emoji" alt=":wink:" loading="lazy" width="20" height="20"></p>
<aside class="quote no-group" data-username="dimitarvp" data-post="26" data-topic="23663">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/48/38664_2.png" class="avatar"> dimitarvp:</div>
<blockquote>
<p>The part I wouldn’t do is to invest a lot in config providers – at least for now.</p>
</blockquote>
</aside>
<p>That would be nothing but a simple interface/behaviour, I wouldn’t expect anything more complicated then reading from the system environment being included with it, most of the times these are very platform-dependent.</p>
<aside class="quote no-group" data-username="dimitarvp" data-post="26" data-topic="23663">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/48/38664_2.png" class="avatar"> dimitarvp:</div>
<blockquote>
<p>Another thing I wouldn’t do is application environment – it’s unsuitable for libraries.</p>
</blockquote>
</aside>
<p>Libraries should still always register an application, it makes handling updates far cleaner, and by registering an application they still get an application environment, even if the application is otherwise empty.</p>
<p>But for example, I wrote my <a href="https://hex.pm/packages/task_after" class="inline-onebox" rel="nofollow">task_after | Hex</a> library in this way.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="135409" 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/advice-how-to-go-about-library-configuration-from-elixir-1-9-and-on/23663/27">Post #26</a>
	                </div>
	            </div>
              <div id="likers-container-135409" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="135409"
                     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="135411" data-post-id="135411">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                    <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 quote-modified" data-username="OvermindDL1" data-post="27" data-topic="23663">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/overminddl1/48/2677_2.png" class="avatar"> OvermindDL1:</div>
<blockquote>
<p>Libraries should still always register an application…</p>
</blockquote>
</aside>
<p>Oh mine does but doesn’t use <code>Mix.Config</code> or Elixir’s 1.9 <code>Config</code> at all, nothing else.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="135411" 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/advice-how-to-go-about-library-configuration-from-elixir-1-9-and-on/23663/28">Post #27</a>
	                </div>
	            </div>
              <div id="likers-container-135411" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="135411"
                     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="135413" data-post-id="135413">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="dimitarvp" data-post="28" data-topic="23663">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/48/38664_2.png" class="avatar"> dimitarvp:</div>
<blockquote>
<p>Oh mine does but doesn’t use <code>Mix.Config</code> or Elixir’s 1.9 <code>Config</code> at all, nothing else.</p>
</blockquote>
</aside>
<p>It doesn’t need to, just when you need to use a configuration thing just do <code>Application.get_env/3</code>.  This is all Erlang stuff, not even Elixir.  <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="135413" 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/advice-how-to-go-about-library-configuration-from-elixir-1-9-and-on/23663/29">Post #28</a>
	                </div>
	            </div>
              <div id="likers-container-135413" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="135413"
                     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="135416" data-post-id="135416">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                    <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>Nope, still don’t want to! I am making a DB access library after all; everything in it should be configurable per connection / NIF handle. There’s simply no place for any global configuration there.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="135416" 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/advice-how-to-go-about-library-configuration-from-elixir-1-9-and-on/23663/30">Post #29</a>
	                </div>
	            </div>
              <div id="likers-container-135416" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="135416"
                     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="135422" data-post-id="135422">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Only defaults, unless you want to force the user to pass in every configuration when needed, which is of course possible too if a bit wordy at times (though explicit is clear!).  ^.^</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="135422" 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/advice-how-to-go-about-library-configuration-from-elixir-1-9-and-on/23663/31">Post #30</a>
	                </div>
	            </div>
              <div id="likers-container-135422" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="135422"
                     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/23663/load_more?page=4">Load more posts (3 remaining)</a>
</div></template></turbo-stream>