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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sasajuric" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sasajuric/120/991_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sasajuric
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Author of Elixir In Action</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Here’s an incomplete list of some problems I’ve experienced in various projects:</p>
<ol>
<li>
<p>No comprehensive list of env vars that must be set.</p>
</li>
<li>
<p>The system fails to boot if some remote service is not available.</p>
</li>
<li>
<p>Obtaining the credentials to remote service accounts may require some bureaucracy. In some cases it might not even be possible, depending on the company policy and the availability (or lack) of a staging or per-dev accounts.</p>
</li>
<li>
<p>It’s unclear which other steps need to be done (e.g. generate ssl keys, start other supporting local services) for the system to start and function properly.</p>
</li>
<li>
<p>Conflation of prod-compiled with running on prod machine. E.g. a prod-compiled version should not hardcode the site URL nor the URL of remote services, because it means that I can’t easily run it locally.</p>
</li>
</ol>
<p>These aren’t difficult problems, but once the codebase grows, they are trickier to solve, because there will be a bunch of such small problems scattered around. Furthermore, addressing some of them will require some coordination with other teams (e.g. ops).</p>
<p>As a result, folks will take the path of least resistance, and not try to make it work. Then, when some problems arise which can’t be reproduced on a dev version, folks will try to debug it remotely (e.g. on staging or prod). This works,but it’s much more cumbersome than trying things out locally, and experimenting with potential fixes.</p>
<p>OTOH, if you commit to this goal from the day 1, it should be easier to set things up, because you’re dealing with a smaller codebase, a smaller team, and a smaller set of problems. This property becomes a part of the team culture and philosophy, so it should be much easier to keep it as the team and the codebase grow.</p>
<p>In summary, what I like to see from a project:</p>
<ol>
<li>
<p>Starting a prod-compiled version locally should be dead simple. Give me 2-3 commands I need to run, and it should work out of the box, using my local database.</p>
</li>
<li>
<p>The system should work even if there is no network connection. Obviously, the features that depend on external services, such as AWS, can’t work. But e.g. serving local content, interacting with the local db &amp; such should work.</p>
</li>
<li>
<p>It should be clear how to get the credentials to remote services. Ideally, each dev should get their own sandbox account, if possible. If the system depends on other in-house services it should be easy to start these locally.</p>
</li>
<li>
<p>If the prod is containerized, building and starting a local container should also be possible and straightforward.</p>
</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="336609" data-batch-url="/posts/batch_likers">
                        6
                      </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/elixir-in-action-book-club/63088/94">Post #93</a>
	                </div>
	            </div>
              <div id="likers-container-336609" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="336609"
                     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 #93"></div>
  </section>
</div>
    <div class="postbit" id="336642" data-post-id="336642">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>This is very helpful, thank you so much!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="336642" 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/elixir-in-action-book-club/63088/95">Post #94</a>
	                </div>
	            </div>
              <div id="likers-container-336642" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="336642"
                     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 #94"></div>
  </section>
</div>
    <div class="postbit" id="349745" data-post-id="349745">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I have recently started learning Elixir.. Like I am just 3 weeks in.. Also India still doesnt have the 3rd edition available &amp; I didnt want to pay almost $40 shipping so got a friend to carry it from US… And Im reading the digital version now…</p>
<p>As I am learning, coding &amp; reading all in parallel lines are blurry about what I learnt from book &amp; stuff from anywhere else… but no doubt the reading is effortless &amp; very natural… Shows the clarity of thought which was already visibile in the Soul of Erlang video by Sasa Juric (which actually made it a no-brainer to get this book)…</p>
<p>I want to learn more about Phoenix &amp; also how I can tweak things for a chat app we are building… sadly other books are atleast 5 year old… From what I understand Elixir &amp; Phoenix have evolved rapidly in the last 5 years… so thanks for working on a new edition…</p>
<p>Will take better notes &amp; update chapter wise questions &amp; notes for discussion here…</p>
<p>The way Chapter 1 starts with Macros had me a little confused but researching more on the topic helped me acheive a lot of clarity… so as a begineer, the book is nudging me towards the right questions &amp; expanding on stuff from there… Couldnt ask for more <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="349745" 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/elixir-in-action-book-club/63088/96">Post #95</a>
	                </div>
	            </div>
              <div id="likers-container-349745" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="349745"
                     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 #95"></div>
  </section>
</div>
    <div class="postbit" id="349840" data-post-id="349840">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Im on Chapter2 now &amp; its interesting to know that most of the stuff in Elixir is just common conventions. like modules naming with dot notation format or variable names with <code>?</code> or <code>!</code>.</p>
<p>Presently on the section about Typespecs. I am a big fan of Typescript, I hope it will be the same for Typespecs <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="349840" 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/elixir-in-action-book-club/63088/97">Post #96</a>
	                </div>
	            </div>
              <div id="likers-container-349840" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="349840"
                     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 #96"></div>
  </section>
</div>
    <div class="postbit" id="350439" data-post-id="350439">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Learnt about Tail vs non-tail recurssion &amp; refernceto using <code>GOTO</code> just took me back to the days of programming in BASIC. Nice stuff <img src="https://forum.elixirforum.com/images/emoji/apple/ok_hand.png?v=15" title=":ok_hand:" class="emoji" alt=":ok_hand:" 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="350439" 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/elixir-in-action-book-club/63088/98">Post #97</a>
	                </div>
	            </div>
              <div id="likers-container-350439" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="350439"
                     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 #97"></div>
  </section>
</div>
    <div class="postbit" id="352084" data-post-id="352084">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>In section 9.2.3, the way of checking if to-do server process exists is to attempt to start it with registering using via tuple. If registering fails with “already registered” reason we know we can use existing process. Section mentions 2 inefficiencies:</p>
<ol>
<li>“Every time you want to work with a to-do list, you issue a request to the supervisor, so the supervisor process can become a bottleneck. Even if the to-do server is already running, the supervisor will briefly start a new child, which will immediately stop.”</li>
<li>notion of distributed registration in chapter 12, which itself in section 12.2.2 states that “unconditional registration attempt can become a serious bottleneck. Every time you want to work with a to-do list, even if the server process is already running, you attempt a :global registration, which will in turn grab a cluster-wide lock and will then chat with all other nodes in the system.”</li>
</ol>
<p>So even in a non-distributed scenario, supervisor bottleneck is possible? E.g. in a chat application with many rooms, where each message in each room will trigger supervisor request and unconditional registration attempt</p>
<p>Does <code>Registry.lookup</code> solves this? We could make a lookup and return existing process, only starting the new one if it doesn’t exist</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="352084" 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/elixir-in-action-book-club/63088/99">Post #98</a>
	                </div>
	            </div>
              <div id="likers-container-352084" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="352084"
                     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>