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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="JEG2" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/JEG2/120/936_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  JEG2
                    <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 class="user-title">
									<span>Author of Designing Elixir Systems with OTP</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="gregvaughn" data-post="10" data-topic="894">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/gregvaughn/48/954_2.png" class="avatar"> gregvaughn:</div>
<blockquote>
<p>ETS tables can have a single owning process that is the only one allowed to write. This could be the one responsible for rendering.</p>
</blockquote>
</aside>
<p>Sadly, this doesn’t eliminate memory copies, <a href="http://erlang.org/doc/man/ets.html" rel="nofollow">according to the documentation</a>:</p>
<blockquote>
<p>In the current implementation, every object insert and look-up operation results in a copy of the object.</p>
</blockquote> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="5914" 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/thought-experiment-drawing-a-pond-simulation/894/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-5914" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="5914"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="JEG2" data-post="12" data-topic="894">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jeg2/48/936_2.png" class="avatar"> JEG2:</div>
<blockquote>
<p>Sadly, this doesn’t eliminate memory copies, according to the documentation:</p>
</blockquote>
</aside>
<p>I’m envisioning it only being written one cell at a time. And only read 8 cells at a time (or perhaps one single value if match specs can be used).</p>
<p>I was suggesting that the rendering process could be the writer/owner of the ETS table precisely so it can have an in-memory cache, optimized for rendering, of the whole lake and never have to read the entirety of it from ETS.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="5916" 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/thought-experiment-drawing-a-pond-simulation/894/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-5916" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="5916"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Qqwy" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Qqwy/120/1349_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Qqwy
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>TypeCheck Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group quote-modified" data-username="JEG2" data-post="9" data-topic="894">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jeg2/48/936_2.png" class="avatar"> JEG2:</div>
<blockquote>
<blockquote>
<p>64*128 + 3000+3000 = 9328.</p>
</blockquote>
<p>14,192, actually.</p>
</blockquote>
</aside>
<p>Oh snap. I don know why I wrote down that completely unrelated number ^^'.</p>
<aside class="quote no-group" data-username="JEG2" data-post="5" data-topic="894">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jeg2/48/936_2.png" class="avatar"> JEG2:</div>
<blockquote>
<p>However, I think there’s one aspect you haven’t yet considered:  how do we manage the drawing of the current state of the pond?</p>
</blockquote>
</aside>
<p>Yes, you are right. I did not consider this. This is sort of a problem, unless you decide that the speed at which you want to see the state does not need to be as fast as the simulation itself.</p>
<p>What I think is the best solution, is to have a single global, name-registered ‘observer’ process that receives notifications each time a Lilypad’s state changes. It does not contain references to any of the Lilypads, it only receives information like <code>{x, y, type_of_critter_inside}</code>. This can sort of be seen as a digital equivalent of ‘looking at’ something (i.e. light rays(messages) travel from the things that change state to the entity that observes). This single process <em>will</em> become a bottleneck, but because it is at the edge of our system, the simulation itself is not affected by it.</p>
<p>Of course, if the simulation runs so quick that this outside process is unable to work through the messages quick enough, it will start lagging further and further behind in the past.</p>
<p>We can go even further overboard, introduce vector-clocks for all state-change messages the Lilypads send and create a (non-OTP) process, reading the message queue as LIFO (last-in-first-out) and discarding messages whose vector clock value isn’t higher as the one in the current representation we have.</p>
<p>Introducing these vector clocks probably actually means introducing <em>two</em> vector-clock-like-values: One for how often a Lilypad has been restarted (This needs to be kept track of in the ‘World’ process and passed along to the newly restarted Lilypad each time), and a second for how many state-change-messages this version of the Lilypad has sent. I would argue that timers are a bad solution here, as we do not actually care how fast something has happened, only how often something has happened. Time has many peculiarities (leap seconds, changing clocks, network delays, CPU temperature et cetera) that make it hard to determine what will actually happen in a system.</p>
<p>I think that doing this is taking it too far, but I think this is possible.</p>
<aside class="quote no-group" data-username="gregvaughn" data-post="7" data-topic="894">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/gregvaughn/48/954_2.png" class="avatar"> gregvaughn:</div>
<blockquote>
<p>I could do it in a single process. I’ve done Conway’s Game of Life that way. This would be my approach if I were to interpret the critter movement as being a synchronized “turn”.</p>
</blockquote>
</aside>
<p>Yes, I completely agree with you. Conway’s Game of Life is suited a lot better for a single process because the whole computation of moment <em>n+1</em> depends on the state of each of the cells of moment <em>n</em>. It’s possible to start a separate process for each new cell and pass it its old state plus its neighbours, but because the next-timestep computation is so simple, this would incur a lot of unnecessary overhead.</p>
<p>In a situation like this Pond simulation where entities act on the <em>current</em> state around them and influence the same state at that time, however, processes seem like a natural fit.</p>
<p>What <em>would</em> definitely be interesting to solve concurrently, though, is a <a href="https://en.wikipedia.org/wiki/Hashlife" rel="noopener nofollow ugc">Hashlife</a> algorithm.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="5918" 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/thought-experiment-drawing-a-pond-simulation/894/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-5918" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="5918"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Qqwy" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Qqwy/120/1349_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Qqwy
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>TypeCheck Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="JEG2" data-post="11" data-topic="894" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jeg2/48/936_2.png" class="avatar"> JEG2:</div>
<blockquote>
<p>Question for the Processes All The Way Down Team:  it seems that the only state we need to store is the current location of the critters and we could choose to keep that in critter processes or lily pad processes, so is there really a good argument for doing both?</p>
</blockquote>
</aside>
<p>If you store the position of on what lilypad it is only in the critter, how would the critter know how many neighbouring critters it has?</p>
<p>Embedding the information of the critters on the Lilypads instead of in their own process is possible. However, the main reason to split them into two, is because of a separation of concerns. If either of these things grows in complexity (say, we want to have special lilypads that only turtles can walk on), it can do so without directly affecting the other. Also, consider what happens when one of the things crashes: If a Lilypad-embedded-with-critter-info crashes, that critter is lost. If a Lilypad crashes whose critter is in a separate process, this process can wait for a new Lilypad to appear at its location.</p>
<p>Conversely, if a Lilypad-embedded-with-critter-info crashes while executing its critter-movement code, the whole Lilypad crashes as well. In the case these are separated, again only the critter crashes and is restarted.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="5920" 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/thought-experiment-drawing-a-pond-simulation/894/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-5920" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="5920"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #14"></div>
  </section>
</div>
    <div class="postbit" id="5924" data-post-id="5924">
  <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>My first hunch is to model the world as a purely functional data structure and maintain it inside a single process. This means there would be some tick operation the result of which is that some critters move (i.e. the world transitions to the next state). A main benefit of this approach is consistency. When everything is in a single process you can get a consistent snapshot of the world and move it to the next state predictably.</p>
<p>That’s not the case with everything-as-a-process. Since processes are separate, you can’t get a snapshot of the world, so you’re always operating on possibly stale knowledge. For example, counting neighbours means asking 8 processes. When you get a last response, all of them might already be stale, since all entities run independently. It’s also unclear when each entity is moving its own state. There’s less guarantees about order and no guarantees about synchronism, which is quite non-deterministic. Perhaps that’s actually desirable when simulating real-life, but it’s certainly harder to reason about.</p>
<p>If you wanted, I think you could add randomness to a single process world. For example, you can have more frequent ticks, moving only some random part of the world in each tick.</p>
<p>A single process world might also help with drawing. After you tick the world, you know all the changes, so you can send them to the drawing process which could probably render them in a single pass.</p>
<p>I’m not convinced about error isolation benefits. It seems to me in everything-as-a-process approach the processes would mostly perform a couple of primitive operations, such as keeping an occupied state, counting neighbours, or selecting a next destination. It seems fairly unlikely these things will crash. I mean, it’s always a possibility, but the processes seem extremely simple at this point. It’s also unclear what should happen when an entity process crashes. Perhaps a drawing process should be notified about this and clear the entity from display. Or maybe a supervisor might restart and resume the entity process, but then you’re restoring the state, so the process might crash again. The fault-tolerance point seem too fine-grained for this case. I’d probably opt to kill the entire world if something goes wrong.</p>
<p>I’m also skeptical about the performance/scalability benefits of multiple processes. Again, it seems these processes would do very little, so the cost of message passing will probably shadow possible gains of utilizing multiple cores.</p>
<p>Processes are great, and they should be used extensively, but there’s always a trade-off. Otherwise, we’d be running every single line of code in a separate process <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>As you say, there are 14192 entities, which doesn’t seem so large Erlang is not known for raw CPU speed, but I’m positive it could work efficiently with that size, assuming proper data structures and algorithms are chosen. For some larger scale, I’d consider partitioning the world, then on every tick handle each partition separately. This would still keep synchronism (and thus consistency) while introducing some potential for parallelism.</p>
<p>Standard disclaimers apply of course <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"> It seems to me the problem is still a moving target, so it’s hard for me to identify with it its nuances. That said, single-process-world would be the road I’d explore.</p>
<p>It’s worth mentioning that Torben Hoffmann did an <a href="https://www.youtube.com/watch?v=6sBL1kHoMoo" rel="noopener nofollow ugc">everything-as-a-world take on Conway’s game of life</a>. You might find the video useful if you decide to take that approach.</p>
<p>Best of luck!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="5924" 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/thought-experiment-drawing-a-pond-simulation/894/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-5924" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="5924"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="JEG2" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/JEG2/120/936_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  JEG2
                    <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 class="user-title">
									<span>Author of Designing Elixir Systems with OTP</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Just to be clear, I totally respect the value of a single process approach.  My reasoning for doing this exercise is that a simulation allows you to see the processes moving around.  I’m using it as a teaching tool.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="5925" 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/thought-experiment-drawing-a-pond-simulation/894/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-5925" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="5925"
                     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 #16"></div>
  </section>
</div>
    <div class="postbit" id="5926" data-post-id="5926">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’ll add one more point here that I had meant to mention earlier in the thread. Francesco Caesarini’s talk from the first ElixirConf was great. It discussed a lot about scalability bottlenecks. He mentioned at one point that you should use processes for each “concurrent activity” in your system. At the time that was vague to me, but I’ve come to understand it better and embrace it myself. If you take this approach, then there is no reason at all to have the cells of the pond be processes. The critters – sure, but not the pond cells.</p>
<p>If you use processes for the wrong sorts of things, they become bottlenecks. I understand the value of “MOAR PROCESSES” as an educational tool, however I caution you from letting students go away with the idea that is the best way to scale a system (without an analysis of what the concurrent activities are, that is).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="5926" 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/thought-experiment-drawing-a-pond-simulation/894/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-5926" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="5926"
                     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 #17"></div>
  </section>
</div>
    <div class="postbit" id="5930" data-post-id="5930">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’m still pretty new to programming and especially Elixir, but I think I’d start this off with just lily pads as processes with a world process over it.</p>
<p>They can have 4 possible states: empty, occupied by turtle and has neighbors open, occupied by frog and has neighbors, occupied but locked(ratio around it can never change or no open pads within range).</p>
<p>From the world process pulse an update call where each pad determines if the resident will move. When the pads report back, the movement happens as a message from the world process to each pad that will have a state change.</p>
<p>The overall world picture could be kept in a table, allowing asynchronous reads from the pads and used by the world to restart a pad with correct state.</p>
<p>As the program runs pads that will never change could let the world process know and then be skipped on subsequent pulses.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="5930" 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/thought-experiment-drawing-a-pond-simulation/894/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-5930" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="5930"
                     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 #18"></div>
  </section>
</div>
    <div class="postbit" id="5931" data-post-id="5931">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="JEG2" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/JEG2/120/936_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  JEG2
                    <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 class="user-title">
									<span>Author of Designing Elixir Systems with OTP</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="gregvaughn" data-post="18" data-topic="894">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/gregvaughn/48/954_2.png" class="avatar"> gregvaughn:</div>
<blockquote>
<p>If you use processes for the wrong sorts of things, they become bottlenecks. I understand the value of “MOAR PROCESSES” as an educational tool, however I caution you from letting students go away with the idea that is the best way to scale a system (without an analysis of what the concurrent activities are, that is).</p>
</blockquote>
</aside>
<p>Point taken.  I’ll be careful.</p>
<p>My current solution has a lot less processes than some are recommending here.  <img src="https://forum.elixirforum.com/images/emoji/apple/smile.png?v=15" title=":smile:" class="emoji" alt=":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="5931" 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/thought-experiment-drawing-a-pond-simulation/894/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-5931" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="5931"
                     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 #19"></div>
  </section>
</div>
    <div class="postbit" id="5932" data-post-id="5932">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="JEG2" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/JEG2/120/936_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  JEG2
                    <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 class="user-title">
									<span>Author of Designing Elixir Systems with OTP</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="terakilobyte" data-post="19" data-topic="894">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/terakilobyte/48/1681_2.png" class="avatar"> terakilobyte:</div>
<blockquote>
<p>From the world process pulse an update call where each pad determines if the resident will move.</p>
</blockquote>
</aside>
<p>This is an interesting way to get “ticks” with the multi-process approach.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="5932" 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/thought-experiment-drawing-a-pond-simulation/894/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-5932" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="5932"
                     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 #20"></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/894/load_more?page=3">Load more posts (8 remaining)</a>
</div></template></turbo-stream>