microservices: architecture for the real-time organization
TRANSCRIPT
Microservices: Architecture for the Real-time Organization
Why microservices?
heritage architecture» Single points of failure
» Impossible to scale out (shared mutable state, etc)
» Different non-functional requirements (reads, writes, compute)
» Optimized for none!
» Long, risky release cycles
What are microservices?
Microservices» Ubiquitous language
» Well defined models & boundaries
» Single responsibility
» Independantly deployable, scalable, resilient
» Communicate via async messaging
» Own their data
» Don't expose a public API
Approach?Principles
» responsive, resilient, elastic, message-driven
Approach?Principles
» responsive, resilient, elastic, message-driven
Concepts
» bounded contexts (DDD), event sourcing, CQRS, CAP (eventual consistency)
Approach?Principles
» responsive, resilient, elastic, message-driven
Concepts
» bounded contexts (DDD), event sourcing, CQRS, CAP (eventual consistency)
Tools
» Typesafe Reactive Platform (Play, Akka, Spark)
Concepts and patternsWe will cover:
» Domain Driven Design (DDD)
» Async messaging
» API management
» Dependency management
» CQRS & event sourcing
» Transactions & ordering
Domain Driven Design
Going async
Async Benefits» Not wasting resources
» Memory, CPU, threads
» Embracing failure
» Not expecting a return from a remote service
» Designing for all scenarios
Akka Actors» Message driven architecture
» Distribution
» Location transparency
» Isolation
API management
API mgmt.» Messaging patterns
» Pub/sub, point-to-point, streaming
» API gateway
» Routing, aggregation, protocol translation
» Discovery
» Service discovery, registry, versioning
Dependency management
CQRS & event sourcing
Transactions and ordering
Considerations» ACID doesn't work across location/trust boundaries
» No 2-Phase commits (2PC)
» No holding locks for the duration of work
» In distributed systems we need to compensate for for failure rather than prevent failure
What next?
Microservices with Typesafe» Play for API gateway
» Akka for core microservices (DDD, CQRS, event sourcing)
» ConductR for cluster management (service registry, discovery, architecture visualization, security)
Thank you!Visit https://www.typesafe.com/products/typesafe-reactive-platform to get started
Contact info
» Twitter: @kvnwbbr
» Email: [email protected]