JSON API Auth with Plug

In this episode we’ll use Plug to restrict access to our JSON API unless the request includes a valid API key.

https://elixircasts.io/json-api-authentication-with-plug

Thinking Elixir News 170

Episode 170 of Thinking Elixir. News this week includes the release of ElixirConf 2023 video playlist featuring keynote videos, a guide on Web Application Security Best Practices for BEAM languages from the EEF Security Working Group, the release of NextLS v0.12 with exciting new features, and a new library to integrate the JavaScript all-in-one toolkit, Bun with Phoenix. A new LangChain library makes it easy to integrate Elixir applications with an LLM like ChatGPT. Regarding the open source community, we discuss the major update in the Lodash JS project, the latest PostgreSQL 16 release, and a noteworthy article from ZigLang on bounties potentially damaging open source projects, and more!

https://podcast.thinkingelixir.com/170

An Introduction to Exceptions in Elixir

Let’s dive into how you can handle exceptions in Elixir: https://blog.appsignal.com/2023/09/26/an-introduction-to-exceptions-in-elixir.html

How to use Async Assigns?

LiveView 0.20.0 is out - and so are Async Assigns!

Meet your new friends assign_async and async_result

Learn to use them and how they work under the hood

https://johnelmlabs.com/posts/async-assigns

https://twitter.com/JohnElmLabs/status/1705303201849708876

Building a replicated cache in 65 lines using ConCache and Phoenix.PubSub

In the realm of software development, we often stand on the shoulders of giants. Abstractions layer upon abstractions as we harness powerful tools crafted by others. Today, we’ll delve into two such tools: ConCache and Phoenix.PubSub.

ConCache is a lightweight, performant caching library on top of ETS. But it is confined to a single Elixir node. Phoenix.PubSub is a Publisher/Subscriber service that lets you broadcast messages to all nodes of your Elixir cluster. Building on the two libraries, we can create a replicated cache in only 65 lines of code.

https://www.zweitag.de/blog/building-a-replicated-cache-in-65-lines-using-concache-and-phoenix-pubsub

Real-valued intervals with support for the Enumerable protocol

https://github.com/acalejos/exterval

Elixir/Phoenix Web Security Guide Released by EEF

Secure your Phoenix application with this new guide from the EEF.

https://paraxial.io/blog/phoenix-security

Async Elixir book

Hey Elixir Enthusiasts!

I’ve got something cool for you. It’s a free book on Elixir that dives into the nitty-gritty of concurrency and processes. Perfect if you already know the basics of Elixir and want to learn more about concurrency and processes in elixir. Check it out at Async Elixir Book https://github.com/Arp-G/async-elixir

Elixir Streams |> Types Operator Precedence

The Elixir types paper talks about operator precedence.

I thought it was interesting how it changes how we read type signatures when we have combinations of not, and, or, and other type constructors.

Check it out!

👉 Elixir Streams |> Types Operator Precedence

Understanding Process Restart Strategies: Transient, Temporary, and Permanent

In today’s world, building software systems that can gracefully handle failures and maintain uninterrupted operation is crucial. These process restart strategies, including permanent, temporary, and transient, play a pivotal role in ensuring system reliability and resilience.

#MyElixirStatus #elixirlang #elixir #erlang

https://dev.to/herminiotorres/understanding-process-restart-strategies-transient-temporary-and-permanent-1eac

The elixir-tools Update Vol. 3

https://www.elixir-tools.dev/news/the-elixir-tools-update-vol-3/

Thinking Elixir News 169

Episode 169 of Thinking Elixir. News covers the conclusion of ElixirConf US 2023 with key highlights being Chris McCord’s keynote on improved Phoenix debugging tools, and Jose Valim’s keynote introducing the “Strong Arrows” concept for handling dynamic types. Looking forward, the next ElixirConf will take place in Lisbon, EU in April 2024, followed by ElixirConf US 2024 at SeaWorld. Alex Koutmos points us towards a valuable resource on Erlang.org about efficiencies and performance myths, and a handy blog post walks you through customizing Phoenix generators, and more!

https://podcast.thinkingelixir.com/169

Announcing Beware of Dragons

This free and open-source Phoenix & LiveView book combines high fantasy elements and fundamental blocks of distributed system concepts to build a Multi-User Dungeon (MUD) rooted in Souls-like mechanics. https://kevinavignon.com/2023/09/16/beware-of-dragons-a-distributed-systems-adventure/

Observability: Reducing noise in Elixir applications

This article is aimed at experienced Elixir developers looking to improve their observability practices and build stronger experience of handling logs and exceptions. https://medium.com/wttj-tech/observability-reducing-noise-in-elixir-applications-5bd39d494101

Bun javascript integration with Phoenix

If you are using Phoenix you may be using the Esbuild integration pacakge. I’ve wrote a new package that can be used to replace Esbuild with Bun and get access to all its features. Switch from Elixir to Bun is mostly straightforward.

📦 https://hex.pm/packages/elixir_bun

Elixir Streams |> Elixir's intersection types

Elixir might be getting types. During ElixirConf, José Valim talked about some of the special challenges in creating types for Elixir.

One of the things he mentioned is the need for an intersection type when we might think a union type would suffice for multiple function heads.

I was a little confused by it, so I did a little more digging. Let me show you why we need that type!

👉 https://www.elixirstreams.com/tips/elixir-intersection-types

Managing Timeouts in GenServer in Elixir: How to Control Waiting Time in Critical Operations

Elixir’s GenServer is a crucial component for building concurrent, fault-tolerant systems. GenServers allow you to create concurrent processes that can maintain internal state and respond to asynchronous messages. One of the most important and versatile options when working with GenServers is :timeout.

https://dev.to/herminiotorres/managing-timeouts-in-genserver-in-elixir-how-to-control-waiting-time-in-critical-operations-25jc

IntelliJ Elixir v16.0.0

Changelog

v16.0.0

Incompatible Changes

Enhancements

Installation Instructions

Interview with Michael Frew, Owner of Gigalixir

Go behind the scenes of Elixir’s own PaaS

https://paraxial.io/blog/michael-gigalixir

Thinking Elixir News 168

Episode 168 of Thinking Elixir. News includes a new “async” feature being added to LiveView, a new translation library called Kanta was announced, formatted logging, improved keyboard navigation in ExDocs, the Membrane framework released a pure Elixir H264 video plugin, and more!

https://podcast.thinkingelixir.com/168

Next page