Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 26

SOA in the Real World

June 02, 2011

Agenda
SOA Basics SOA In The Real World

SOA Basics
Why SOA What SOA Means 4 Tenets of SOA What the tenets mean
3

SOA Basics Why SOA ?


Problems:
Systems today are bigger than ever before Complexity increases exponentially with size - Juval Lowey Systems need to be interconnected OO solved the problems of small-medium sized systems CO (Component Orientation) solved problems OO couldn t on medium-large systems Neither OO nor CO could cope with the problems of very large systems, systems of systems, or integration between systems
4

SOA Basics Why SOA ?

SOA Basics What SOA Means


SOA attempts to solve problems OO and CO could not solve by raising the level of abstraction Architecture composed of services Efficient for:
large systems distributed systems systems of systems

Inefficient for:
Small medium sized systems Non-distributed systems
6

SOA Basics What SOA Means

SOA Basics What SOA Means


SOA attempts to solve problems OO and CO could not solve by raising the level of abstraction Architecture composed of services Efficient for:
large systems distributed systems systems of systems

Inefficient for:
Small medium sized systems Non-distributed systems
8

So what s a service ?

SOA Basics 4 Tenets of SOA


A service is autonomous A service has explicit boundaries A service exposes schema & contract, not class or type A service allows or denies use based on policy

SOA Basics What the tenets mean


A service is autonomous
You dont new a service its just there.
private void btnSave_OnClick(object sender, System.EventArgs e) { BL.User u = new BL.User(); u.FirstName = txtFirstName.Text; u.LastName = txtLastName.Text; u.Address = txtAddress.Text; u.Save(); }
10

SOA Basics What the tenets mean


A service is autonomous
You dont new a service its just there.

A service has explicit boundaries


Services run in a separate process from their clients A boundary must be crossed to get from the client to the service network, security,

11

A service is autonomous

SOA Basics What the tenets mean


You dont new a service its just there.

A service has explicit boundaries


Services run in a separate process from their clients A boundary must be crossed to get from the client to the service network, security,

A service exposes schema & contract, not class or type


Clients send messages to a service that conform to a contract
12

SOA Basics What the tenets mean


private void btnSave_OnClick(object sender, System.EventArgs e) { UserRequest ur = new UserRequest( UserActions.Save, txtFirstName.Text, txtLastName.Text, txtAddress.Text); UserResponse response = BL.UserService.DoRequest(ur); }

13

SOA Basics What the tenets mean


A service is autonomous
You dont new a service its just there.

A service has explicit boundaries


Services run in a separate process from their clients A boundary must be crossed to get from the client to the service network, security,

A service exposes schema & contract, not class or type


Clients send messages to a service that conform to a contract

A service allows or denies use based on policy


The service decides what messages it processes
14

SOA Basics What the tenets mean


private void btnSave_OnClick(object sender, System.EventArgs e) { UserRequest ur = new UserRequest( UserActions.Save, txtFirstName.Text, txtLastName.Text, txtAddress.Text); SignedRequest sr = myCertificate.Sign(ur); BL.UserService.EnqueueRequest(sr); }

15

SOA In The Real World


Messaging Trust Time

16

SOA In The Real World - Messaging


Clients communicate with a service with messages
How does the client get the message contract?
Usually is given a DLL for non-web services scenarios

How does the client know where the service is?


Usually hard coded dynamic discovery hasnt delivered yet, versioning is often a problem
17

SOA In The Real World - Messaging


Messaging between client & service
All info encapsulated in the message

Client Perform this action on entities with these IDs

Service

18

SOA In The Real World - Messaging


Clients NEVER get references to objects inside the service
How can client code still be OO (or CO) ?
Messages need to be wrapped appropriately. Often, client code will need to temporarily store several changes in order to send a single message -> Service agents do this.

19

SOA In The Real World - Messaging


Clients need to work with several services
How does client code aggregate data using messaging?
There is no INNER JOIN between services. Client copies data from the services into it s own DB. -> How is stale data handled?

20

SOA In The Real World - Trust


How does the service know which clients to trust?
Each message from the client needs to contain information about who the client is, and what it s credentials are.
Authentication data is passed out of band header. usually in the

If encryption is used, messages can get bloated and negatively impact performance. Secure conversation mechanisms can help.

21

SOA In The Real World - Time


Asynchronous messaging introduces the possibility that certain assumptions that were true when a message was sent, may no longer be true when it arrives.
Logic needs to be added to client code that indicates under what circumstances the message should be processed.
Example: A new order for 500 widgets is sent based on the price, $1/widget and the order should be processed only if the price doesn t increase more than %5.

22

SOA In The Real World - Time


If you think that making everything synchronous will solve time issues think again.
Request Response is SLOW !! Are you really going to make the user wait until the service sends a response, before letting them do the next action ? Even then, it won t solve the example problem of price changes without a way for the client to lock the data in the service while it decides if the price is right.
23

SOA In The Real World - Time


Forget about transactions between services. ACID is dead. Client code needs to add logic to handle what ACID did.
It is NOT easy.

24

25

Thank you

Vamsi Pratapa Phani Bhushan Karri Vamsi Gunturi

You might also like