Nitty Gritty Service Building
summary
Step-by-step method to rip a service out of a Rails monolith: pick a single responsibility, add active model serializers to control JSON, build client models (or a parsing gem like sanjay), wrap a HTTP layer and use typhus for parallel requests, and write tests as the service contract. Profiling with perf tools and stack prof exposes real bottlenecks (calculator.coupons hits ~21.5% of time), webric causes single-request deadlocks, and database split/sync remains unsolved.
AI-written summary · about
chapters (23)
- 0:00Intro
- 0:50Service Oriented Architecture
- 1:15Unassociated
- 1:28Singularly Focused Application
- 1:41Benefits
- 6:02Dog Food Client
- 6:42Let's Get Started
- 7:15Services should do ONE thing well
- 8:03What are the endpoints of your service?
- 8:58Build Controllers
- 9:11Determine Request Options
- 9:53Multiple Objects Per Request?
- 11:07Active Model ::Serializers
- 12:32Contract Your Service Fulfills
- 13:11Don't Use Plain Responses
- 14:16WARNING: Evil Magic
- 15:54Write Tests
- 18:33Concurrent Requests
- 19:40BONUS STEP!
- 20:07Replace DB Calls With Service Calls
- 20:45CAUTION: Multi-Request Server Needed
- 21:13WEBrick Wall
- 26:53Extract From Original Codebase
related talks
22mNitty Gritty Service Building
23mAbstracting a Service - A Case Study in Forward Thinking with SOA
33mServices and Rails: The Shit They Don't Tell You
42mLightweight Web Services
28mServices and Rails: The Shit They Don't Tell You
50mLiving Social Lightning Talks
33mServices and Rails: The Sh*t They Don't Tell You
40mService Architectures for Mere Mortals
