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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Go for it <img src="https://forum.elixirforum.com/uploads/default/original/2X/a/a1c41c89c299189a3f85edfeb4973563d8bac781.gif?v=15" title=":023:" class="emoji emoji-custom" alt=":023:" loading="lazy" width="20" height="20"> it is actually aimed at programmers so you are the target market <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"> (It’s just that personally I am the sort of person who likes to read or learn as much about something as I can before jumping in <img src="https://forum.elixirforum.com/uploads/default/original/2X/7/776053aa22968f83c10e90c98b23aa0ddd5c9d47.gif?v=15" title=":lol:" class="emoji emoji-custom" alt=":lol:" loading="lazy" width="20" height="20">)</p>
<aside class="quote no-group" data-username="Shrike" data-post="11" data-topic="9664">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/s/7cd45c/48.png" class="avatar"> Shrike:</div>
<blockquote>
<p>In the future it would need to be fast, but that’s a problem for the future</p>
</blockquote>
</aside>
<p>As ODL commented, it will be fast from the get go - Phoenix response times are in microseconds <img src="https://forum.elixirforum.com/images/emoji/apple/smiley.png?v=15" title=":smiley:" class="emoji" alt=":smiley:" 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="55939" 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/use-phoenix-for-a-simple-api-server/9664/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-55939" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="55939"
                     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="55943" data-post-id="55943">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Shrike" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Shrike
                    <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>Well that’s why I bought programming elixir, programming Phoenix and functional web development and been browsing the in the last month.<br>
But the sad truth is until you write something you don’t know the language and the first few times you use it, you duck only after a few months of using a language you start to be mediocre (in my case) when using it</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="55943" 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/use-phoenix-for-a-simple-api-server/9664/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-55943" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="55943"
                     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="55966" data-post-id="55966">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>To see what a very simple Plug webservice looks like, here’s one of mine with only one endpoint that discovers how long people have followed a Twitch channel: <a href="http://gitlab.com/Nicd/Peliturbiini-followed-since/" class="inline-onebox" rel="noopener nofollow ugc">Mikko Ahlroth / peliturbiini-followed-since · GitLab</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="55966" 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/use-phoenix-for-a-simple-api-server/9664/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-55966" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="55966"
                     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="56645" data-post-id="56645">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Shrike" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Shrike
                    <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><a class="mention" href="/u/nicd" rel="nofollow">@Nicd</a> thanks, took a look at that and that’s basically what I’ll need to start with my basic server now to find some simple ecto app I can steal ;p</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="56645" 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/use-phoenix-for-a-simple-api-server/9664/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-56645" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="56645"
                     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="62696" data-post-id="62696">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Shrike" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Shrike
                    <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>Well, I think that I owe you an update here…<br>
The project is now on the first stage unfortunately it started 2 weeks ago or maybe 3 and needs to be up and running in less than 2 weeks.<br>
So I decided to stay with ruby and Sinatra, the good news is that 90% of this project is based on what I learned here and I think of it as the Elixir way(as I see it)<br>
Basically what I’m doing is creating a Json based web services project that uses lots of threads that can always crash and send their state to another server if and when it happens.<br>
I even have a gen server that is responsible of checking loads start and stop every other  server, and of course is chosen with each restart.<br>
So I basically wanted to say thanks, this community enriched me more than I could ever imagine, and I’m doing my best to use what I learned here, hopefully stage 2 would be Elixir but if not Elixir then my time here as a silent observer would be my inspiration.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="62696" 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/use-phoenix-for-a-simple-api-server/9664/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-62696" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="62696"
                     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="62698" data-post-id="62698">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Shrike" data-post="16" data-topic="9664">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/s/7cd45c/48.png" class="avatar"> Shrike:</div>
<blockquote>
<p>So I decided to stay with ruby and Sinatra, the good news is that 90% of this project is based on what I learned here and I think of it as the Elixir way(as I see it)<br>
Basically what I’m doing is creating a Json based web services project that uses lots of threads that can always crash and send their state to another server if and when it happens.</p>
</blockquote>
</aside>
<p>We are not using Elixir in anger yet, but I think it would take a considerable effort to properly implement supervisors and gen_servers in ruby.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="62698" 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/use-phoenix-for-a-simple-api-server/9664/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-62698" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="62698"
                     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="62737" data-post-id="62737">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Shrike" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Shrike
                    <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>I should have said that my gen server is not going to be even 10% as smart as elixir more in the lines of removing computers from LB and adding them when they are up. (but the idea came directly fro it)<br>
It would also be responsible of running test to make sure that every node is working as it should and every bot is doing what it is suppose to do.<br>
The nodes themselves would be responsible of re-sending failed attempts to the Load Balance and letting the gen server know that they are down when it happens, which would initiate a replacement (shutting down the failed node or deciding the error was acceptable or not)</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="62737" 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/use-phoenix-for-a-simple-api-server/9664/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-62737" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="62737"
                     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="64766" data-post-id="64766">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Shrike" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Shrike
                    <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>Well, I would give you one more update now and 2 more one when finished and another when I will finally move to Elixir.<br>
From last week we are up, managed to do it within our 1 month time frame.<br>
So what I have for now 12 computers each can do all the tasks I need.<br>
State is decided by a transferable json, and when a request is failed it is retried and on second fail goes back to lb, second fail sends an error to queue and returns a success to my genserver.<br>
Next stage I would fix 3 things:</p>
<ol>
<li>Better genserver decision process for now first server started is genserver</li>
<li>Auto version update</li>
<li>Seamless move when genserver fails.<br>
And of course make each node start as a service - yeah I know … but this one was less important considering I needed to get the whole system working.<br>
Next update would hopefully be after everything is working, and in less than 3 weeks, nothing is critical and I do have so many other important things I should do.<br>
Last update would be a move to elixir but that would probably be later than I want <img src="https://forum.elixirforum.com/images/emoji/apple/frowning.png?v=15" title=":frowning:" class="emoji" alt=":frowning:" loading="lazy" width="20" height="20"><br>
Forgot to say everything is threaded:)</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="64766" 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/use-phoenix-for-a-simple-api-server/9664/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-64766" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="64766"
                     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>