Welcome to your one-stop destination for all things tech! Insightful blogs, code snippets, and industry updates for developers of all levels — from Java and Spring Boot to Docker, Kafka, and AWS.
Dual Writes Are Lies: The Transactional Outbox Pattern in Spring Boot + Kafka
It’s 3 AM. A customer paid, the orders row is in your database, and the OrderCreated event never reached Kafka. The warehouse never shipped. The email never sent. Somewhere in your service there is code that looks like this: @Transactional public Order placeOrder(PlaceOrder cmd) { Order order = orderRepository.save(new Order(cmd)); // write #1 kafkaTemplate.send("orders", order.getId(), toJson(order)); // write #2 — outside the safety net return order; } Two writes. No shared atomicity. If the broker is down, if the pod gets killed, if the send times out after the commit — the database and the downstream world silently disagree, and you get to find out from an angry customer. This is the dual-write problem, and the fix is the transactional outbox pattern. ...
Replace YNAB: Self-Host Actual Budget in One Docker Container
YNAB is $14.99 a month — $180 a year — for envelope budgeting. That’s a subscription to be told where your own money went. Actual Budget is the open-source clone: same “give every dollar a job” philosophy, local-first so it works offline, and a tiny server that syncs your budget between devices. One container, zero dollars, your data never leaves your network. The math YNAB Actual Budget (self-hosted) Cost $14.99/mo ($180/yr) $0 Budgeting method Envelope Envelope Your data lives YNAB’s cloud Your /data folder Works offline Mostly Yes — local-first Bank sync Built-in, polished US/EU only (see below) Mobile apps Yes Yes (point at your server) The honest trade-off is bank sync — more on that below. Everything else is at parity or better. ...
Exactly-Once POSTs: Idempotency Keys in Spring Boot (Stripe-Style)
The client times out waiting for your POST /orders. It retries. Your server processes it twice. The customer gets charged twice, and your support queue gets a new entry titled in all caps. Stripe solved this a decade ago with one header: Idempotency-Key. The client generates a UUID, sends it with the request, and retries with the same key — Stripe guarantees one effect per key. It’s the industry reference implementation (docs, engineering blog), and there’s no reason your API can’t offer the same contract. Let’s build it. ...
One Container to Watch Them All: homelab-monitor Replaces Your Uptime + Grafana Tabs
My monitoring stack used to be five containers: Prometheus, Grafana, node-exporter, cadvisor, and an uptime checker — plus a paid UptimeRobot plan for the “is the house on fire” pings. Total maintenance burden: a weekend to set up, and a Sunday every few months when something in the pipeline silently died. homelab-monitor replaces all of it with one container. Pure Python + Flask, no agents, no Prometheus, no cloud. It does the thing most dashboards skip: per-container GPU/VRAM attribution — which container is actually squatting on your VRAM — plus power-cost tracking, multi-machine monitoring over SSH, and built-in uptime checks with push alerts. ...
Consistent Hashing, Actually Working: From Modulo to a Java Ring with Virtual Nodes
“Design a distributed cache.” You say hash(key) % N. The interviewer nods, then asks: “A node dies at 3 AM. What happens?” If your answer is “we rehash everything,” you’ve just told them your cache has a planned outage every time the cluster changes shape. This post builds the real answer — a working consistent hash ring in Java, with virtual nodes and tests — and the lineage and follow-ups that turn it into a senior-level answer. ...