moving from api design to deployment

16
Moving from API Design to Deployment James Higginbotham CTO, EvoSure @launchany

Upload: launchany

Post on 10-May-2015

197 views

Category:

Technology


2 download

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 architecture

TRANSCRIPT

Page 1: Moving From API Design to Deployment

Moving from API Design

to DeploymentJames Higginbotham

CTO, EvoSure@launchany

Page 2: Moving From API Design to Deployment

About EvoSure

Page 3: Moving From API Design to Deployment

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

Page 4: Moving From API Design to Deployment

Designing APIs

Page 5: Moving From API Design to Deployment

API Implementation

ModelCapabilities

Design and DocumentEndpoints

AcceptanceTests

(outside-in)

Prototype Payload

Page 6: Moving From API Design to Deployment

Consuming APIs

Page 7: Moving From API Design to Deployment

Internal APIs

No SDKs - direct APIs only

Timeouts

Retries

Local storage when appropriate

Page 8: Moving From API Design to Deployment

External APIs

No SDKs - direct APIs only

Timeouts

Retries

Fallback behavior with UX focus

Page 9: Moving From API Design to Deployment

Deploying APIs

Page 10: Moving From API Design to Deployment

Monolithic vs. Modular

Monolithic = API and Front-end in one app

Modular = separation of subsystems into different apps

Page 11: Moving From API Design to Deployment

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

Page 12: Moving From API Design to Deployment

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

Page 13: Moving From API Design to Deployment

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

Page 14: Moving From API Design to Deployment

The Move to Messaging

Business events are captured

Drive behavior

Allow for multiple actions from one message

Requires eventually consistent view of data

Page 15: Moving From API Design to Deployment

Fluentd: Logging + Messaging

Page 16: Moving From API Design to Deployment

Thank you.

http://evosure.com/careers@launchany