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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="WestKeys" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/WestKeys/120/21675_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  WestKeys
                    <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="kokolegorille" data-post="11" data-topic="37561">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kokolegorille/48/4784_2.png" class="avatar"> kokolegorille:</div>
<blockquote>
<aside class="quote no-group quote-modified" data-username="WestKeys" data-post="10" data-topic="37561">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/westkeys/48/21675_2.png" class="avatar"> WestKeys:</div>
<blockquote>
<aside class="quote no-group" data-username="hauleth" data-post="9" data-topic="37561">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/hauleth/48/18942_2.png" class="avatar"> hauleth:</div>
<blockquote>
<p>Pinnacle example of modern engineering</p>
</blockquote>
</aside>
<p>We’re having a discussion, what’s with the sarcasm my man?</p>
</blockquote>
</aside>
<p>I don’t think it was personal <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>
</blockquote>
</aside>
<p>Oh <img src="https://forum.elixirforum.com/images/emoji/apple/sweat_smile.png?v=15" title=":sweat_smile:" class="emoji" alt=":sweat_smile:" loading="lazy" width="20" height="20"> my bad then <a class="mention" href="/u/hauleth" rel="nofollow">@hauleth</a>, I misread that, sorry!</p>
<aside class="quote no-group" data-username="kokolegorille" data-post="11" data-topic="37561">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kokolegorille/48/4784_2.png" class="avatar"> kokolegorille:</div>
<blockquote>
<p>In a request/response cycle I don’t see websocket advantage. But I see many when the server interact with the client.</p>
</blockquote>
</aside>
<p>Another obvious point not discussed is the potential cognitive savings and just overall simplification of using a single transport. I think most apps will grow beyond request/response cycle and require some realtime functionality at some point. When that point is reached, you’re now managing both HTTP and websockets.</p>
<p>Since websockets obviously also support request/response, you now have 2 places where you can place your request handlers. Why would you pick a controller over a channel if you already have a channel set up?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="204056" 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/replacing-http-with-websockets-or-other-persistent-transport/37561/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-204056" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="204056"
                     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="204057" data-post-id="204057">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I would typically use a controller when login, register or logout. Otherwise it’s fine with websocket.<br>
But as mentionned, I would not like to be tied to a transport layer.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="204057" 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/replacing-http-with-websockets-or-other-persistent-transport/37561/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-204057" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="204057"
                     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="204058" data-post-id="204058">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="WestKeys" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/WestKeys/120/21675_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  WestKeys
                    <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="kokolegorille" data-post="13" data-topic="37561">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kokolegorille/48/4784_2.png" class="avatar"> kokolegorille:</div>
<blockquote>
<p>I would typically use a controller when login, register or logout.</p>
</blockquote>
</aside>
<p>Agreed</p>
<aside class="quote no-group" data-username="kokolegorille" data-post="13" data-topic="37561">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kokolegorille/48/4784_2.png" class="avatar"> kokolegorille:</div>
<blockquote>
<p>But as mentionned, I would not like to be tied to a transport layer.</p>
</blockquote>
</aside>
<p>Why would you be tied to a transport layer?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="204058" 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/replacing-http-with-websockets-or-other-persistent-transport/37561/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-204058" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="204058"
                     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="204059" data-post-id="204059">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I want to be able to use liveview, or channels, or normal controllers, or all. I don’t want to choose upfront.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="204059" 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/replacing-http-with-websockets-or-other-persistent-transport/37561/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-204059" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="204059"
                     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="204065" data-post-id="204065">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="WestKeys" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/WestKeys/120/21675_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  WestKeys
                    <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>Yes, just want to clarify, I am certainly not suggesting getting rid of HTTP system-wide. I’m exploring the idea that in client-server business domain interaction, one could choose upfront to route it all thru websockets (which does not imply <em>banning</em> LiveView or regular controllers from the app per se)</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="204065" 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/replacing-http-with-websockets-or-other-persistent-transport/37561/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-204065" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="204065"
                     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="205368" data-post-id="205368">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="WestKeys" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/WestKeys/120/21675_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  WestKeys
                    <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>Tangentially (world catching up to LiveView)</p>
<aside class="onebox allowlistedgeneric" data-onebox-src="https://alistapart.com/article/the-future-of-web-software-is-html-over-websockets/">
  <header class="source">
      <img src="https://i0.wp.com/alistapart.com/wp-content/uploads/2019/03/cropped-icon_navigation-laurel-512.jpg?fit=32%2C32&amp;quality=89&amp;ssl=1" class="site-icon" alt="" width="32" height="32">

      <a href="https://alistapart.com/article/the-future-of-web-software-is-html-over-websockets/" target="_blank" rel="noopener nofollow ugc" title="03:00PM - 25 February 2021">A List Apart – 25 Feb 21</a>
  </header>

  <article class="onebox-body">
    <div class="aspect-image" style="--aspect-ratio:690/361;"><img src="https://s0.wp.com/_si/?t=eyJpbWciOiJodHRwczpcL1wvaTAud3AuY29tXC9hbGlzdGFwYXJ0LmNvbVwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAxOVwvMDNcL2Nyb3BwZWQtaWNvbl9uYXZpZ2F0aW9uLWxhdXJlbC01MTIuanBnP2ZpdD01MTIlMkM1MTImcXVhbGl0eT04OSZzc2w9MSIsInR4dCI6IkEgTGlzdCBBcGFydCIsInRlbXBsYXRlIjoiZWRnZSIsImZvbnQiOiIiLCJibG9nX2lkIjoxNTgwOTQ3MjZ9.0oP5GNj3vHR_yLJaXkr_AaWMuS_ItN_HPB-deU1HBBgMQ" class="thumbnail" alt="" width="690" height="362"></div>

<h3><a href="https://alistapart.com/article/the-future-of-web-software-is-html-over-websockets/" target="_blank" rel="noopener nofollow ugc">The Future of Web Software Is HTML-over-WebSockets</a></h3>

  <p>The future of web app development is taking shape, and it’s changing the way we think about server-side app architecture. In this article, Matt E. Patterson shows why a new WebSockets-driven …</p>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<p>Still curious how this will all pan out for mobile, especially considering the whole SPA bonanza was itself motivated by mobile-first-induced client-server decoupling, ie “Ok well we have a well documented backend API for our iOS and Android apps, great, let’s reuse that”…</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="205368" 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/replacing-http-with-websockets-or-other-persistent-transport/37561/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-205368" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="205368"
                     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="205409" data-post-id="205409">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<blockquote>
<p>I haven’t seen enough data to support websockets being a poor fit for mobile, at least in the context of day-to-day average use.</p>
</blockquote>
<p><a href="https://www.hindawi.com/journals/sp/2019/8235458/" rel="noopener nofollow ugc">An Energy Efficiency Study of Web-Based Communication in Android Phones (hindawi.com)</a></p>
<p>There were numerous complaints about battery drain on some android apps that tried to implement chat using websockets. It mostly had to do with the antenna maintaining a persistent connection. The ones that used MQTT performed better and those using push notifications performed better. I dont have the numbers or the implementation details 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="205409" 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/replacing-http-with-websockets-or-other-persistent-transport/37561/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-205409" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="205409"
                     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="205533" data-post-id="205533">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="chrismccord" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/chrismccord/120/24233_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  chrismccord
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Phoenix</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>For lonpolling, you still have a mostly open HTTP connection maintaining short connections on the server, so in practice it seems very similar to websockets unless you are specifically turning a mobile client to poll for updates less frequently and to not hold a poll open if no updates are present. Even then, the attenna is active ever several seconds, so it would be interesting to see a real breakdown of the approaches.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="205533" 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/replacing-http-with-websockets-or-other-persistent-transport/37561/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-205533" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="205533"
                     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>