SERVICE ORIENTED
SOFTWARE DEVELOPMENT
[email protected]
Learning outcomes
1. Understanding fundamental concepts, theories, and techniques
in service-oriented computing
2. Understanding analysis and modeling service use SOAP and REST
approaches for developing service oriented application
3. Understanding design patterns and service paradigms relevant to
the development and deployment of web services
4. The skill to analysis, design and implement service-oriented
software based on SOAP or REST approaches
Outlines
Fundamentals Microservice Pattern
1. Introduction to Service-Orientation 1. Communication patterns
2. Building up the Service-Oriented 2. Managing transactions with sagas
Solution 3. Domain-driven design (DDD)
aggregate pattern
Service-Oriented Analysis and Design
4. Event sourcing pattern
3. Analysis and Modeling Service 5. API composition pattern or
4. Service API and Contract Design Command query responsibility
segregation (CQRS) pattern
5. Service API and Contract Versioning
6. External API patterns
Textbooks
• Required Textbooks
• [1]. Thomas Erl, “Analysis and Design for Services and Microservices”, 2th
edition, Mark Taub, 2017
• [2] Chris Richardson, “Microservices patterns With Examples in Java”, 2019
• Optional Textbooks
• [1] Sam Newman. Building Microservices, 2nd Edition. 2021.
• [2]. M. Papazoglou. Web Services and SOA: Principles and Technology, 2nd
Edition. 2012
• [3]. Robert Daigneau. Service Design Patterns: Fundamental Design Solutions
for SOAP/WSDL and RESTful Web Services. 2011.
Grading Policy
Grading method Percentage Group/Individual
- Attendance 10 % Individual
- Mid-term projects/exams 20% Group (maximum: 3)
- Exercises 20% Individual
- Final examination (lab) 50% Individual
Q&A
The History of Microservices
• Microservices, a popular architectural approach in software
development, has its roots in the late 1990s and early 2000s.
• The Precursor: Service-Oriented Architecture (Late 1990s - Early
2000s)
• The Forerunner: Enterprise Java Beans (1997)
• The Shift from SOAP(1999) to REST(2005): 2008-2010
• The Birth of Microservices (2011-2012)
• The Present and Future: The Advantages of Microservices
Discussion
Monolithic | Vs | Microservices
Monolithic Architecture
A monolithic architecture is a
traditional model of a software
program
• Built as a unified unit that is self-
contained
• One code base that couples all of the
business
• Allows everything in the monolith to
be released at once.
Advantages/Disadvantages of a monolithic architecture
Advantages Disadvantages
• Easy deployment • Slower development speed
• Development • Scalability
• Performance • Reliability
• Simplified testing • Barrier to technology adoption
• Easy debugging • Lack of flexibility
• Deployment cost
Microservices architecture
A microservices architecture (microservices) an
architectural that relies on a series of
independently deployable services
• These services have their own business logic,
database with a specific goal
• These services have their own lifecycle (dev,
test, deploy, scale, maintenance)
• Adopting microservices often goes hand in
hand with DevOps, since they are the basis for
continuous delivery (CD)
SOA vs Microservice
Advantages/Disadvantages of a microservice architecture
Advantages Disadvantages
• Agility • Development sprawl
• Flexible scaling • Exponential infrastructure costs
• Continuous deployment • Added organizational overhead
• Highly maintainable and testable • Debugging challenges
• Independently deployable • Lack of standardization
• Technology flexibility • Lack of clear ownership
• High reliability
• Happier teams
Principles for designing architectures for microservices
• Single responsibility
• Focused on business capabilities
• Designed for failure
Case study (0)
• Amazon
• In the early 2000s, Amazon’s retail
website behaved like a single monolithic
application
• In 2001, development delays, coding
challenges, and service
interdependencies inhibited Amazon’s
ability to meet the scaling requirements
of its rapidly growing customer base
• Amazon’s “service-oriented
architecture” was largely the
beginning of what we now call
microservices
This is a 2008 graphic of Amazon’s microservices infrastructure,
aka the Death Star.
Case study (1)
Netflix’s Case Study Atlassian’s Case Study
• Problem: In 2009, faced growing pains as • Problem: Scaling challenges with Jira and
its monolithic architecture and scaling Confluence.
problem • Solution: Transform from a monolithic
• Solution: Migrated to a cloud-based system to a multi-tenant, stateless cloud
microservices architecture (2010 – 2011) application powered by microservices
• Now: Over a thousand microservices, • Now
with engineers deploying code multiple • In January 2016, about 15 total
times each day, showcasing a true microservices.
DevOps spirit. • Now more than 1300, moved 100K
customers to the cloud
• Autonomous teams and a better DevOps
culture.
Case study (2)
Carpooling / Ridesharing
• Lyft Case Study
• Uber Case Study
→ Problem: fast-growing organization/User
and Monolithic scaling problem
eCommerce platform
• Etsy Case Study
• Problem: Performance issues (reduce
processing time to 1000-ms time-to-glass)
• Now: Etsy’s new structure went live in
2016
Case study (3)
• Spotify Case Study: Spotify is a global music company that serves more
than 170 million users
• Problem:
• 1) Maintaining data centers did not meet objective.
• 2) Free up developers from the jobs of provisioning resources and maintaining them
• 3) Spotify wanted to derive advantages from Google Cloud’s latest innovations
(BigQuery- data warehouse, Pub/Sub - messaging, DataFlow – streaming data).
• Solution: Spotify formulated the migration plan in 2015 and they split the
job into two parts, services and data.
• Services migration: (2015 – 2017)
• Data Migration: Spotify now runs its data on BigQuery while running close to 10
million queries per month.
Roadmap
Tham khảo:
https://www.linkedi
n.com/pulse/one-
post-refer-
microservices-road-
map-rocky-bhatia
DevOps Roadmap
Q&A
Reference
1. https://www.atlassian.com/microservices/microservices-
architecture/microservices-vs-monolith
2. https://www.linkedin.com/pulse/history-microservices-from-
thought-experiment-industry-muaath-bin-ali
3. https://www.linkedin.com/pulse/microservices-architecture-case-
study-from-various-suryawanshi
4. https://www.linkedin.com/pulse/monolithic-vs-microservices-
architecture-case-study-netflix-asif
5. https://blog.dreamfactory.com/microservices-examples