SOAService-Oriented Architecture
Divide and Conquer
Sylvain Witmeyer - April 2015
Who uses SOA
● Ebay(2006) - 2Pb data - +100k lines code / 2
weeks
● IBM - 77 shareables and reusables services in
prod
● Amazon(2002) - all their infrastructure
● Twitter
● Facebook - via Apache Thrift
Monolithic vs SOA
SOA
UI
Business Logic
Data Access Layer
DB
Monolithic
UI
service service service
service
DB DB DB
UI / worker
http://java.dzone.com/articles/getting-soa-right---thinking
Service Oriented Architecture
● SOA is an Architecture for building businesses
applications on top of a collection of services
● Service : Functionality well-defined, self-contained, and
does not depend on the context or state of other
services
● Focus on Service not on Domain
Everything simple is fast.
Everything which is complex is unusable.
Paul Valéry
SOA Manifesto
● Business value over technical strategy
● Strategic goals over project-specific benefits
● Intrinsic interoperability over custom integration
● Shared services over specific-purpose implementations
● Flexibility over optimization
● Evolutionary refinement over pursuit of initial perfection
Highlights
● Less intimidating for new developers
● Continuous Deployment is easier
● Fine tuning for scaling the application
● Decrease commits conflicts
● No long-term commitment to a technology
SOA Design Principles
● Loosely
coupled
● Autonomy
● Abstraction
● Reusability
● Discoverability
● Interoperability
● Service Contract
● Stateless
● Composibility-Granularity
Service Contract
Public document(s) that express terms of service (WSDL,
REST API Doc)
SERVICECONSUMER
CONTRACT
network
Loosely Coupled
Service and Consumer are independent
SERVICE
SERVICE INTERFACE - API
CONSUMER
CONSUMER
SERVICE
Autonomy
Services encapsulate resources and Business Logic
SERVICE
Resources &
logic
SERVICE
Resources
& logic
Service Abstraction
Service hides the Logic to the consumer
CONSUMER SERVICE
Resources &
Business logic
network
Reusability and Interoperability
Services can be used by several and differents consumers
SERVICE CONSUMER
CONSUMER
CONSUMER
network
Stateless
● Service doesn’t care about what it did and
what it will do.
● Minimize holding any activity or processing
state Information (session data is bad,
messaging queue).
Discoverability
● Consumers should easily find and
understand what Services are made for.
● Better Service reusability.
● Service directory.
Service Composition
A service can aggregate other services
SERVICE
SERVICE
SERVICE
BIG SERVICECONSUMER
network
network
Task, Entity, Utility
Task Service
Business Service with
business task or process
i.e : AuthenticationService,
OrderValidationService
Utility Service
Non-business Service
i.e : LogService,
MessagingService
Entity Service
Service handling Business
Entities
i.e : UserService,
ProgramService
Why SOA fails
From A Comprehensive Introduction to Everything SOA
Mehmet Akyuz
SOA Governance
● Plan – Identify and analyze the core governance areas for improvement.
Establish objectives/plan and specific measures for a proposed
increment. Previously deployed increments are also evaluated for any
necessary improvement.
● Define – Define the SOA Governance Model Transition Plans required
to deliver the objectives defined in the Plan phase.
● Implement – Implement the Transition Plans including deployment of
processes, organization, and technology aspects of the SOA
Governance Model.
● Monitor – Monitor the effectiveness of the currently deployed SOA
Governance Regimen and whether it is meeting its intended purpose.
This phase may start another iteration of the SGVM.
https://www.opengroup.org/soa/source-book/gov/sgvm.htm
If you can’t measure something, you can’t understand it.
If you can’t understand it, you can’t control it.
If you can’t control it, you can’t improve it
H. James Harrington
Monitoring & Deployment
● Monitoring and QA are the same thing
● Amazon has a universal service registry where you can find
out reflectively (programmatically) about every service,
what its APIs are, and also whether it is currently up, and
where.
● Create a reusable dashboard
● Continuous Integration
Amazon Mandate by J.Bezos 2002
1) All teams will henceforth expose their data and functionality through service interfaces.
2) Teams must communicate with each other through these interfaces.
3) There will be no other form of interprocess communication allowed: no direct linking, no
direct reads of another team's data store, no shared-memory model, no back-doors
whatsoever. The only communication allowed is via service interface calls over the network.
4) It doesn't matter what technology they use. HTTP, Corba, Pubsub, custom protocols --
doesn't matter. Bezos doesn't care.
5) All service interfaces, without exception, must be designed from the ground up to be
externalizable. That is to say, the team must plan and design to be able to expose the interface
to developers in the outside world. No exceptions.
6) Anyone who doesn't do this will be fired.
7) Thank you; have a nice day!
Questions to solve
● Service authentication and authorization ?
● What should be included in each Service ?
● API versioning and Continuous Integration, how do they
get along?
Sources
http://soapatterns.org/
http://serviceorientation.com/
http://microservices.io/patterns/mic
roservices.html
http://fr.slideshare.net/makyuz/a-comprehensive-introduction-to-everything-soa
http://fr.slideshare.net/apigee/soa-in-the-api-world-facades-transactions-
stateless-services
https://plus.google.com/+RipRowan/posts/eVeouesvaVX

Concept of SOA