0% found this document useful (0 votes)
47 views32 pages

L7 - Microservices Continued & Service Oriented Architecture

The document discusses Service Oriented Architecture (SOA) and Microservices, highlighting their advantages, challenges, and differences. Microservices offer benefits like language independence and better fault isolation, while SOA emphasizes service reusability and easy maintenance. Key distinctions include SOA's enterprise scope and reliance on an Enterprise Service Bus (ESB), compared to microservices' application scope and independent communication protocols.

Uploaded by

Mazen Essam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views32 pages

L7 - Microservices Continued & Service Oriented Architecture

The document discusses Service Oriented Architecture (SOA) and Microservices, highlighting their advantages, challenges, and differences. Microservices offer benefits like language independence and better fault isolation, while SOA emphasizes service reusability and easy maintenance. Key distinctions include SOA's enterprise scope and reliance on an Enterprise Service Bus (ESB), compared to microservices' application scope and independent communication protocols.

Uploaded by

Mazen Essam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

System Analysis and Design -2

(IS-352)
Lecture 6
Service Oriented Architecture (SOA)

Dr. Wael Abbas


2023 - 2024
Microservices
Advantages of Microservices
• Language independent and framework independent.
• Independently develop, deploy, redeploy, version and scale component
services in seconds without compromising the integrity of anapplication
• Better fault isolation keeps other services to work even onfailure.
• Zero downtime upgrades.
• Services can be of from different servers or even from different datacenters.
• Reliable and self-healing.
• Supports continuous integration and delivery.
• Easy to integrate with third parties.
Challenges of Microservices
• Complexity - A microservices application is more complex as compared to
the equivalent monolithic application.
• Development and testing - Building and testing a service that relies on other
services need domains understanding and refactoring them can be difficult.
• Lack of governance - The decentralized approach to building microservices
has advantages, but it also lead to so many problems like maintenance
because of many different languages and frameworks.
• Network congestion and latency - The use of many small, services can result
into additional latency because of interservice communication and a long
chain of service dependencies. So design APIs carefully and use
asynchronous communication patterns.
Challenges of Microservices
• Data Integrity - Each microservice is responsible for its own data
persistence. As a result, data consistency can be a challenge.
• Management - To be successful with microservices requires a mature
Devops culture. Correlated logging across services can be challenging for
a single user operation.
• Versioning - Be careful while updating a service. It must not break
services that depend on it. So without careful design, you might have
problems with backward or forwardcompatibility.
• Skillset - Microservices are highly distributed systems. So need a skilled
and experience team to implement it.
When to use MicroservicesArchitecture
• Large applications that require a high release velocity.
• Complex applications that need to be highlyscalable.
• Applications with rich domains or manysubdomains.
• An organization that consists of small development teams.
Microservices Architecture
Monolithic vs microservices
Design Patterns for Microservices
Decomposition Patterns Integration Patterns Database Patterns
• Decompose by Business • API Gateway Pattern • Database per Service
Capability • Aggregator Pattern • Shared Database per Service
• Decompose by Subdomain • Client-Side UI Composition • CQRS Pattern
• Strangler Pattern Pattern • Saga Pattern

Communication Patterns Deployment Patterns


• Request/Response Pattern
• Multiple Service Instances per Host
• Messaging Pattern • Service Instance per Host
• Event Driven Pattern • Serverless Deployment
• Service Deployment Platform
Design Patterns for Microservices
Observability Patterns Cross-Cutting Concern
• Log Aggregation Patterns
• Performance Metrics • Externalized Configuration
• Distributed Tracing • Service Discovery Pattern
• Health Check • Circuit Breaker Pattern
Tools/IDE:
Getting started with Microservices
Development
Frameworks
Development
Tools

Visual Studio VS Code Docker


www.visualstudio.microsoft.co www.code.visualstudio.co www.code.docker.co
m/ m/ m/
Microservices APIGateways

Azure API Ocelot API Traefik


Management Gateway (traffic)
Service Oriented architecture (SOA)
• Service-oriented architecture (SOA) is an enterprise-wide approach
to software development of application components that takes
advantage of reusable software components, or service .
• It uses software components called services to create business
applications. Each service provides a business capability, and services
can also communicate with each other across platforms and
languages. Developers use SOA to reuse services in different systems
or combine several independent services to perform complex tasks.
Service Oriented architecture (SOA)

SOA example
Service Oriented architecture (SOA)
There are two major roles within Service-oriented Architecture:
• Service provider: The service provider is the maintainer of the
service and the organization that makes available one or more
services for others to use. To advertise services, the provider can
publish them in a registry, together with a service contract that
specifies the nature of the service, how to use it, the requirements
for the service, and the fees charged.
• Service consumer: The service consumer can locate the service
metadata in the registry and develop the required client components
to bind and use the service
Service Oriented architecture (SOA)
• The Enterprise Service Bus (ESB) provides communication by a
common communication protocol, or communication bus, which has
connections between the consumers and providers. In SOA
architecture, database storage is shared between all services.
• an architectural pattern that centralized software component performs
integrations between applications.
It performs transformations of data models, handles connectivity and
messaging, performs routing, converts communication protocols and
potentially manages the composition of multiple requests
Enterprise service bus (ESB)
• The ESB manages and exploits meta-data describing
interaction endpoints as well as the domain models used to
describe the capabilities of those endpoints; it supports
configuration of links that bridge between capabilities
demanded by service requestors and those offered by service
providers, dynamically matching requestors with providers and
in the process establishing and enacting contracts between
those interaction endpoints.
SCHMIDT, M.-T., et al. The enterprise service bus: making service-oriented architecture real. IBM
Systems Journal, 2005, 44.4: 781-797.
Enterprise service bus (ESB)
The primary duties of an ESB are
• Route messages between services
• Monitor and control routing of message exchange between
services
• Resolve contention between communicating service components
• Control deployment and versioning of services
• Provide commodity services like event handling, data
transformation and mapping, message and event queuing and
sequencing, security or exception handling, protocol conversion
and enforcing proper quality of communication service
Registry

• A Service Registry is a resource that provides controlled access


to data necessary for the implementation and governance of
Service Oriented Architecture (SOA) projects.
Registry
Service Oriented architecture (SOA)
• SOA provides four different service types:
• Functional services (i.e., business services), which are critical
for business applications.
• Enterprise services, which serve to implement functionality.
• Application services, which are used to develop and deploy
apps.
• Infrastructure services, which are instrumental for backend
processes like security and authentication.
Service Oriented architecture (SOA)
• Each service consists of three components:
1.The interface, which defines how a service provider will
execute requests from a service consumer.
2.The contract, which defines how the service
provider and service consumer should interact.
3.The implementation, which is the service code.
Advantages of SOA
• Advantages of SOA:
1. Service reusability: In SOA, applications are made from existing services. Thus,
services can be reused to make many applications.
2. Easy maintenance: As services are independent of each other they can be
updated and modified easily without affecting other services.
3. Platform independent: SOA allows making a complex application by combining
services picked from different sources, independent of the platform.
4. Availability: SOA facilities are easily available to anyone on request.
5. Reliability: SOA applications are more reliable because it is easy to debug small
services rather than huge codes
6. Scalability: Services can run on different servers within an environment, this
increases scalability
7. Faster time to market
Disadvantages of SOA
• ESB can be bottlenecks and single point of failure.
The similarities between SOA and microservices
• Some critics of the microservices architecture claim it’s nothing
new—it’s service oriented architecture (SOA). At a very high
level, there are some similarities. SOA and the microservices
architecture are architectural styles that structure a system as
a set of services.
The difference between SOA and microservices

Wolff, E. (2019). Microservices: A practical guide: Principles, concepts, and recipes. Manning.
The difference between SOA and microservices
• The main distinction between the two approaches comes down
to scope. To put it simply, service-oriented architecture (SOA) has
an enterprise scope, while the microservices architecture has an
application scope.

https://www.ibm.com/cloud/blog/soa-vs-microservices
The difference between SOA and microservices
• Communication: In a microservices architecture, each service
is developed independently, with its own communication
protocol. With SOA, each service must share a common
communication mechanism called an enterprise service
bus (ESB). SOA manages and coordinates the services it
delivers through the ESB. However, the ESB can become
a single point of failure(SOF) for the whole enterprise, and if a
single service slows down, the entire system can be affected.
The difference between SOA and microservices
• Interoperability: In the interest of keeping things simple,
microservices use lightweight messaging protocols
like HTTP/REST (Representational State Transfers) and JMS
(Java Messaging Service). SOAs are more open
to heterogeneous messaging protocols such as SOAP (Simple
Object Access Protocol), AMQP (Advanced Messaging Queuing
Protocol) and MSMQ (Microsoft Messaging Queuing).
The difference between SOA and microservices
• Service granularity: Microservices architectures are made up of
highly specialized services, each of which is designed to do one
thing very well. The services that make up SOAs, on the other hand,
can range from small, specialized services to enterprise-wide
services.
• Speed: By leveraging the advantages of sharing a common
architecture, SOAs simplify development and troubleshooting.
However, this also tends to make SOAs operate more slowly
than microservices architectures, which minimize sharing in favor
of duplication.

You might also like