pragmatic rails architecture [sf rails, 24 apr 14]

Post on 18-Jun-2015

869 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Presented at http://www.meetup.com/SFRails/events/167605832/

TRANSCRIPT

rainforest @rainforestqa

Pragmatic Rails Architecture

@rainforestqarainforest

Rainforest

Human powered QA SaaS

Enables ‘Continuous QA’

Built for cross-functional teams

@rainforestqarainforest

Us

Team of 6 in SoMa

All developers

YC S12

@rainforestqarainforest

What is pragmatism?

@rainforestqarainforest

Practical applications of X

@rainforestqarainforest

What do I mean by “practical”

@rainforestqarainforest

Impractical

Things breaking

Inconsistency

Complexity

Manual intervention

@rainforestqarainforest

Practical

Simple

Works

Hands off

@rainforestqarainforest

What do I mean by “architecture”?

@rainforestqarainforest

The parts of your stack that you can’t remove without breaking

things

@rainforestqarainforest

So…how?

@rainforestqarainforest

Understand your choices

@rainforestqarainforest

Understand your tradeoffs

@rainforestqarainforest

All these matter

Hosting

Code (Gems + your code)

Services

Testing

@rainforestqarainforest

Hosting

Understand what your team is capable of

what’s important?

Co-lo / Dedicated

AWS / VPS

Heroku / PaaS

Co-lo / Dedicated

AWS / VPS

>>> Heroku / PaaS <<<

–John Nunemaker

“You're An Idiot For Not Using Heroku.”

@rainforestqarainforest

Code

Single responsibility principle

Multiple apps - learn when to split

@rainforestqarainforest

Gems

Always check for gems

Use the maintained ones

Fix the unmaintained ones

@rainforestqarainforest

Picking Gems; quick guide

Is it active?

Old pull requests?

Read the code

@rainforestqarainforest

Picking gems; quick guide

active?

read the code

I can has tests?

@rainforestqarainforest

Services

Core: datastore, queuing

External: email service, monitoring, etc

@rainforestqarainforest

Datastore (1/2)

Understand your use-case

Pick one your team understands

Generally, avoid trends

If not understood, research weaknesses

@rainforestqarainforest

Datastore 2/2

Keep to the standards: MySQL / Postgres

@rainforestqarainforest

External services

Use them where not your core

Generally cheaper + better + simpler

@rainforestqarainforest

Queuing

QueueClassic

@rainforestqarainforest

Extra stuff

@rainforestqarainforest

Monitoring

Your service - web, db, queue size, etc

External services - stripe.js? heroku? aws?

@rainforestqarainforest

Deployment + CI

You should do this

@rainforestqarainforest

Testing

Importance, imho:

#1 cover main flows for the user

#2 integration + front end regressions

#3 unit tests

@rainforestqarainforest

Conclusion

understand your tradeoffs

the least reliable part of your stack = your reliability

monitor things

rainforest @rainforestqa

Questions?@rainforestqa

@rhs

top related