Systems | Development | Analytics | API | Testing

AppSignal

A Guide to Load Testing Node.js APIs with Artillery

Artillery is an open-source command-line tool purpose-built for load testing and smoke testing web applications. It is written in JavaScript and it supports testing HTTP, Socket.io, and WebSockets APIs. This article will get you started with load testing your Node.js APIs using Artillery. You’ll be able to detect and fix critical performance issues before you deploy code to production.

Designing Error Messages and a Logging Strategy in Node.js

Error handling is one section of our job that we tend to neglect, especially when working on something new, interesting, or something we just need to get working. We’ll handle errors later, we say — and that’s often a big lie. But that’s not even the worst part. The problem comes when we decide to ‘quickly’ add some code to handle our errors and completely forget about the importance and relevance of a properly constructed error message.

Authorization and Policy Scopes for Phoenix Apps

Authorization (not to be confused with authentication) is vital to every application but often isn’t given much thought before implementation. The IETF Site Security Handbook defines authorization as: So, in short, authorization is about defining access policies and scoping. For example, consider a platform like Github.

What's New in Node.js 17

Node.js v17.0.0, the latest major version of the popular JavaScript runtime, has just been released. It supersedes v16 in the Current release line of the runtime. V16 is now in line to be promoted to the long-term support (LTS) channel on October 26, 2021, as it’s an even-numbered release. Despite being a relatively minor update, this release brings several refinements to the runtime, including more promisified APIs, JavaScript engine upgrades, and OpenSSL 3.0 support.

Optimistic Locking in Rails REST APIs

Imagine the following hypothetical scenario: in a rental property management system, Employee A starts editing contact info for Rental X, adding some extra phone numbers. Around the same time, Employee B notices a typo in the contact info for exactly that Rental X and performs an update. A couple of minutes later, Employee A updates Rental X’s contact info with the new phone numbers, and … the update fixing the typo is now gone! That’s definitely not great!

How to Dockerize an Existing Node.js Application

Docker is a software platform that enables packaging an application into containers. These containers represent isolated environments that provide everything necessary to run the application. Dockerizing an application refers to packaging it in a Docker image to run in one or more containers. Dockerizing an application involves specifying everything needed to run the application in a Dockerfile and then using the file to build a specialized Docker image that can be shared to multiple machines.

How to Do Live Uploads in Phoenix LiveView

The LiveView framework supports all of the most common features that Single-Page Apps must offer their users, including multipart uploads. In fact, LiveView can give us highly interactive file uploads, right out of the box. In this post, we’ll add a file upload feature to an existing Phoenix LiveView application. Along the way, you’ll learn how to use LiveView to display upload progress and feedback while editing and saving uploaded files.

Under the Hood of Macros in Elixir

Welcome back to part two of this series on metaprogramming in Elixir. In part one, we introduced metaprogramming and gave a brief overview of macros. In this part, we will explore the inner workings and behaviors of macros in more depth. As discussed in the previous post, macros are compile-time constructs in Elixir. So, before diving into how macros work, it is important to understand where macros lie within Elixir’s compilation process.