How Phoenix LiveView Works

In this lesson we are going to see how LiveView really works and what happens behind the scenes when a user connects. | Continue reading


@poeticoding.com | 2 years ago

LiveView click event and offsetX, offsetY coordinates

Let's see how to use, in Phoenix LiveView, the phx-click binding along with offsetX and offsetY coordinates, which are useful to know exactly where the click happened inside an element. | Continue reading


@poeticoding.com | 4 years ago

ExAws with DigitalOcean Spaces

DigitalOcean Spaces is a cloud storage alternative to AWS S3. Since Spaces is compatible with the S3 APIs, we can use the ExAws S3 library to list, put, get and delete objects, make multipart uploads and generate presigned urls. | Continue reading


@poeticoding.com | 4 years ago

AWS S3 in Elixir with ExAws

We setup the AWS account, configure ExAws, put, list, get and delete objects. Upload large files with multipart uploads, generate presigned urls and process large S3 objects on the fly. | Continue reading


@poeticoding.com | 4 years ago

Understanding LiveView: Build a Gallery App

In this article we see how to build a Gallery app with Phoenix LiveView and implement an automatic slideshow with the help of :timer. | Continue reading


@poeticoding.com | 4 years ago

The Primitives of Phoenix LiveView

Focus on LiveView's primitives: the bricks we need to know to building a real-time app with this technology. We take a special look at what happens behind the scenes, understanding the LiveView Life-cycle while inspecting websocket messages and DOM updates. | Continue reading


@poeticoding.com | 4 years ago

Phoenix LiveView Live_link

How to use live_link and understand when to use live_link and when live_redirect. Inspecting the messages between LiveView and the browser. | Continue reading


@poeticoding.com | 4 years ago

Phoenix LiveView pushstate support, change the URL without refreshing the page

Phoenix LiveView pushstate support brings an easy way of changing the URL without refreshing the page. While updating parts of the page, we keep the URL updated making possible for a user to bookmark and share it the current page state. | Continue reading


@poeticoding.com | 4 years ago

Phoenix and JavaScript – Build a Progress Bar in a File-Upload App

Import jQuery in a Phoenix app. Build a progress bar while sending a multipart form with Ajax and handling JavaScript upload progress events. | Continue reading


@poeticoding.com | 4 years ago

Creating Thumbnails of Uploaded Images and PDF in Phoenix

We see how to create thumbnails of Images and PDFs in Elixir and Phoenix, using ImageMagick and Mogrify. | Continue reading


@poeticoding.com | 5 years ago

Dealing with Long-Running HTTP Requests and Timeouts in Phoenix

When processing a HTTP request takes too long, Phoenix closes the connection. We see how to simulate a long-running request and configure Cowboy timeouts. | Continue reading


@poeticoding.com | 5 years ago

Step-by-Step Tutorial to Build a Phoenix App That Supports User Uploads

A step-by-step tutorial we see in depth how to build a Phoenix app from scratch, letting users upload their files using a multipart form. We learn how to easily run PostgreSQL with Docker, to receive uploads using Plug, and how to use Ecto to store upload details into the databas … | Continue reading


@poeticoding.com | 5 years ago

Hashing Files in Elixir

What is a hash function and how to calculate the hash strings and files in Elixir, using functions in :crypto module and Elixir Streams | Continue reading


@poeticoding.com | 5 years ago

Elixir Stream and large HTTP responses: processing text (Part 2)

Part 1 – Elixir Stream to process large HTTP responses on the fly Part 2 – this article You find the code, of this and the previous article, on poeticoding/httpstream_articles GitHub repo. The code at this repo is not meant for production use, is just part of the examples of thes … | Continue reading


@poeticoding.com | 5 years ago

Connecting Elixir Nodes with Libcluster, Locally and on Kubernetes

We are going to see how to cluster Elixir and Phoenix nodes with libcluster, locally and on Kubernetes using containers. | Continue reading


@poeticoding.com | 5 years ago

Distributed Phoenix Chat with PubSub PG2 Adapter

How to cluster Phoenix Chat nodes, using distributed Elixir. We see how pg2 works and inspect how Phoenix efficiently broadcasts the messages in a distributed chat app. | Continue reading


@poeticoding.com | 5 years ago

Distributed Phoenix Chat Using Redis PubSub

In this article we'll see how to scale horizontally the Phoenix Chat app, using Redis and a Phoenix PubSub adapter. | Continue reading


@poeticoding.com | 5 years ago

Create a High-Availability Kubernetes Cluster on AWS with Kops

In this article we see how to create a High-Availability Kubernetes cluster on AWS with Kops and deploy a Phoenix Chat application. | Continue reading


@poeticoding.com | 5 years ago

Processing Large CSV Files with Elixir Streams

Elixir Streams are extremely powerful when we need to process large CSV files. Let's see the difference between a greedy and lazy approach. | Continue reading


@poeticoding.com | 5 years ago

Counting Realtime Trades – Elixir and GenServer

In this article we start to see how to aggregate these trades in real-time, using the GenServer behaviour. We'll build an aggregation process that groups and count the trades. | Continue reading


@poeticoding.com | 5 years ago

Realtime Market-Data Updates with Elixir

In this article we see how to build an Elixir application to get realtime updates from the coinbase websocket feed, handling crashes and disconnections. | Continue reading


@poeticoding.com | 5 years ago

Running Elixir in Docker Containers

In this article we see how to use Docker to run our development Elixir environment and to run multiple Elixir Nodes over a Docker bridge network. | Continue reading


@poeticoding.com | 5 years ago

Build a Simple Persistent Key-Value Store in Elixir, Using Logs – Part 2

In this part we'll do a step further, making both keys and values persistent, being able to recover the Index in the case of a failure. | Continue reading


@poeticoding.com | 5 years ago

Build a Simple Persistent Key-Value Store in Elixir, using Logs – Part 1

In this series of articles we will see the different concepts behind a key-values store (Logs, Segments, Compaction, Memtable, SSTable) implementing a simple engine in Elixir, which is a great language to build highly-concurrent and fault-tolerant architectures. | Continue reading


@poeticoding.com | 5 years ago