moving from api design to deployment
DESCRIPTION
Designing and building APIs extends far beyond the RESTful interface. It requires thoughtful consideration about how you will draw the lines between capabilities vs optimizations, consume third-party APIs, and implement your cloud deployment strategy. This presentation looks at the API design process, AWS deployment, and moving to a message-oriented architectureTRANSCRIPT
Moving from API Design
to DeploymentJames Higginbotham
CTO, EvoSure@launchany
About EvoSure
Product Architecture
Web AppBackbone.js
JRuby + Rails
Only talks to the API
Provides API endpoints for UX optimization that are not business capability APIs
APIJRuby + Sinatra
DatabasePostgres 9.x
Designing APIs
API Implementation
ModelCapabilities
Design and DocumentEndpoints
AcceptanceTests
(outside-in)
Prototype Payload
Consuming APIs
Internal APIs
No SDKs - direct APIs only
Timeouts
Retries
Local storage when appropriate
External APIs
No SDKs - direct APIs only
Timeouts
Retries
Fallback behavior with UX focus
Deploying APIs
Monolithic vs. Modular
Monolithic = API and Front-end in one app
Modular = separation of subsystems into different apps
From Heroku to AWS
Originally on Heroku with 2 apps: api and web
Support for older browsers prevented this
Moved to AWS for elasticity, security, and service offerings
S3
CloudFormation
RDS (PostgreSQL)
Auto Scale Groups (ASGs)
Elastic Load Balancer (ELB)
Route 53 DNS
Chef
Immutable Infrastructure
Huh?
Actually not that bad
Infrastructure is a “promise”
When the promise has to change, the stack changes
Blue-green deployment model
Patch deploys in between stack revisions
How we deploy to AWS
CloudFormation templates define a stack
Currently two stacks: ‘dev’ and ‘prod’
Stacks are versioned by name (e.g. dev3, prod3)
New stacks started in parallel
DNS switch when new stack is ready
CNAME with 300 sec TTL
The Move to Messaging
Business events are captured
Drive behavior
Allow for multiple actions from one message
Requires eventually consistent view of data
Fluentd: Logging + Messaging
Thank you.
http://evosure.com/careers@launchany