6. What’s the Problem?
● Rails apps don’t scale
● Rails apps do scale:
○ Web servers are cheap
7. What’s the Problem?
● Rails apps don’t scale
● Rails apps do scale:
○ Web servers are cheap
○ Engineers are expensive
8. What’s the Problem?
● Rails apps don’t scale
● Rails apps do scale:
○ Web servers are cheap
○ Engineers are expensive
○ Rails is optimised to save engineering time
9. What’s the Problem?
● Rails apps don’t scale
● Rails apps do scale:
○ Web servers are cheap
○ Engineers are expensive
○ Rails is optimised to save engineering time
○ not the full story...
12. What’s the Problem?
In my experience:
● Large rails apps are hard to scale:
○ Team size
■ code base complexity
13. What’s the Problem?
In my experience:
● Large rails apps are hard to scale:
○ Team size
■ code base complexity
■ brittleness due to tight coupling between
models
14. What’s the Problem?
In my experience:
● Large rails apps are hard to scale:
○ Team size
■ code base complexity
■ brittleness due to tight coupling between
models
○ TDD feedback time
31. Mutations in RestPack
● Services are packaged as gems:
○ Commands
○ Serialisers
○ Models
○ Migrations
32. Mutations in RestPack
● Services are packaged as gems:
○ Commands
○ Serialisers
○ Models
○ Migrations
○ Specs
33. Mutations in RestPack
● Services are packaged as gems:
○ Commands
○ Serialisers
○ Models
○ Migrations
○ Specs
● Commands are the public interface
34. Mutations in RestPack
● Services are packaged as gems:
○ Commands
○ Serialisers
○ Models
○ Migrations
○ Specs
● Commands are the public interface
○ either Ruby or REST
49. actv.io rails app
Activity Controller
Activity Model
Host Ruby Application
Activity Clent Gem
Activity Service Gem
DB
50. actv.io rails app
Activity Controller
Activity Model
Host Ruby Application
Activity Clent Gem
Local Proxy
Activity Service Gem
DB
51. actv.io rails app
Host Ruby Application
Activity Controller
Activity Model
Local Proxy
Activity Clent Gem
API Proxy
REST
API
Activity Service Gem
DB
53. actv.io rails app
Host Ruby Application
Activity Controller
Activity Model
Local Proxy
Activity Clent Gem
API Proxy
REST
API
Activity Service Gem
DB
54. No need for Rails, the API is
the server application
API
55. No need for Rails, the API is
the server application
Android App
API
56. No need for Rails, the API is
the server application
Android App
iOS App
API
57. No need for Rails, the API is
the server application
Web App
Android App
iOS App
API
58. No need for Rails, the API is
the server application
Web App
Android App
iOS App
API
... App
... App
... App
67. 3rd Party Applications
3rd Party Applications
3rd Party Applications
3rd Party Applications
dashboard.restpack.org
Apply Security Policy
api.restpack.org
Job
Q
DB
DB
DB
DB
DB
Core
Users
Groups
Account
Email
Redis
69. 1 Application, 1 DB
dashboard.restpack.org
api.restpack.org
Job
Q
DB
Redis
70. Many Applications, Many DBs
dashboard.restpack.org
Apply Security Policy
api.restpack.org
API
API
API
API
API
Job
Q
DB
DB
DB
DB
DB
Core
Users
Groups
Account
Email
Redis