Systems | Development | Analytics | API | Testing

Domains and Resources in Ash for Elixir

If you’ve been on the fence about trying the Ash Framework, this post is for you. We’re going to explore why Ash is a game changer for Elixir developers by building something complex, real, but surprisingly elegant. We’ll create AshTherapy, an AI-powered therapeutic chat service that handles conversations, messages, and user interactions — all powered by Ash. Before we go further, let’s first answer the question: what exactly is Ash?

Build an Elixir App with Cowboy

Cowboy is a small, fast, and modern HTTP server for Erlang/OTP. It particularly shines when handling multiple concurrent connections with minimal overhead. This makes it a perfect choice for building lightweight, real-time streaming services. In this article, we’ll build a tiny real-time text pub/sub server using Cowboy. Our service supports HTTP-based publishing, allowing clients to subscribe using either WebSockets or Server-Sent Events (SSE).

Deep dive into the Elixir Logger module

When your application suddenly fails at 3 AM, logs will be your best friend the next morning. But until this happens, we often treat logs as an afterthought. Sometimes there is a discussion on log levels or wording of the message, but we rarely go beyond that. After all, what's so interesting in pushing out a bunch of letters, perhaps with some additional metadata, which we will not use 95% of the time? The Elixir Logger module has us covered well. It's a solid foundation for our basic logging needs.

Batch Updates and Advanced Inserts in Ecto for Elixir

When you build Elixir applications, you'll likely encounter scenarios where you need to handle large datasets efficiently. Whether you're importing user data from a CSV file, updating thousands of product prices, or synchronizing data from external APIs, performing operations one record at a time can quickly become a performance bottleneck. In this two-part tutorial, we'll start by exploring Ecto's powerful batch update and advanced insert capabilities for handling bulk data operations.

Advanced Debugging in Elixir with IO.inspect

When writing Elixir, most developers quickly get familiar with IO.inspect as a quick way to see what's happening inside their code. But what many overlook is that IO.inspect is far more powerful than just a method that prints a variable to the console. In fact, with the right options and placement, IO.inspect can become a precise, highly targeted debugging tool, one that doesn't interrupt your program flow and works seamlessly with Elixir's functional pipelines.

Understanding Stack Traces in Elixir

If you have spent any time working with Elixir in a production setting — or even just building a side project — you've likely encountered a stack trace. Stack traces can appear intimidating at the outset, especially since Elixir's error messages are often more detailed than those in other languages. However, they are a powerful tool for understanding what went wrong in your code. Early in my Elixir journey, I found stack traces to be a bit overwhelming.

Elixir background jobs: choosing the right tool for the job

With its vast ecosystem, Elixir offers multiple solutions for running things in the background. To a newcomer or even an experienced developer, the variety of options might seem daunting. Some tools that used to be popular have fallen into the maintenance limbo, while others have emerged as default choices.

Advanced Strategies to Deploy Phoenix Applications with Kamal

In the first part of our series, we explored how Kamal simplifies Docker-based deployments while providing a cloud-like developer experience. We covered the basics of containerizing Phoenix applications, configuring Kamal, managing secrets, and implementing a CI/CD pipeline for automated deployments.

Advanced Ecto for Elixir Monitoring with AppSignal

In our previous article, we explored the basics of monitoring Ecto with AppSignal, covering everything from initial setup to tracking key metrics such as query execution time and resource consumption. We even set up custom instrumentation for database connection pools to gain deeper insights into our application's performance. However, setting up monitoring is just the first step toward maintaining a healthy, high-performing Elixir application.