Systems | Development | Analytics | API | Testing

AppSignal

Debugging and Tracing in Erlang

In part one of this series, the debugging tools we used — Elixir's IO.inspect/2, IEx.pry, and dbg/2 — required us to insert changes into code directly. Outside the development environment, you probably won't (and shouldn't) have access to your code. Erlang has a few tools to debug code at runtime: :debugger, :dbg.tracer, and :observer. First, let's look at the:debugger, a graphical debugging tool. Let's get going!

A Guide to Memoization in Ruby

Memoization is a caching technique to make your Ruby application run more efficiently and faster. In this post, we'll look at the benefits of memoization and when to use it in your Ruby application. We'll also look at some memoization mistakes to avoid. Let's first start by looking at code optimization — what it is and some of the different optimization techniques available.

How to Cache Locally in Elixir with Nebulex

In an Elixir application, you might need to access certain data frequently, which can be costly. The access time involved in retrieving data at every step can cause high latency, or even make the application crash (due to an increased workload on the database). Caching is the best technique to store the most frequently accessed data and minimize database data retrieval, improving the overall performance of the application.

Database Performance Optimization and Scaling in Rails

Web applications usually rely heavily on databases, for the most part. And as applications grow, databases grow too. We keep scaling web servers and background workers to keep up with the heavy load. But eventually, the database needs to keep up with all the new connections from these processes. One way to tackle this is to grow a database with an app using vertical scaling. This means adding more CPU power and memory to the database server. But this is usually slow.

A First Look at Hanami 2 for Ruby

As of today (06/12/2022), Hanami 2.0.1 has been released. Read more about the enhancements, bug fixes and gems in release 2.0.1. Hanami 2 was released on 22 November, concluding four years of work on this version. It brings a breath of fresh air into Ruby's web development community. Version 2.0 is not just an incremental upgrade. One could say it's a project written anew, with bright ideas from version one rebuilt on top of a solid dry-rb libraries ecosystem.

Optimize Your AWS Lambdas with TypeScript

Last time in this series, we looked at improving the developer experience. As your Lambda function gains more features and dependencies, you may notice that the bundle size begins to grow exponentially. This can negatively affect deployments and cold starts. A bigger bundle means deployments take longer to upload to the AWS cloud. The JavaScript engine has more work to do before it can execute the Lambda function. In this take, we will focus on optimizing our Lambda function.

Debugging in Elixir and Erlang: An Introduction

Welcome to part one of this two-part series on debugging in Elixir and Erlang. In this post, we'll use several different tools and techniques to debug Elixir code. First, we'll get to know the demo project I created to showcase certain tools: dist_messenger. It's an Elixir project of a distributed messaging system that can be used directly on IEx. It allows users in different nodes to send and receive messages to each other.

System Notifications with Noticed and CableReady in Rails

Notifications are a typical cross-cutting concern shared by many web applications. The Noticed gem makes developing notifications fantastically easy by providing a database-backed model and pluggable delivery methods for your Ruby on Rails application. It comes with built-in support for mailers, websockets, and a couple of other delivery methods. We'll also examine the merits of using the CableReady gem for triggering system notifications in your Ruby on Rails application. Let's get into it!