Recent Posts (Ercan)
Build FFmpeg from Source with x264, x265, fdk-aac and more on MacOS
- By Ercan
- 27/10/2025
FFmpeg is one of the most powerful open-source multimedia frameworks, capable of handling everything from simple format conversions to complex video pipelines. While pre-built binaries are convenient, compiling FFmpeg from source gives you full control over included codecs, performance optimizations, and platform-specific tweaks. In this post, we’ll walk through how to build FFmpeg 8.0 from source on macOS, linking it statically against essential libraries like x264, x265, fdk-aac, libvpx, opus, freetype and OpenSSL. This setup ensures maximum codec compatibility, secure streaming sup..
Building ImageMagick from Source with HEIF, WebP, and Modern Codecs on macOS
- By Ercan
- 27/10/2025
If you’ve ever tried to compile ImageMagick with full codec support (HEIF, WebP, PNG, JPEG, TIFF, etc.) on macOS, you know it’s not a trivial task. Precompiled binaries often lack optional delegates like HEIF or WebP due to licensing and dependency complexity. In this post, we’ll walk through the process of building ImageMagick entirely from source, including all the required libraries and codecs. 1. Why Build from Source? Building from source gives you: ✅ Full control over which codecs and features are included. ⚙️ Compatibility with your system architecture (Apple Silicon o..
Trying MySQL MEMORY Tables as a Simple Cache (and Failing Spectacularly)
- By Ercan
- 26/10/2025
Sometimes you want a quick in-app cache without adding Redis or Hazelcast. MySQL MEMORY tables look promising: “RAM-resident, fast, simple”. Curious, I decided to test it myself on a local development environment. Environment MySQL Server: 9.5.0 (Homebrew, default settings except max_heap_table_size) Local machine: MacBook Pro 15-inch, 2019, 2.3 GHz 8-Core Intel Core i9-9880H, 16 GB RAM MEMORY table max_heap_table_size: increased to 512 MB to accommodate 1 million rows Test scenario: 50 parallel threads Insert 1 million OTP tokens 50,000 read queries Benc..
String Boot Hexagonal Architecture Example
- By Ercan
- 25/10/2025
Architectural concepts like ports, adapters, domain, infrastructure frequently feel abstract when you first read about them. To move from theory to intuition I built a small, multi-module Spring Boot project: a calculator that performs addition, subtraction, multiplication and division, and logs every calculation to a database. The point of this project is not complex business logic — it’s to show how Hexagonal Architecture (aka Ports & Adapters) organizes code so the domain remains framework- and I/O-agnostic, while adapters provide concrete interfaces to the outside world (REST, SOAP,..
Spring Boot Bottom-Up SOAP Service Example
- By Ercan
- 22/10/2025
SOAP services are still widely used in enterprise systems and legacy integrations. However, new Spring Boot developers often struggle with WSDL, XSD, and Jakarta namespaces. In this blog, we will create a bottom-up SOAP service where the WSDL is automatically generated from Java classes and annotations. The project uses jaxws-spring-jakarta, a modernized SOAP runtime compatible with Spring Boot 3. TL;DR: If you want to skip the explanation and dive straight into the code, check out the full implementation on GitHub: https://github.com/ercansormaz/soap-producer-bottom-up ..
Spring Boot Command Pattern Example
- By Ercan
- 21/10/2025
The Command Pattern is one of the most versatile and widely used behavioral design patterns. It encapsulates a request as an object, allowing you to parameterize, queue, and execute actions dynamically — all without tightly coupling the caller to the actual logic being executed. In this article, we’ll explore how to apply the Command Pattern in a real-world Spring Boot project, where we execute different text encoding and decoding algorithms such as Caesar, Atbash, and ROT13. This example is designed to be both educational and practical — ideal for developers who want to deeply understan..
Spring Boot Template Method Pattern Example
- By Ercan
- 19/10/2025
Design patterns are timeless tools that bring structure and clarity to software projects. In this post, we’ll explore how to use the Template Method Pattern within a Spring Boot application — through a simple but practical example: an Email Builder API. TL;DR: If you want to skip the explanation and dive straight into the code, check out the full implementation on GitHub: https://github.com/ercansormaz/template-method-pattern What Is the Template Method Pattern? The Template Method Pattern defines the skeleton of an algorithm in a base (abstract) class and allows subclasses to redef..
Spring Boot Rate Limiting Example based on Redis
- By Ercan
- 15/10/2025
Rate limiting is one of the most fundamental building blocks in backend engineering — it protects your system from excessive requests, ensures fair usage, and prevents overload. While there are countless ways to implement it, achieving both accuracy and efficiency in a distributed environment is a more delicate challenge. In this post, I’ll share my hands-on experience building a Redis-based rate limiting system in Spring Boot, comparing five popular algorithms, and highlighting how Lua scripting can significantly improve performance and reliability. Project Overview The project, a..
Spring Boot Iterator Pattern Example
- By Ercan
- 28/09/2025
When working with multiple processing strategies—such as hashing algorithms—it is common to loop through a collection and apply each one. However, directly exposing the collection and iterating outside the component can make the code fragile and tightly coupled. This is where the Iterator Pattern comes into play. TL;DR: If you want to skip the explanation and dive straight into the code, check out the full implementation on GitHub: https://github.com/ercansormaz/iterator-pattern The Use Case: Hashing Text with Multiple Algorithms Our Spring Boot application takes a text input and re..
Spring Boot Chain of Responsibility Pattern Example
- By Ercan
- 26/09/2025
The Chain of Responsibility is a behavioral design pattern that allows us to process a request through a sequence of handlers. Each handler decides whether it can process the request or pass it along to the next handler in the chain. In this article, we will demonstrate how this pattern can be applied in a Spring Boot application to resolve which hashing algorithm was used for a given hash. TL;DR: If you want to skip the explanation and dive straight into the code, check out the full implementation on GitHub: https://github.com/ercansormaz/chain-of-responsibility-pattern Problem to ..
