building services on and off rails
DESCRIPTION
Build Ruby services with Grape and Roar and embed into Rails or run standalone. Provides working examples of both.TRANSCRIPT
Building Services on and off Rails
SLIDES ATbit.ly/reverb-soa
3 TAKEAWAYS
WHY WRITE SERVICESRECOMMENDED STACK
EMBEDDED VS. STANDALONE
WHY WRITE SERVICESRECOMMENDED STACK
EMBEDDED VS. STANDALONE
WHY WRITE SERVICESRECOMMENDED STACK
EMBEDDED VS. STANDALONE
Yan Pritzker, CTOReverb.com
github.com/skwp @skwp
github.com/reverbdev @reverbdotcom
Yan Pritzker, CTOReverb.com
github.com/skwp @skwp
github.com/reverbdev @reverbdotcom
On Rails since 2005 (0.13.4)
RAILSIS EASY
RAILSIS FUN
RAILSIS BLOATED
STARTUP10-20s
HOW DID WE GET HERE?
MONOLITHS
LOTS OF GEMS
LOTS OF CONTROLLERS
LOTS OF MODELS
LOTS OF LIBS
LOTS OF DOMAIN
SOLUTION?SERVICES
A SERVICE IS...
BITS OF ISOLATED
FUNCTOINALITY
BEHIND A BIG WALL
SPEAKING JSON
WHY?
SCALEYOUR TEAM
SCALEDOWNTIME
SCALEPERFORMANCE
SCALEPRODUCTIVITY
SCALEHAPPINESS
DIVORCE FROM RAILS AND...
FAST SPECS
EXPERIMENTWITH
FRAMEWORKS
EXPERIMENTWITH
LANGUAGES
EXPERIMENTWITH
ARCHITECTURE
OUR STACK
Grape API
Grape API
Roar Representers
Grape API
Roar Representers
application/hal+json
Grape API
Roar Representers
application/hal+json
ActiveRecord
Grape API
Roar Representers
application/hal+json
Or Something Else
DEPLOYMENT?
EMBED IT!
CREATE THE GEM
WRITE GRAPE API
PUT IT ON RAILS
github.com/reverbdev/chimp
Gemified Service Example
EMBEDDINGIS EASY
AND YOU CAN DEVELOP IN ISOLATION
BUT IT’SNOT IDEAL
DEPENDENCY CONFLICTS
CONSTRAINS RUBY VERSION
ADDS TOAPP BLOAT
DEPLOY ITSTANDALONE!
THIN /UNICORN
FOREMAN / UPSTART
MINA / CAPISTRANO
SERVICE SKELETON
github.com/reverbdev/service-skeleton
We’re Hiring!Rubyists/iOS/
Musicians