AJAX SSR

A short history of AJAX and SSR

My journey in programming began over two decades ago, a time when JavaScript was a far cry from its current state, and developers were primarily focused on Microsoft Internet Explorer. One of my proudest achievements back then was writing a few lines of code that allowed users to add and remove table rows entirely on the client side. We called it DHTML. Many developers today have forgotten about it—or never knew it existed. A few years later, AJAX emerged, revolutionizing the way we approached

DRY configuration Apache APISIX

DRY your Apache APISIX config

DRY is an important principle in software development. This post will show you how to apply it to Apache APISIX configuration. The DRY principle 'Don’t repeat yourself' (DRY) is a principle of software development aimed at reducing repetition of information which is likely to change, replacing it with abstractions that are less likely to change, or using data normalization which avoids redundancy in the first place. — https://en.wikipedia.org/wiki/Don%27t_repeat_yourself[Wiki

Apache APISIX plugin good practice

When (not) to write an Apache APISIX plugin

When I introduce Apache APISIX in my talks, I mention the massive number of existing plugins, and that each of them implements a specific feature. One of the key features of Apache APISIX is its flexibility. If a feature is missing, you can create your own plugin in Lua or a language compiled into Wasm, showcasing the platform’s adaptability to your specific needs. In this post, I aim to provide practical alternatives to writing a custom plugin, offering solutions you can quickly implement

kotlin coroutines opentelemetry

Kotlin Coroutines and OpenTelemetry tracing

I recently compared three OpenTelemetry approaches on the JVM: Java Agent v1, v2, and Micrometer. I used Kotlin and coroutines without overthinking. I received interesting feedback on the usage of @WithSpan with coroutines: Nice one..by the way to instrument the coroutine context properly, don't we need "opentelemetry-extension-kotlin" also? Without that, spans are not recorded properly for suspend functions (https://t.co/DSgJklnllD) pic.twitter.com/5wDwhYhoDM— Suresh G (@sur

OpenTelemetry tracing Spring Boot Java Agent micrometer

OpenTelemetry Tracing on Spring Boot, Java Agent vs. Micrometer Tracing

My demo of OpenTelemetry Tracing features two Spring Boot components. One uses the Java agent, and I noticed a different behavior when I recently upgraded it from v1.x to v2.x. In the other one, I’m using Micrometer Tracing because I compile to GraalVM native, and it can’t process Java agents. I want to compare these three different ways in this post: Java agent v1, Java agent v2, and Micrometer Tracing. The base application and its infrastructure I’ll use the same base ap

Apache APISIX free tier

Free tier API with Apache APISIX

Lots of service providers offer a free tier of their service. The idea is to let you kick their service’s tires freely. If you need to go above the free tier at any point, you’ll likely stay on the service and pay. In this day and age, most services are online and accessible via an API. Today, we will implement a free tier with Apache APISIX. A naive approach I implemented a free tier in my post Evolving your RESTful APIs, a step-by-step approach, albeit in a very naive way. I cop

Apache APISIX rate limiting consumer consumer groups

Differentiating rate limits in Apache APISIX

In my talk Evolving your APIs, I mention that an API Gateways is a Reverse Proxy 'on steroids'. One key difference between the former and the latter is that the API Gateway is not unfriendly to business logic. The poster child is rate-limiting. Rate-limiting is an age-old Reverse Proxy feature focused on protecting against DDoS attacks. It treats all clients the same and is purely technical. In this day and age, most API providers offer different subscription tiers; the higher the tier, the hig

Apache APISIX URL

Advanced URL rewriting with Apache APISIX

I spoke at Swiss PgDay in Switzerland in late June. The talk was about how to create a no-code API with the famous PostgreSQL database, the related PostgREST, and Apache APISIX, of course. I already wrote about the idea in a previous post. However, I wanted to improve it, if only slightly. PostgREST offers a powerful SELECT mechanism. To list all entities with a column equal to a value, you need the following command: curl /products?id=eq.1 id is the columneq.1 corresponds to the WHERE cla