Splitting Your App
summary
Claim: move the model layer into a slim API (Sinatra) and halve the app to get a big performance win and a public API. Implementation details: flexible_api + flexible_api_server and client libraries like constructor.rb (and JS/Objective‑C), git submodules to share model code, rack‑attack for rate limiting, ActiveRecord validations returning 422. Real result: deployed in production, mobile apps and external consumers use it after scaling from 30 to 850 accounts in three months.
AI-written summary · about
chapters (16)
- 0:00Intro
- 1:38The Plan
- 3:57The Age of Innocence
- 4:41Asian Denial
- 5:02Relief
- 5:31Avoid duplicating logic
- 6:23Flexible API Server
- 9:06Builder
- 9:52API Server
- 11:24Documentation
- 12:20Constructor
- 13:58Gate Sub Modules
- 15:19Issues
- 16:25Wrapping Up
- 23:04Benefits
- 24:08The Constructor
related talks
32mRefactoring Legacy Apps with APIs and Messages
20mSafely Decomposing a Highly Available Rails App
44mBuilding Distributed Applications
22mBuilding the Great Wall: API Driven Applications
43mThe Clean Architecture: How to Grow From Startup to Enterprise
39mWhere is my scalable API?
23mAbstracting a Service - A Case Study in Forward Thinking with SOA
42mWeb API's with ERLANG a Ruby Dev's POV
