Slide 1

Slide 1 text

Building Services on and off Rails

Slide 2

Slide 2 text

SLIDES AT bit.ly/reverb-soa

Slide 3

Slide 3 text

3 TAKEAWAYS

Slide 4

Slide 4 text

WHY WRITE SERVICES RECOMMENDED STACK EMBEDDED VS. STANDALONE

Slide 5

Slide 5 text

WHY WRITE SERVICES RECOMMENDED STACK EMBEDDED VS. STANDALONE

Slide 6

Slide 6 text

WHY WRITE SERVICES RECOMMENDED STACK EMBEDDED VS. STANDALONE

Slide 7

Slide 7 text

Yan Pritzker, CTO Reverb.com github.com/skwp @skwp github.com/reverbdev @reverbdotcom

Slide 8

Slide 8 text

Yan Pritzker, CTO Reverb.com github.com/skwp @skwp github.com/reverbdev @reverbdotcom On Rails since 2005 (0.13.4)

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

RAILS IS EASY

Slide 11

Slide 11 text

RAILS IS FUN

Slide 12

Slide 12 text

RAILS IS BLOATED

Slide 13

Slide 13 text

STARTUP 10-20s

Slide 14

Slide 14 text

HOW DID WE GET HERE?

Slide 15

Slide 15 text

MONOLITHS

Slide 16

Slide 16 text

LOTS OF GEMS

Slide 17

Slide 17 text

LOTS OF CONTROLLERS

Slide 18

Slide 18 text

LOTS OF MODELS

Slide 19

Slide 19 text

LOTS OF LIBS

Slide 20

Slide 20 text

LOTS OF DOMAIN

Slide 21

Slide 21 text

SOLUTION? SERVICES

Slide 22

Slide 22 text

A SERVICE IS...

Slide 23

Slide 23 text

BITS OF ISOLATED FUNCTOINALITY

Slide 24

Slide 24 text

BEHIND A BIG WALL

Slide 25

Slide 25 text

SPEAKING JSON

Slide 26

Slide 26 text

WHY?

Slide 27

Slide 27 text

SCALE YOUR TEAM

Slide 28

Slide 28 text

SCALE DOWNTIME

Slide 29

Slide 29 text

SCALE PERFORMANCE

Slide 30

Slide 30 text

SCALE PRODUCTIVITY

Slide 31

Slide 31 text

SCALE HAPPINESS

Slide 32

Slide 32 text

DIVORCE FROM RAILS AND...

Slide 33

Slide 33 text

FAST SPECS

Slide 34

Slide 34 text

EXPERIMENT WITH FRAMEWORKS

Slide 35

Slide 35 text

EXPERIMENT WITH LANGUAGES

Slide 36

Slide 36 text

EXPERIMENT WITH ARCHITECTURE

Slide 37

Slide 37 text

OUR STACK

Slide 38

Slide 38 text

Grape API

Slide 39

Slide 39 text

Grape API Roar Representers

Slide 40

Slide 40 text

Grape API Roar Representers application/hal+json

Slide 41

Slide 41 text

Grape API Roar Representers application/hal+json ActiveRecord

Slide 42

Slide 42 text

Grape API Roar Representers application/hal+json Or Something Else

Slide 43

Slide 43 text

DEPLOYMENT?

Slide 44

Slide 44 text

EMBED IT!

Slide 45

Slide 45 text

CREATE THE GEM

Slide 46

Slide 46 text

WRITE GRAPE API

Slide 47

Slide 47 text

PUT IT ON RAILS

Slide 48

Slide 48 text

github.com/reverbdev/chimp Gemified Service Example

Slide 49

Slide 49 text

EMBEDDING IS EASY

Slide 50

Slide 50 text

AND YOU CAN DEVELOP IN ISOLATION

Slide 51

Slide 51 text

BUT IT’S NOT IDEAL

Slide 52

Slide 52 text

DEPENDENCY CONFLICTS

Slide 53

Slide 53 text

CONSTRAINS RUBY VERSION

Slide 54

Slide 54 text

ADDS TO APP BLOAT

Slide 55

Slide 55 text

DEPLOY IT STANDALONE!

Slide 56

Slide 56 text

THIN / UNICORN

Slide 57

Slide 57 text

FOREMAN / UPSTART

Slide 58

Slide 58 text

MINA / CAPISTRANO

Slide 59

Slide 59 text

REVERB STANDALONE SERVICE SKELETON github.com/reverbdev/service-skeleton

Slide 60

Slide 60 text

We’re Hiring! Rubyists/iOS/ Musicians