microservices vienna 2015

36
AGILE WEB DEVELOPMENT MicroServices

Upload: mbild

Post on 08-Aug-2015

74 views

Category:

Technology


4 download

TRANSCRIPT

AGILE WEB DEVELOPMENTMicroServices

MONOLITH

• dependencies

• locks

• hard to deploy

• side effects

AGILE• independen

t

• productive

• sustained

• scale

• continuously

PERSPECTIVES

• agile architecture

• development

• delivery & operation

• in practice

LOOSE COUPLING

• self contained systems

• location transparency

• async communication

BOUNDED CONTEXT

DECOMPOSITION

Sales DistributionAccountingMarketing

RecommendationCampaignCoupon…

CatalogPriceCalculations…

PaymentInvoices…

AvailabilityShipping…

COMPOSITIONon Service Level

MICROSERVICE

The

UnixWay

Each APP only does one thing

Small enough to fit your head

Small enough to throw away

SELF-CONTAINED• lightweight communication

• independent development

• independent deployment (container, package manager)

• strict contracts & versions

• one process

• UI & (temporary) store included

12-FACTOR APP• log to stdout

• bundle config via ENV-Var

• explicit port bindings

• scale via processes

• share nothing

• prefer stateless / temporary states

• start fast / graceful shutdown

• decouple admin process

SYSTEM OF SYSTEMS• distributed

• integration

• dependencies

• state & consistency guarantees

• fast releases

• parallel development

• scale vertical & horizontal

• resilient

RELEASE IT!

DEV OPS

Architecture

Infrastructure

FEATURE TEAMS

CROSS CUTTING

• OAuth(2)

• Tracking

• Testing

• Configuration

CHOOSE

NOT A FREE LUNCH• what? learn &

improve

• discuss & agreement

• explicit failure strategies

• documentation

PRACTICE

• functional prototype

• ui, services & integration

• delivery & operations infrastructure

• resilient & scale

• monitoring & SLAs

PROTOTYPE

Web-App Back-Office

INTEGRATION

HANDS ON

DECOUPLE COMMUNICATION

• async

• timeouts & retry

• circuit breaker

• fallback

INTEGRATION

• Links, Frames,

Redirects

• AJAX

• SDK

INTEGRATION

• Data Replication

• WebHooks

• Request/Response

• Dedicated App-DB

• Message Broker

MANAGE STATE

• trade off - explicit state

• relaxed consistency

• avoid persistent data

• prefer in-memory + expiry

• prefer replication

RESILIENT & SCALE• failure compensation (retry, fallback, cache, etc.)

• data correlation

• CQRS / ES / LOGS

• client side load balance

• algorithm for traffic distribution (e.g. shards)

• scoring per read and write operations

SERVICE TEMPLATE• rapid application development

• experimental & feasibility development

• batteries includes (UI, Storage, Streams, Tasks, etc.)

• simple to extend

• simple to deploy

DELIVERY & OPERATIONSSOURCEGIT PUBLISH

DELIVER

MONITOR

DISCOVER

DELIVERY

cURL

SERVICE DISCOVERY

HEALTH CHECK

LOG COLLECTOR

MONITORING

Notifications

AUTO REGISTER

• Services• Health-Checks• Log-Collection

SLA• 99,9% availability

• 90% < 500ms click performance

• 80% < 1s data processing performance

• 60% integration test errors

THANK YOU

Questions?