3. The Curse Of The Monolith
We know how to operate them
• We know how to develop
• We know how to deploy
• We know how to scale
but there is a price to pay
• Large code-bases
• Hard to understandand modify
• Complex configuration
4.
5. What Are Microservices?
SOA for DevOps
• Single, self-contained,
autonomous
• Easy(er) to understand
individually
• Scalability
• Testing independently
• Individually deployed, has own
lifecycle
• Single service going
down should not impact
other services
• Right technology stack
for the problem
(language, databases,
etc)
• Fail fast
• Faster innovation,
iteration
6. “Microservices” is a lousy term
• Size is irrelevant
We want flexiblesystemsand organizationsthat can
adapt to their complex environments,make changes
without rigid dependenciesandcoordination, can
learn, experiment,andexhibit emergentbehavior.
7. We need to build systems for flexibility
and resiliency, not just efficiency and
robustness.
10. Design Best Practices
• Design for Automation
• Designed for failure
• Service load balancing and automatic scaling
• Design for Data Separation
• Design for Integrity
• Design for Performance
11. Strategies For Decomposing
Verb or Use Case
e.g. Checkout UI
Noun
e.g. Catalog product service
Single ResponsiblePrinciple
e.g. Unix utilities
13. • Reactive MicroservicesFramework for the JVM
• Focused on right sized services
• AsynchronousI/Oand communication as first class
priorities
• Highly productive development environment
• Takes you all the way to production
What is Lagom?
14. • Service API
• Persistence API
• Development environment
• Production environment
Highly opinionated
15. • Event sourced (deltas)with Cassandrabackend by default
• No object/relational impedance mismatch
• Can always replay to determine currentstate
• Allows you to learn more from your data later
• Persistent entity is an AggregateRoot in DDD
• Can be overridden for CRUD if you want
Lagom Persistence API
16. Next Steps! Download and try Lagom!
Project Site:
http://www.lightbend.com/lagom
GitHub Repo:
https://github.com/lagom
Documentation:
http://www.lagomframework.com/documentation/1.0.x/Home.html
Example:
https://github.com/typesafehub/activator-lagom-java
17. Written for architects and developersthat must
quickly gain a fundamental understandingof
microservice-basedarchitectures, this freeO’Reilly
reportexploresthe journey fromSOAto
microservices,discussesapproachesto dismantling
your monolith,and reviews the key tenets ofa
Reactive microservice:
• Isolate all the Things
• Act Autonomously
• Do OneThing, and Do It Well
• Own Your State, Exclusively
• Embrace AsynchronousMessage-Passing
• Stay Mobile,but Addressable
• Collaborate as Systems to Solve Problems
http://bit.ly/ReactiveMicroservice
18. The detailed example inthis reportis based on
Lagom, a new frameworkthat helps you follow the
requirementsfor buildingdistributed,reactive
systems.
• Get an overview of the Reactive Programming
model and basic requirementsfor developing
reactive microservices
• Learnhow to create base services, expose
endpoints,and then connect them with a
simple, web-based user interface
• Understand how to deal with persistence,state,
and clients
• Use integration technologiesto start a
successfulmigration away fromlegacy systems
http://bit.ly/DevelopReactiveMicroservice
19. http://bit.ly/SustainableEnterprise
• Understand thechallenges ofstartinga greenfield
development vs tearingapart an existing brownfield
application into services
• Examine your business domain to see if microservices
would bea good fit
• Explorebest practices for automation,high availability,
data separation,and performance
• Align your development teams around business
capabilities and responsibilities
• Inspect design patterns such as aggregator, proxy,
pipeline, or shared resources to model service
interactions