<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Phoenix on Poeticoding</title><link>https://www.poeticoding.com/category/phoenix/</link><description>Recent content in Phoenix on Poeticoding</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 23 Nov 2021 16:16:52 +0000</lastBuildDate><atom:link href="https://www.poeticoding.com/category/phoenix/index.xml" rel="self" type="application/rss+xml"/><item><title>Phoenix LiveView LiveComponents</title><link>https://www.poeticoding.com/phoenix-liveview-livecomponents/</link><pubDate>Tue, 23 Nov 2021 16:09:36 +0000</pubDate><guid>https://www.poeticoding.com/phoenix-liveview-livecomponents/</guid><description>&lt;div class="video">&lt;iframe src="https://www.youtube-nocookie.com/embed/U2D2woBthcc" title="YouTube video" loading="lazy" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen referrerpolicy="strict-origin-when-cross-origin">&lt;/iframe>&lt;/div>

&lt;p>&lt;a href="https://www.poeticoding.com/introductory-phoenix-liveview-course/">&lt;strong>Course Index page&lt;/strong>&lt;/a>&lt;/p>
&lt;h2 id="code">Code&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://github.com/poeticoding/poeticoins/tree/live-component" target="_blank" rel="noopener">&lt;code>live-component&lt;/code> branch&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/poeticoding/poeticoins/pull/18" target="_blank" rel="noopener">Pull Request&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/poeticoding/poeticoins/blob/live-component/lib/poeticoins_web/live/product_component.ex" target="_blank" rel="noopener">&lt;code>product_component.ex&lt;/code>&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="links">Links&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://hexdocs.pm/phoenix_live_view/Phoenix.LiveComponent.html" target="_blank" rel="noopener">Phoenix.LiveComponent&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.Helpers.html#live_component/4" target="_blank" rel="noopener">&lt;code>live_component/4&lt;/code>&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://hexdocs.pm/phoenix_live_view/Phoenix.LiveComponent.html#module-stateful-components-life-cycle" target="_blank" rel="noopener">Stateful components&lt;/a>&lt;/li>
&lt;/ul>
&lt;hr>
&lt;p>We&amp;rsquo;ve just started to build our &lt;a href="https://github.com/poeticoding/poeticoins/blob/dashboard-ui/lib/poeticoins_web/live/crypto_dashboard_live.ex" target="_blank" rel="noopener">&lt;code>CryptoDashboardLive&lt;/code> view&lt;/a>, and we already have the feeling that the we are piling up a lot of code into the single &lt;code>CryptoDashboardLive&lt;/code> module. It&amp;rsquo;s not just about the template in the &lt;a href="https://github.com/poeticoding/poeticoins/blob/dashboard-ui/lib/poeticoins_web/live/crypto_dashboard_live.ex#L11" target="_blank" rel="noopener">&lt;code>render/1&lt;/code>&lt;/a> function, we could easily move it into a &lt;code>.leex&lt;/code> file. The risk is to find us with a single massive live view module which handles every aspect of our page, making che code hard to read and maintain. This page already has different parts with different responsibilities, for example: product cards where each one shows its product price, a toolbar with a dropdown to add products to the dashboard&amp;hellip;&lt;/p></description></item><item><title>A nice Dashboard UI</title><link>https://www.poeticoding.com/a-nice-dashboard-ui/</link><pubDate>Tue, 23 Nov 2021 15:35:40 +0000</pubDate><guid>https://www.poeticoding.com/a-nice-dashboard-ui/</guid><description>&lt;div class="video">&lt;iframe src="https://www.youtube-nocookie.com/embed/DVIrfx0CiLc" title="YouTube video" loading="lazy" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen referrerpolicy="strict-origin-when-cross-origin">&lt;/iframe>&lt;/div>

&lt;p>&lt;a href="https://www.poeticoding.com/introductory-phoenix-liveview-course/">Course Index page&lt;/a>&lt;/p>
&lt;h2 id="code">Code&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://github.com/poeticoding/poeticoins/tree/dashboard-ui" target="_blank" rel="noopener">&lt;em>dashboard-ui&lt;/em> repo&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/poeticoding/poeticoins/blob/dashboard-ui/assets/css/poeticoins.scss" target="_blank" rel="noopener">&lt;code>assets/css/poeticoins.scss&lt;/code>&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://raw.githubusercontent.com/poeticoding/poeticoins/d7978efc38d2b04d4ff67cfffb44dc1f1721313e/assets/static/images/background.svg" target="_blank" rel="noopener">&lt;code>assets/static/images/background.svg&lt;/code>&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://raw.githubusercontent.com/poeticoding/poeticoins/d7978efc38d2b04d4ff67cfffb44dc1f1721313e/assets/static/images/cryptos/btc.svg" target="_blank" rel="noopener">&lt;code>assets/static/images/cryptos/btc.svg&lt;/code>&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://raw.githubusercontent.com/poeticoding/poeticoins/d7978efc38d2b04d4ff67cfffb44dc1f1721313e/assets/static/images/cryptos/eth.svg" target="_blank" rel="noopener">&lt;code>assets/static/images/cryptos/eth.svg&lt;/code>&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://raw.githubusercontent.com/poeticoding/poeticoins/d7978efc38d2b04d4ff67cfffb44dc1f1721313e/assets/static/images/cryptos/ltc.svg" target="_blank" rel="noopener">&lt;code>assets/static/images/cryptos/ltc.svg&lt;/code>&lt;/a>&lt;/li>
&lt;/ul>
&lt;hr>
&lt;p>Before going on with LiveComponents and other topics, let&amp;rsquo;s spend a few minutes on our UI. At the moment products and trades are rendered in a table, using the default &lt;code>phoenix.css&lt;/code>.&lt;/p></description></item><item><title>Compile Elixir applications into single executable binaries, with Bakeware</title><link>https://www.poeticoding.com/compile-elixir-applications-into-single-executable-binaries-with-bakeware/</link><pubDate>Thu, 22 Oct 2020 16:24:50 +0000</pubDate><guid>https://www.poeticoding.com/compile-elixir-applications-into-single-executable-binaries-with-bakeware/</guid><description>&lt;div class="video">&lt;iframe src="https://www.youtube-nocookie.com/embed/ML5hQjPQL7A" title="YouTube video" loading="lazy" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen referrerpolicy="strict-origin-when-cross-origin">&lt;/iframe>&lt;/div>

&lt;p>&lt;a href="https://github.com/spawnfest/bakeware/" target="_blank" rel="noopener">Bakeware&lt;/a> is a new fantastic tool, built (by &lt;a href="https://github.com/fhunleth" target="_blank" rel="noopener">Frank Hunleth&lt;/a>, &lt;a href="https://github.com/jjcarstens" target="_blank" rel="noopener">Jon Carstens&lt;/a> and &lt;a href="https://github.com/ConnorRigby" target="_blank" rel="noopener">Connor Rigby&lt;/a>) over a weekend for the &lt;a href="https://spawnfest.github.io/" target="_blank" rel="noopener">SpawnFest 2020&lt;/a>, which compiles an Elixir, a Scenic or a Phoenix application into single executable binary (yes, like go-lang!). It can be extremely useful to distribute our apps, especially when they are command-line tools or Scenic applications.&lt;/p></description></item><item><title>Yet Another Guide To Build a JSON API with Phoenix 1.5</title><link>https://www.poeticoding.com/another-guide-to-build-a-json-api-with-phoenix-1-5/</link><pubDate>Tue, 06 Oct 2020 20:36:16 +0000</pubDate><guid>https://www.poeticoding.com/another-guide-to-build-a-json-api-with-phoenix-1-5/</guid><description>&lt;p>We are going to build a polling app step-by-step. It will be similar to &lt;a href="http://strawpoll.me/" target="_blank" rel="noopener">strawpoll.me&lt;/a> where users can create and vote on polls and see the results in real-time.&lt;/p>
&lt;figure>&lt;img src="https://www.poeticoding.com/another-guide-to-build-a-json-api-with-phoenix-1-5/aa_strawpoll.png" alt="" loading="lazy" width="1398" height="606">&lt;/figure>&lt;p>In this blogpost we will only create the basic version of this app and in later blog posts we will add more features like authentication, ip blocking, different voting types and more.&lt;/p></description></item><item><title>LiveView click event and offsetX, offsetY coordinates</title><link>https://www.poeticoding.com/liveview-click-event-and-offsetx-offsety-coordinates/</link><pubDate>Thu, 19 Mar 2020 17:05:47 +0000</pubDate><guid>https://www.poeticoding.com/liveview-click-event-and-offsetx-offsety-coordinates/</guid><description>&lt;p>&lt;a href="https://www.poeticoding.com/how-to-setup-phoenix-liveview/">Phoenix LiveView&lt;/a> plays fantastically well with SVG elements, making really easy to render dynamic images, without writing any JavaScript code.&lt;/p>
&lt;p>There are different &lt;a href="https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.html#module-bindings" target="_blank" rel="noopener">bindings&lt;/a> we can use to register and react to user interaction, one of these is &lt;code>phx-click&lt;/code>. By adding &lt;code>phx-click=&amp;quot;clicked&amp;quot;&lt;/code> attribute to an element in our LiveView, when user clicks the element, a &lt;code>&amp;quot;clicked&amp;quot;&lt;/code> event is sent to the LiveView process.&lt;/p></description></item><item><title>Phoenix LiveView JavaScript Hooks and Select2</title><link>https://www.poeticoding.com/phoenix-liveview-javascript-hooks-and-select2/</link><pubDate>Wed, 05 Feb 2020 11:48:10 +0000</pubDate><guid>https://www.poeticoding.com/phoenix-liveview-javascript-hooks-and-select2/</guid><description>&lt;p>&lt;a href="https://www.poeticoding.com/using-select2-with-phoenix-liveview/">We&amp;rsquo;ve already played with Select2 and LiveView&lt;/a>, it was before the release of &lt;a href="https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.html#module-js-interop-and-client-controlled-dom" target="_blank" rel="noopener">LiveView JS Hooks&lt;/a>. To make select2 work with LiveView we had to listen to &lt;code>phx:update&lt;/code> generic javascript events, re-initialize select2 and use a workaround to push events from the browser to LiveView.&lt;/p></description></item><item><title>Real-time Object Detection with Phoenix and Python</title><link>https://www.poeticoding.com/real-time-object-detection-with-phoenix-and-python/</link><pubDate>Thu, 16 Jan 2020 18:43:14 +0000</pubDate><guid>https://www.poeticoding.com/real-time-object-detection-with-phoenix-and-python/</guid><description>&lt;p>This article is not just about Machine Learning and Object Detection, it&amp;rsquo;s about Elixir interoperability and how we can take advantage of the Python&amp;rsquo;s fantastic set of ML libraries, bringing their features into the Elixir world.&lt;/p>
&lt;p>We see how to bring &lt;a href="https://pjreddie.com/darknet/yolo/" target="_blank" rel="noopener">YOLO&lt;/a>, a state-of-the-art real-time object detection system, in a Phoenix web app.&lt;/p></description></item><item><title>Understanding Phoenix LiveView: build a Gallery app</title><link>https://www.poeticoding.com/understanding-liveview-build-a-gallery-app/</link><pubDate>Wed, 20 Nov 2019 17:50:13 +0000</pubDate><guid>https://www.poeticoding.com/understanding-liveview-build-a-gallery-app/</guid><description>&lt;div class="video">&lt;iframe src="https://www.youtube-nocookie.com/embed/P5TvNf65LLw" title="YouTube video" loading="lazy" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen referrerpolicy="strict-origin-when-cross-origin">&lt;/iframe>&lt;/div>

&lt;p>&lt;strong>Understanding Phoenix LiveView&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://www.poeticoding.com/how-to-setup-phoenix-liveview/">Setup&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.poeticoding.com/the-primitives-of-phoenix-liveview/">The Primitives&lt;/a>&lt;/li>
&lt;li>Building a Gallery app (this article)&lt;/li>
&lt;/ul>
&lt;p>In the previous articles we&amp;rsquo;ve seen &lt;a href="https://www.poeticoding.com/how-to-setup-phoenix-liveview/">how to setup Phoenix LiveView&lt;/a> and &lt;a href="https://www.poeticoding.com/the-primitives-of-phoenix-liveview/">built a counter&lt;/a> (which is like the &amp;ldquo;Hello World&amp;rdquo; code example in the LiveView world). We’ve also taken a look at the &lt;a href="https://www.poeticoding.com/the-primitives-of-phoenix-liveview/">live-cycle&lt;/a>, inspecting websocket messages, having a glimpse of how the things work under the hood.&lt;/p></description></item><item><title>The Primitives of Phoenix LiveView</title><link>https://www.poeticoding.com/the-primitives-of-phoenix-liveview/</link><pubDate>Tue, 12 Nov 2019 16:30:21 +0000</pubDate><guid>https://www.poeticoding.com/the-primitives-of-phoenix-liveview/</guid><description>&lt;div class="video">&lt;iframe src="https://www.youtube-nocookie.com/embed/gPSXxtgmyB8" title="YouTube video" loading="lazy" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen referrerpolicy="strict-origin-when-cross-origin">&lt;/iframe>&lt;/div>

&lt;p>&lt;strong>Understanding Phoenix LiveView&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://www.poeticoding.com/how-to-setup-phoenix-liveview/">Setup&lt;/a>&lt;/li>
&lt;li>The Primitives (this article)&lt;/li>
&lt;li>&lt;a href="https://www.poeticoding.com/understanding-liveview-build-a-gallery-app/">Building a Gallery app&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>In the previous article we saw &lt;a href="https://www.poeticoding.com/how-to-setup-phoenix-liveview/">how to setup Phoenix LiveView&lt;/a>, in order to have everything we need to build a simple LiveView &lt;em>gallery app&lt;/em>.&lt;/p></description></item><item><title>How to Setup Phoenix LiveView</title><link>https://www.poeticoding.com/how-to-setup-phoenix-liveview/</link><pubDate>Tue, 29 Oct 2019 17:18:48 +0000</pubDate><guid>https://www.poeticoding.com/how-to-setup-phoenix-liveview/</guid><description>&lt;p>&lt;em>Updated for LiveView &lt;strong>0.11.0 - 7th April 2020&lt;/strong>&lt;/em>&lt;/p>
&lt;p>&lt;strong>Understanding Phoenix LiveView&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Setup &lt;em>(this)&lt;/em>&lt;/li>
&lt;li>&lt;a href="https://www.poeticoding.com/the-primitives-of-phoenix-liveview/">The Primitives&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.poeticoding.com/understanding-liveview-build-a-gallery-app/">Build a Gallery app&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>&lt;a href="https://github.com/phoenixframework/phoenix_live_view" target="_blank" rel="noopener">Phoenix LiveView&lt;/a> has been released on &lt;a href="https://hex.pm/packages/phoenix_live_view" target="_blank" rel="noopener">Hex&lt;/a>! Although it&amp;rsquo;s still not a stable release (at the time of writing &lt;strong>0.11.0&lt;/strong>), it works really well and it&amp;rsquo;s packed of cool features.&lt;/p></description></item><item><title>Phoenix LiveView live_link</title><link>https://www.poeticoding.com/phoenix-liveview-live_link/</link><pubDate>Wed, 26 Jun 2019 14:45:03 +0000</pubDate><guid>https://www.poeticoding.com/phoenix-liveview-live_link/</guid><description>&lt;div class="video">&lt;iframe src="https://www.youtube-nocookie.com/embed/MIKMZpPPuMI" title="YouTube video" loading="lazy" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen referrerpolicy="strict-origin-when-cross-origin">&lt;/iframe>&lt;/div>

&lt;p>In &lt;a href="https://www.poeticoding.com/phoenix-liveview-change-the-url-without-refreshing-the-page/">the previous article focused on &lt;code>live_redirect&lt;/code>&lt;/a>, we&amp;rsquo;ve seen how in Phoenix LiveView we can change the URL without changing the location or refreshing the page. In this way we can keep the URL updated with the current page state, making easier for the user to bookmark or share it.&lt;/p></description></item><item><title>Phoenix LiveView - Change the URL without refreshing the page</title><link>https://www.poeticoding.com/phoenix-liveview-change-the-url-without-refreshing-the-page/</link><pubDate>Wed, 19 Jun 2019 16:11:17 +0000</pubDate><guid>https://www.poeticoding.com/phoenix-liveview-change-the-url-without-refreshing-the-page/</guid><description>&lt;div class="video">&lt;iframe src="https://www.youtube-nocookie.com/embed/Dad1mKexvu8" title="YouTube video" loading="lazy" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen referrerpolicy="strict-origin-when-cross-origin">&lt;/iframe>&lt;/div>

&lt;p>It&amp;rsquo;s now possible to try the &lt;em>pushState&lt;/em> support available in Phoenix LiveView (which, remember, is still in beta)&lt;/p>
&lt;figure>&lt;img src="https://www.poeticoding.com/phoenix-liveview-change-the-url-without-refreshing-the-page/liveview_pushstate_github_commit.png" alt="Add live_link and live_redirect for push state support" loading="lazy" width="700" height="200">&lt;figcaption>Add live_link and live_redirect for push state support&lt;/figcaption>&lt;/figure>&lt;h4 id="what-is-pushstate-and-why-can-be-useful">What is &lt;em>pushState&lt;/em> and why can be useful?&lt;/h4>
&lt;p>With Phoenix LiveView we can easily update parts of the page without having to change the location, refreshing the page or directly use JavaScript.&lt;/p></description></item><item><title>Add a Progress Bar in the Phoenix File Upload app</title><link>https://www.poeticoding.com/add-a-progress-bar-in-the-phoenix-file-upload-app/</link><pubDate>Wed, 29 May 2019 12:22:38 +0000</pubDate><guid>https://www.poeticoding.com/add-a-progress-bar-in-the-phoenix-file-upload-app/</guid><description>&lt;ul>
&lt;li>Part 1: &lt;a href="https://www.poeticoding.com/step-by-step-tutorial-to-build-a-phoenix-app-that-supports-user-uploads/">Step-by-Step Tutorial to Build a Phoenix App that Supports User Upload&lt;/a>&lt;/li>
&lt;li>Part 2: &lt;a href="https://www.poeticoding.com/creating-thumbnails-of-uploaded-images-and-pdf-in-phoenix/">Creating Thumbnails of uploaded Images and PDF in Phoenix&lt;/a>&lt;/li>
&lt;li>Part 3: this article&lt;/li>
&lt;/ul>
&lt;p>In the previous two parts we&amp;rsquo;ve seen how to create a Phoenix application with a multipart upload form, that creates thumbnails of images and PDF.&lt;/p></description></item><item><title>Creating Thumbnails of uploaded Images and PDF in Phoenix</title><link>https://www.poeticoding.com/creating-thumbnails-of-uploaded-images-and-pdf-in-phoenix/</link><pubDate>Wed, 15 May 2019 18:28:04 +0000</pubDate><guid>https://www.poeticoding.com/creating-thumbnails-of-uploaded-images-and-pdf-in-phoenix/</guid><description>&lt;ul>
&lt;li>Part 1: &lt;a href="https://www.poeticoding.com/step-by-step-tutorial-to-build-a-phoenix-app-that-supports-user-uploads/">Step-by-Step Tutorial to Build a Phoenix App that Supports User Upload&lt;/a>&lt;/li>
&lt;li>Part 2: this article&lt;/li>
&lt;li>Part 3: &lt;a href="https://www.poeticoding.com/add-a-progress-bar-in-the-phoenix-file-upload-app/">Add a Progress Bar in the Phoenix File Upload app&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>In &lt;a href="https://www.poeticoding.com/step-by-step-tutorial-to-build-a-phoenix-app-that-supports-user-uploads/">Step-by-Step Tutorial to Build a Phoenix App that Supports User Upload&lt;/a> we&amp;rsquo;ve built from scratch a Phoenix application where users can upload and download their files. We saw how to deal with uploads, saving them locally, using Ecto and Postgres database to save file&amp;rsquo;s details like size, filename, hash etc.&lt;/p></description></item><item><title>Dealing with long-running HTTP Requests and Timeouts in Phoenix</title><link>https://www.poeticoding.com/dealing-with-long-running-http-requests-and-timeouts-in-phoenix/</link><pubDate>Wed, 01 May 2019 18:36:58 +0000</pubDate><guid>https://www.poeticoding.com/dealing-with-long-running-http-requests-and-timeouts-in-phoenix/</guid><description>&lt;p>Phoenix is fast and highly concurrent and it can process HTTP requests in less than a millisecond. It is our priority to serve the requests as fast as possible, but the reality is that sometimes processing a request can take too long. This forces Phoenix to trigger a timeout and close the connection.&lt;/p></description></item><item><title>Step-by-Step Tutorial to Build a Phoenix App that Supports User Upload</title><link>https://www.poeticoding.com/step-by-step-tutorial-to-build-a-phoenix-app-that-supports-user-uploads/</link><pubDate>Wed, 17 Apr 2019 15:00:23 +0000</pubDate><guid>https://www.poeticoding.com/step-by-step-tutorial-to-build-a-phoenix-app-that-supports-user-uploads/</guid><description>&lt;ul>
&lt;li>Part 1: this article&lt;/li>
&lt;li>Part 2: &lt;a href="https://www.poeticoding.com/creating-thumbnails-of-uploaded-images-and-pdf-in-phoenix/">Creating Thumbnails of uploaded Images and PDF in Phoenix&lt;/a>&lt;/li>
&lt;li>Part 3: &lt;a href="https://www.poeticoding.com/add-a-progress-bar-in-the-phoenix-file-upload-app/">Add a Progress Bar in the Phoenix File Upload app&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>There are many ways to let users upload their files to our Phoenix app, including reliable libraries that manage the uploads for us, saving the files securely on cloud storage.&lt;/p></description></item><item><title>Connecting Elixir Nodes with libcluster, locally and on Kubernetes</title><link>https://www.poeticoding.com/connecting-elixir-nodes-with-libcluster-locally-and-on-kubernetes/</link><pubDate>Wed, 06 Feb 2019 12:57:02 +0000</pubDate><guid>https://www.poeticoding.com/connecting-elixir-nodes-with-libcluster-locally-and-on-kubernetes/</guid><description>&lt;div class="video">&lt;iframe src="https://www.youtube-nocookie.com/embed/FARtObrKr5I" title="YouTube video" loading="lazy" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen referrerpolicy="strict-origin-when-cross-origin">&lt;/iframe>&lt;/div>

&lt;p>In the last few articles we saw how to make our Phoenix chat app distributed; at the beginning with Redis, and after with distributed Elixir connecting the nodes together.&lt;/p>
&lt;p>We had just one problem; we had to manually connect to the nodes in the IEX console. This is an issue in production. In this video we will see how to automatically cluster the Phoenix chat nodes using the libcluster library locally, and on a Kubernetes cluster with a dynamic number of nodes.&lt;/p></description></item><item><title>Distributed Phoenix Chat with PubSub PG2 adapter</title><link>https://www.poeticoding.com/distributed-phoenix-chat-with-pubsub-pg2-adapter/</link><pubDate>Wed, 30 Jan 2019 16:44:08 +0000</pubDate><guid>https://www.poeticoding.com/distributed-phoenix-chat-with-pubsub-pg2-adapter/</guid><description>&lt;p>In this article we&amp;rsquo;ll see how to cluster the Phoenix Chat nodes, using a really powerful functionality embedded in BEAM (the Elixir/Erlang VM), for easily communicate between Elixir nodes. We&amp;rsquo;ll then see how &lt;code>pg2&lt;/code> works and inspect how Phoenix efficiently broadcasts the messages in a distributed chat app.&lt;/p></description></item><item><title>Distributed Phoenix Chat using Redis PubSub</title><link>https://www.poeticoding.com/distributed-phoenix-chat-using-redis-pubsub/</link><pubDate>Wed, 23 Jan 2019 18:21:34 +0000</pubDate><guid>https://www.poeticoding.com/distributed-phoenix-chat-using-redis-pubsub/</guid><description>&lt;p>In the previous article, &lt;a href="https://www.poeticoding.com/create-a-high-availability-kubernetes-cluster-on-aws-with-kops/">Create a High-Availability Kubernetes Cluster on AWS with Kops&lt;/a>, we have seen how to create a Kubernetes cluster and how to deploy the Phoenix Chat app. The single node configuration worked well, but when we tried to scale out we saw that the messages were not sent to all the browsers.&lt;/p></description></item><item><title>Create a High-Availability Kubernetes Cluster on AWS with Kops</title><link>https://www.poeticoding.com/create-a-high-availability-kubernetes-cluster-on-aws-with-kops/</link><pubDate>Wed, 16 Jan 2019 14:58:56 +0000</pubDate><guid>https://www.poeticoding.com/create-a-high-availability-kubernetes-cluster-on-aws-with-kops/</guid><description>&lt;p>This article has a bit more of DevOps flavour than the previous articles, focused more on Elixir. In this article I show how to easily run a multi-zone Kubernetes cluster on AWS, where we&amp;rsquo;ll deploy a Phoenix Chat application.&lt;/p>
&lt;p>There are many ways to deploy a Kubernetes cluster on AWS (Amazon Web Services). At the moment, AWS offers &lt;a href="https://aws.amazon.com/eks/" target="_blank" rel="noopener">EKS, Elastic Kubernetes Service&lt;/a>, which helps us deploy and manage our Kubernetes clusters. It costs $0.20/hr, which is $144/month: that&amp;rsquo;s not cheap actually, especially if we want to run a small cluster. And it’s not just about the cost: I find EKS still too young, preferring &lt;strong>kops&lt;/strong> over it.&lt;/p></description></item></channel></rss>