Systems | Development | Analytics | API | Testing

Scheduling Background Tasks in Python with Celery and RabbitMQ

It's important and useful to schedule background tasks for your Python application. Tasks allow your app to perform time-based or long-running operations without blocking the main thread or slowing down the user-facing functionality of your app. Background tasks can be used for anything from running recurring jobs like data cleanup or reporting, to sending asynchronous emails or other notifications.

How to Use Redis with Python

When it comes to data-driven applications, developers and data engineers are always trying to balance factors such as scalability, speed, flexibility, latency, and availability. In other words, databases and infrastructure are the foundations for well-structured applications: just like bricks are for houses. This article explores Redis' data store features and includes use cases. We'll learn how to use Redis in Python with a step-by-step tutorial. Let's get started!

Deploy a Python Flask App to Render with Docker

In this tutorial, we will build a Flask app with Docker, create a background worker with Celery, and use RabbitMQ as the message broker between the two services. This (relatively) simple example will be used to demonstrate how Docker makes it easier to run multiple services and share configuration details between developers. In the last section, we will also build and optimize our app for deployment to Render, so we can avoid some of the common gotchas it is easy to fall victim to along the way!

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.

Unit Testing in NestJS for Node Using Suites (Formerly Automock)

For years, Automock was a popular framework for defining mocks and stubs in backend test environments. As technology has evolved, new methods and techniques for streamlining the simulation of dependencies in testing have emerged. That's why Automock has been succeeded by Suites, a more modern and robust library. In this article, we'll explore the transition from Automock to Suites, understand what Suites offers, and see it in action in NestJS through a complete example.

Build Custom ActiveStorage Analyzers for Ruby on Rails

In this series, we will take a close look at the architecture of ActiveStorage for Rails. In this first part, we will examine how ActiveStorage treats uploaded data and how to extend this process. The second part will explore how to augment the presentation of uploaded assets. But first, let's quickly define what ActiveStorage does.

How the Application and Request Contexts Work in Python Flask

If you have spent some time developing Flask applications, you have probably encountered terms like request, session, current_app, and g. You might even use them daily. But have you ever stopped to think about how Flask makes these seemingly global objects available exactly when you need them, especially in a multi-threaded web server environment? Well, the magic lies in Flask's context system. In this article, you will learn what contexts are in Flask and how to use them with practical examples.

Express for Node Error Handling and Tracking Done Right

Error handling might not be the most exciting aspect of web development, but it's arguably one of the most critical. When building Express applications, how you manage errors can make the difference between a robust, production-ready system and one that crumbles under real-world conditions. In this article, we'll examine Express' default error handling behavior and learn how to customize it for different scenarios.