concept of soa

25
SOA Service-Oriented Architecture Divide and Conquer Sylvain Witmeyer - April 2015

Upload: sylvain-witmeyer

Post on 16-Apr-2017

105 views

Category:

Engineering


0 download

TRANSCRIPT

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 SOASOA

UI

Business Logic

Data Access Layer

DB

MonolithicUI

service service service

service

DB DB DB

UI / worker

http

://ja

va.d

zone

.com

/arti

cles

/get

ting-

soa-

right

---th

inki

ng

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 ContractPublic document(s) that express terms of service (WSDL, REST API Doc)

SERVICECONSUMER

CONTRACT

network

Loosely CoupledService and Consumer are independent

SERVICE

SERVICE INTERFACE - API

CONSUMER

CONSUMER

SERVICE

AutonomyServices encapsulate resources and Business Logic

SERVICE

Resources & logic

SERVICEResources

& logic

Service AbstractionService hides the Logic to the consumer

CONSUMER SERVICE

Resources & Business logic

network

Reusability and InteroperabilityServices can be used by several and differents consumers

SERVICE CONSUMER

CONSUMER

CONSUMER

network

network

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 CompositionA service can aggregate other services

SERVICE

SERVICE

SERVICE

BIG SERVICECONSUMERnetwork network

network

network

Task, Entity, UtilityTask 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 SOAMehmet 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 20021) 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?

Sourceshttp://soapatterns.org/

http://serviceorientation.com/

http://microservices.io/patterns/microservices.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