ruby
ruby
software-architecture
Forget about technical debt and finally start delivering
Technical debt is not the real enemy: cognitive load is. Why messy abstractions hurt because of what they do to your brain, how the database quietly kills flow, and how to stop chasing code cleanliness for its own sake and start delivering again.
architecture
How to serve 800 million users without database sharding?
OpenAI serves over 800 million weekly ChatGPT users without database sharding. Inside the architecture: a single primary PostgreSQL, cascading read replicas, aggressive caching against thundering herds, and connection pooling pushed to its limits.
Latest
Snapshot vs Event Sourcing: Why does your system lie about the past?
Snapshot databases only show the current mess, not who knocked over the chair. Event sourcing explained through an investigation lens: anatomy of an event, state recreation as time travel, why audit tables are a dead end, and the honest cost of eventual consistency.
Zanzibar authorisation system by Google
Zanzibar is how Google authorises billions of shared resources across Drive, YouTube and Calendar. A look at its relationship-based data model, the new enemy problem that forces strict consistency, and the Leopard system that keeps checks fast.
Manager vs Leader - What is the difference between them?
Manager vs leader is not a job title question but five everyday behaviours: hoarding information vs sharing context, rules as weapons vs guardrails, handling mistakes and exits, radical honesty, and whether you want yes-men or constructive conflict.
When to use Module over Class in Ruby?
Ruby modules often beat classes for service objects: why a shell class like PasswordResetInitiator is procedural code in disguise, using a module as a toolbox, mixins instead of artificial inheritance, and Data objects for tidy parameters.
Microservices - a significant cost that may not always suit your project
Microservices promise independence and deliver network calls where method calls used to be. Why small and medium teams pay the highest price: chaos scaling instead of product scaling, lost shared context, operational overhead, and the way back to sanity.
Ruby 4.0 - a big update for its 30th birthday
Ruby 4.0 marks the language's 30th birthday with maturity instead of revolution: saner syntax for multiline conditions, faster boot with fewer requires, a maturing Ractor story, hidden performance gems, and protection against command injection.
Event sourcing vs GDPR, or how to forget in a world that remembers everything
Event sourcing meets GDPR the moment a user asks to be forgotten and your log is append-only. Crypto-shredding is the elegant answer: encrypt personal data per user, delete the key, and design system boundaries so backups and read models forget too.
Your system is not unique - The power of business archetypes
Business archetypes prove your 'unique' domain is usually a store selling something unusual. Map complex requirements onto universal building blocks: product catalogue, orders, entitlements, inventory for services, party and billing, and stop reinventing the wheel.
Pseudo-modularity - why your code will fall apart anyway
Pseudo-modularity looks like clean folders and rots underneath: a change in Products breaks Inventory tests and blocks three teams. Why noun-driven modules and a shared database create facade modularity, and what real module boundaries look like.
Party Archetype - Time for architecture that doesn't hurt
Party archetype fixes the 120-column User god object: model people and companies as parties, roles as context instead of identity, and relationships as first-class entities, so a customer who becomes a B2B partner no longer needs an is_partner flag and prayer.
Microservices are not just technology - how not to build a distributed monolith?
A distributed monolith is what you get when microservice boundaries are drawn wrong. How to design autonomous modules in three phases: business analysis for boundaries, tight communication contracts, and deployment decisions driven by real architectural drivers.
CUPID - is SOLID slowly becoming obsolete?
CUPID challenges SOLID with properties instead of rules: composable, Unix philosophy, predictable, idiomatic, domain-based. Where the decades-old principles show their age in the cloud era, what 'joyful software' means, and whether SOLID is really done.
What is the SAFe Framework? Is it a corporate trap or a savior?
SAFe explained without marketing slogans: why the Scaled Agile Framework exists, its four pillars, Agile Release Trains, the role architecture, PI Planning as the heart of the system, and the real risk of rigid agility when fifty teams try to move as one.
How to tame race conditions in read models
Race conditions in read models are the price of parallel event-driven systems. How to handle events arriving out of order: treat the read model as an anti-corruption layer, separate facts from rumours, and build projections that survive an effect arriving before its cause.
An engineering approach to modularity instead of subdomain divination
Module boundaries should come from simulation, not subdomain divination. An engineering method for DDD: optimise for modifiability, simulate realistic changes against candidate boundaries, prove the split with stable contracts, and explain it to the business.
Why your event-driven architecture may actually be a distributed monolith
Event-driven architecture with Kafka can still be a distributed monolith. The anti-patterns that get you there: CRUD sourcing, property sourcing, clickbait events, missing commands, and the fixes: rich events, outbox, internal vs external events, anti-corruption layers.
Events in distributed architecture: Are you sure you know what you're sending?
Not all events are equal: domain events, Event Carried State Transfer, notification events and the Claim Check pattern each serve a different job. A typology of what you are really sending, plus the event vs command distinction that prevents architectural chaos.
When you should NOT use messaging, or how not to make things harder for yourself
Messaging is not a default answer. When a business flow is synchronous, queues add complexity without value and message ordering becomes your biggest pitfall. How to recognise the cases where a simple synchronous call keeps the system easier to build and debug.
How to control queues and concurrency in Sidekiq?
Sidekiq capsules let you give each queue its own concurrency, so photo processing stops clogging urgent jobs and API calls stay under rate limits. A three-step setup: configure the capsule, assign the job, and call it, with configuration examples.
More than reading: an engineering approach to memorizing information without cramming
Remember what you read without cramming: an engineering approach to active reading. Why autopilot scanning wastes hours, how marginal note-taking forces real thinking, and why going slower at the beginning makes you faster at the end.