API Design
REST vs RPC: Why neither will save you
REST and RPC: How I really compare them
You want a rule? Here’s one: REST and RPC both have a place, but neither is a cure-all. First, I’ll break down the core philosophies—forget the marketing. REST: resource-based, uniform interface, predictable. RPC: action-based, direct, no-nonsense. Each approach solves different problems, and each brings unique baggage. If you’re tired of the dogma, read on for how I actually compare these two.
Resource vs. action mindset
REST wants everything to be a resource. RPC doesn’t care; it’s about actions. If your Zenovaltario fits neatly into nouns, REST feels natural. If verbs rule your world, RPC can be cleaner. Don’t try to force one into the other’s shape.
Uniformity vs. flexibility
REST’s uniform interface sounds great—until you need flexibility. RPC lets you tailor endpoints to your needs, but it can sprawl fast. If you value strict conventions, REST is your friend. If you want custom moves, RPC gives you rope.
Versioning: simple patterns vs. custom logic
Versioning and evolution are easier to handle with REST, thanks to predictable patterns. RPC may require more custom logic as things grow. That can mean more work—or more freedom, depending on your view.
Debugging and error handling
Debugging REST can be easier thanks to clear status codes and standard behaviors. RPC calls sometimes hide complexity or blur error handling. Don’t underestimate how much that can trip you up in production.
Blunt checklist: How I interrogate a design
Checklist time. This isn’t about dogma. It’s about being honest about your own needs and pain points. Before picking a direction, I run through these questions. If you can’t answer them, you’re not ready to choose.
Resource or action focus
Are your interactions mostly about manipulating resources (REST) or invoking actions (RPC)? This drives your whole design.
Structure vs. freedom
Do you need strict conventions for discoverability and support, or maximum freedom to define endpoints?
Versioning strategy
How will you handle versioning? Does one approach make future changes easier?
Error handling mindset
Are you prepared for the debugging quirks of your choice—standard errors in REST, or custom logic in RPC?
Stress test: How to avoid ‘FrankenAPI’ outcomes
Last, don’t trust any design until you’ve stress-tested it against reality. I’ve seen REST APIs that spiral into RPC messes, and RPC setups that long for some structure. The takeaway: start with clarity about your priorities. It’s fine to mix approaches if you do it with eyes open—just avoid FrankenAPIs that confuse everyone.
If you mix, document aggressively
Hybrid designs can work, but document them mercilessly. Nobody likes guessing the mental model behind an endpoint.
Naming matters more than you think
Adopt a naming scheme and stick to it. Consistency helps everyone, especially future you.
Flexibility beats perfectionism
Build in room for future changes. Don’t paint yourself into a corner with a dogmatic choice.
Revisit design as things evolve
Always revisit assumptions when requirements shift. What worked last year might be baggage now.