6. Principles of Microservices
Modeled around business concepts
Culture of automation
Hide internal implementation details
Decentralize all the things
Deploy independently
Isolate Failure
Highly Observable
7. PROS
Technology flexibility
Scalability
Lower the risk of deployment
Small, independent teams
Reusability
Replaceability
CONS
Complex infrastructure
Complex deployment process
Performance
Resilience and monitoring
8. Are Microservices right for me?
Business requirements
Technical maturity
Organizational maturity
9. Continuous Delivery is the ability to get changes
of all types—including new features,
configuration changes, bug fixes and
experiments—into production, or into the
hands of users, safely and quickly in a
sustainable way.
continuousdelivery.com
16. What is Domain Driven Design?
It is an approach to building software that has complex and
ever-changing business requirements
17.
18. Key Concepts
A sphere of knowledge, influence, or activity. What an organisation does, and the world it
does it in.
Domain
A system of abstractions describing selected aspects of a Domain. It is used to solve
problems related to that Domain
Domain Model
19. Key Concepts
A Language structured around the Domain Model and used by all team members.
Ubiquitous Language
An explicit boundary within which a Domain Model exists. Inside, all terms have a specific
meaning and are part of the Ubiquitous Language
Bounded Context
22. Exercise 1
Teams of 5-6
Duration: 15 minutes
Identify Domain Models & Bounded
Contexts
23. Tales Of A Fourth Grade
An elementary school system comprehensive student management system
Functionality: track absences, tardies and excuses (entered by parents, faculty or staff);
generate reports on student activities; track student grades and assignments (completed
and due); parent-teacher forums
Users: faculty, staff and student parents
(https://archkatas.herokuapp.com/kata.html?kata=TalesOfAFourthGrade.json)
24. As a teacher
I want to take attendance
So that I can identify who is absent
As a teacher
I want to take attendance
So that I can identify who is late
As a teacher
I want to enter the reason for an absence or tardy
So that I can keep a record and observe trends over time
As a teacher
I want to generate reports on student activities
So that I can observe the performance of the students over time
As a teacher
I want to see the list of due assignments
So that I can manage expectations with students and parents
As a teacher
I want to see the list of completed assignments
So that I can observe the performance of the students over time
As a parent
I want to see the grades of my daughter
So that I can see her progress
As a parent
I want to enter the reason for an absence or tardy
So that the school is informed
As a parent
I want to have a conversation on a forum with other parents
So that I can share experiences
As a parent
I want to have a conversation on a forum with the teacher
So that I can ask them questions
As a teacher
I want to have a channel of communication with the parents
So that I can answer their questions
25. Exercise 1
Teams of 5-6
Duration: 15 minutes
Identify Domain Models & Bounded
Contexts
26. What to do when bounded contexts are identified?
1. Isolate them
2. Extract them into services
28. Event Storming
EventStorming is a workshop format for
quickly exploring complex business
domains.
http://ziobrando.blogspot.com/2013/11/introducing-event-storming.html
By Henning Schwentner - Own work, CC BY-SA 4.0,
https://commons.wikimedia.org/w/index.php?curid=57766348
29. Key Concepts
Something happened, of interest to a domain expert
Domain Event
An external instruction to do something. It triggers a Domain Event.
Command
The portion of the system that receives commands and decides whether to execute them
or not, thus producing a domain event.
Aggregate
30. Event Storming Legend
A Domain
Event
happened
A Command
or External
Event triggers
the Event
A View or
“read model”
Questions or
puzzles
An Aggregate
36. Exercise 2
Teams of 5-6
Duration: 20 minutes
Identify Domain Models & Bounded
Contexts
37. How to decide where to start?
● Pace of change
● Performance
● Security
● Team structure
● Dependencies (internal or external)
● Technology
38. Instructions for the coding exercises
Git client (for Windows users)
https://git-for-windows.github.io
SDK
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Github repo to fork
https://github.com/mariagomez/sacon-microservices
39. SACON NY Library
Browse books
See rating
Borrow books
New initiative: experiment with the
borrow functionality
40. Coding Exercise 1
Duration: 15 minutes
Step by step solution on Exercise1.md
Increase confidence in the code by adding
tests
41.
42.
43.
44.
45.
46. Coding Exercise 2
Duration: 30 minutes
Step by step solution on
Exercise2-part1.md & Exercise2-part2.md
Re-organize monolith and create clear
separation of packages