Tech News
← Back to articles

Show HN: BreakerMachines – Modern Circuit Breaker for Rails with Async Support

read original related products more articles

BreakerMachines

The circuit breaker that went where no Ruby has gone before! ⭐

A battle-tested Ruby implementation of the Circuit Breaker pattern, built on state_machines for reliable distributed systems protection.

Quick Start

gem ' breaker_machines '

class PaymentService include BreakerMachines :: DSL circuit :stripe do threshold failures : 3 , within : 1 . minute reset_after 30 . seconds fallback { { error : "Payment queued for later" } } end def charge ( amount ) circuit ( :stripe ) . wrap do Stripe :: Charge . create ( amount : amount ) end end end

A Message to the Resistance

So AI took your job while you were waiting for Fireship to drop the next JavaScript framework?

Welcome to April 2005—when Git was born, branches were just master , and nobody cared about your pronouns. This is the pattern your company's distributed systems desperately need, explained in a way that won't make you fall asleep and impulse-buy developer swag just to feel something.

Still reading? Good. Because in space, nobody can hear you scream about microservices. It's all just patterns and pain.

... continue reading