Systems | Development | Analytics | API | Testing

AppSignal

How to Use Shoulda Matchers with RSpec for Ruby on Rails

When writing tests in Rails, you should avoid repetition and have the right amount of tests to satisfy your use case. This article will introduce you to shoulda-matchers with RSpec for testing functionality in Rails. At the end of the post, you should feel confident about using shoulda-matchers in your Rails application. Let's get going!

Advanced Multi-tenancy for Elixir Applications Using Ecto

Welcome to part two of this series. In the previous tutorial, we learned about multi-tenancy, including different multi-tenancy implementation strategies. We also started building a multi-tenant Phoenix link shortening app and added basic user authentication. In this final part of the series, we'll build the link resource, associate users to links, and set up the redirect functionality in our app.

Keep Your Ruby Code Maintainable with Money-Rails

When working with money in an application, ensuring everything is accounted for is important. In this post, we will explore some common methods and best practices of handling money in your Ruby app, and see how you can use money-rails to write maintainable money-handling code. Let's get started!

Shaping the Future of Ruby and Kafka Together with rdkafka-ruby

Hello there! My name is Maciej Mensfeld, and some of you might recognize me from my involvement in RubyGems Security, OSS commitments, or perhaps from Karafka: a multi-threaded, efficient Kafka processing framework tailored for Ruby and Rails. While I generally pen my thoughts on my personal blog, today's post is unique. This article results from a collaborative effort with the brilliant people over at AppSignal. To set the record straight, I don't work for AppSignal.

Setting Up a Multi-tenant Phoenix App for Elixir

Apps built with Elixir can support massive scalability, real-time interactivity, great fault tolerance, and the language's syntax is actually a joy to use. Elixir is a natural fit for applications such as chat apps, data dashboard apps, and anything needed to support a large userbase. In this article, we'll use Elixir — specifically, the web framework Phoenix — to build a multi-tenant link shortening app. Let's get started!

How to Optimize MongoDB Performance for Node.js

To update a document in MongoDB, I used to fetch it, update the values, and save back the entry. I would question the need for an update method. Looking back, it's evident that performance optimizations were hardly a concern when working on a personal project. Working with a larger dataset is a whole different story, though. This is where no-code tools can't help. In this article, I'll share some of my learnings when it comes to working in MongoDB with millions of documents.

Handle Incoming Webhooks with LiteJob for Ruby on Rails

In parts one and two of this series, we only dealt with the pure CRUD aspects of using SQLite as a production database. In this post, we will explore the world of queue mechanisms, using SQLite as the pub/sub adapter for ActiveJob. Let's make use of LiteJob to handle incoming webhooks in our Rails application.

How to Use Timeouts in Node.js

Because of the asynchronous nature of Node.js, it's crucial you set timeouts to ensure the responsiveness of your application. Node.js timeouts help prevent indefinite waiting and let your backend handle situations where tasks take longer than expected. Thanks to timeouts, you can control the maximum duration allowed for incoming and outgoing requests. In this article, we'll look at the different types of timeouts and how to set them in vanilla Node.js and Express.

Validating Data in Elixir: Using Ecto and NimbleOptions

In the previous part of this series about validating data at the boundary of an Elixir application, we covered a few general programming tactics to try and reject invalid and unexpected data in our software. Continuing with that subject, we'll now explore how two libraries, namely Ecto and NimbleOptions, can further assist us. Let's get started!

What Do Deno and Bun Bring to the Table?

Deno and Bun are two JavaScript runtime newcomers that aim to undermine Node.js. These alternatives have gained popularity for their innovative approach to server-side development with JavaScript. But the real question is: what do they bring to the table compared to Node.js? In this post, you'll learn what Deno and Bun are, what they offer, and how they address some long-standing drawbacks in Node.js. We'll shed light on specific use cases where Deno and Bun excel.