Systems | Development | Analytics | API | Testing

AppSignal

A Guide to Phoenix LiveView Assigns

Phoenix LiveView lets you develop full-stack apps with client-side interactions while mostly avoiding cross-stack hassle. Assigns, managed by the LiveView socket, are a core tool for making that happen — allowing you to store, present, and update data effortlessly and efficiently. But as they do so much, assigns come with their own complexities and may backfire if misused.

Add Feature Flags in Ruby on Rails with Flipper

Picture this scenario: you are a Rails developer and have spent the last couple of days developing that awesome feature that everyone is waiting for. It's big and complex, but it went through rigorous testing, so you are confident everything works as it should. There are deadlines to meet, so you deploy. Immediately, all hell breaks loose. Your feature straight up breaks the entire app for some of your users. It's hard to say why. No bugs showed up during testing.

Build a Data Access Layer with PostgreSQL and Node.js

The Data Access Layer (DAL) is the most critical part of any application. This is where the code integrates with an external source of truth like a database. In this take, we'll show you how to build a DAL that talks to Postgres via Node. Then we'll go into best practices like Clean Architecture and what this means in practical terms. Ready? Let’s go! First, a quick note about the code: The code will have modern niceties like TypeScript, unit tests, and will tackle potential scalability issues.

Algebraic Data Types in Elixir

Elixir is a dynamically-typed language. Types in Elixir are checked when a program runs, not when it compiles. If they don’t match up, an exception is thrown. In statically-typed languages, types are checked during compile time. This can help us write code that is correct, understandable, and refactorable. But it also introduces a certain focus on types as the foundation for your application. One interesting concept is to use types to model your business domain.

An Introduction to Polymorphism in Ruby on Rails

If you have ever spent time building an Object-Oriented Program (OOP), you have likely used polymorphism in your application or, at the very least, heard the term. It’s the kind of word you’d expect to see in a science or computer science textbook. You may have spent time researching polymorphism and even implemented it in your application without clearly understanding the concept. This article will give you a greater understanding of polymorphism, specifically in Ruby on Rails.

Livebook for Elixir: Just What the Docs Ordered

While initially conceived as a tool for data exploration (much like Jupyter for Python), Livebook has deservedly become a sensation in the Elixir community. It has been fantastic to see all the wonderful ways teams are leveraging Livebook for a range of different use cases. We have seen Livebooks being used to: Livebooks have also been used as the default REPL interface for project development.

Using Scientist to Refactor Critical Ruby on Rails Code

Ask any software engineer to review key portions of production code, and inevitably, they will point out three things that need to be refactored. So why does so much bad, brittle, or misunderstood code remain running in production? The answer is simple: engineers are afraid to touch it. Refactoring tasks get identified and added to the backlog, but rarely make it into the current sprint. There are numerous reasons for this.

How We Improved Table Performance in AppSignal - Back-end Changes

In our last development cycle, we spent time improving our table performance in AppSignal. As customers stay around for longer, data starts piling up. A view with just 10 items in the beginning gathers hundreds of items, and keeps growing. Besides filtering data in the front-end to reduce the returned data, we wanted to ensure our data could keep growing without timeouts in our GraphQL API or slow-loading pages in our app.

A Guide to Event-Driven Architecture in Elixir

In this post, we will explore how event-driven architecture can make your app more responsive for users and decouple your modules for a better developer experience. We will also look at several methods of implementing event-driven architecture with Elixir. Elixir is particularly good for this because of the advanced and concise message-passing APIs that it offers and BEAM's outstanding support for concurrency. But first: what is event-driven architecture, exactly?

Bootstrapping with Ruby on Rails Generators and Templates

Rails' batteries-included approach is one of its greatest assets. No other framework makes it so effortless to get your application off the ground quickly, at least partially due to Rails' generators. If you've used Rails for any amount of time, you have come across generators. Need to create a new application? Run rails new. Need to scaffold a bunch of new models and views? Run rails generate scaffold. There are dozens more available to help you get started rapidly or streamline your workflow.