<?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/tag/phoenix/</link><description>Recent content in phoenix on Poeticoding</description><generator>Hugo</generator><language>en</language><lastBuildDate>Thu, 28 Nov 2024 18:20:25 +0000</lastBuildDate><atom:link href="https://www.poeticoding.com/tag/phoenix/index.xml" rel="self" type="application/rss+xml"/><item><title>Effortless Video Sharing with Phoenix LiveView and FLAME</title><link>https://www.poeticoding.com/effortless-video-sharing-with-phoenix-liveview-and-flame/</link><pubDate>Thu, 28 Nov 2024 18:09:06 +0000</pubDate><guid>https://www.poeticoding.com/effortless-video-sharing-with-phoenix-liveview-and-flame/</guid><description>&lt;p>As someone who loves experimenting with new technologies, I recently got the Vision Pro (I’m a big fan of VR and the idea of working in mixed reality). What excites me the most is sharing the cool stuff I discover, with my friends and colleagues, like how amazing it is to have a floating 3D model in mixed reality, built with just a few lines of Swift code.&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>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>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>