21
Service Layers 605.702 Service Oriented Architecture Johns-Hopkins University Montgomery County Center, Spring 2009 Session 6, Lecture 6: March 4, 2009 Instructor: T. Pole

S6 SOA Service Layers 030409 CH9

Embed Size (px)

Citation preview

Page 1: S6 SOA Service Layers 030409 CH9

8/3/2019 S6 SOA Service Layers 030409 CH9

http://slidepdf.com/reader/full/s6-soa-service-layers-030409-ch9 1/21

Service Layers

605.702 Service Oriented ArchitectureJohns-Hopkins University

Montgomery County Center, Spring 2009

Session 6, Lecture 6: March 4, 2009

Instructor: T. Pole

Page 2: S6 SOA Service Layers 030409 CH9

8/3/2019 S6 SOA Service Layers 030409 CH9

http://slidepdf.com/reader/full/s6-soa-service-layers-030409-ch9 2/21

Agenda

• Required Reading for This Week• Chapter 9: Service Layers

• Today’s Presentation 

 – Update on Chapter 8

 – Today’s Lecture 

• Text CH 9

 – Class Assignments

• Exercise #4, Implementing a Service Composition – Review for Mid Term Exam

• Mid Term is next week Wednesday March 11, 2009

Page 3: S6 SOA Service Layers 030409 CH9

8/3/2019 S6 SOA Service Layers 030409 CH9

http://slidepdf.com/reader/full/s6-soa-service-layers-030409-ch9 3/21

Ch 8 Principles of ServiceOrientation

• Additional notes on Chapter 8 have beenadded to the lecture notes for last week,Lecture 5 2/25/09

• Check these notes in reviewing for the midterm exam next week

Page 4: S6 SOA Service Layers 030409 CH9

8/3/2019 S6 SOA Service Layers 030409 CH9

http://slidepdf.com/reader/full/s6-soa-service-layers-030409-ch9 4/21

Chapter 9: Service Layers

• 9.1 SO and Contemporary SOA – Review table 9.1: how SOA characteristics are influenced by

Web Service specs and SO principles

• 9.2 Service Layer Abstraction – The service layer is between the application layer and the

business process layer (see Ch 8) – The implementation of the service interface layer is sub-divided

into layers following one of several different models

• 9.3 Application Service Layer• 9.4 Business Service Layer

• 9.5 Orchestration Service Layer• 9.6 Agnostic Services• 9.7 Service Layer Scenarios

Page 5: S6 SOA Service Layers 030409 CH9

8/3/2019 S6 SOA Service Layers 030409 CH9

http://slidepdf.com/reader/full/s6-soa-service-layers-030409-ch9 5/21

9.2 Service Layer Abstraction

• Figure 9.2 shows the SOA layers WITHIN thesingle Service Interface Layer of the EnterpriseArchitecture – Business Process Layer

Processes of the Enterprise, not just the IT systems – Service Interface Layer

• Orchestration Layer

• Business Service Layer – NOT the Business Process Layer

• Application Service Layer – NOT the Application Layer

 – Application LayerLegacy and Service Implementations

Page 6: S6 SOA Service Layers 030409 CH9

8/3/2019 S6 SOA Service Layers 030409 CH9

http://slidepdf.com/reader/full/s6-soa-service-layers-030409-ch9 6/21

9.3 Application Service Layer

• Sits within the Service Interface Layer, andintegrates with the Application Layer below

• Solution (Meaning business process) agnostic,

are more generic and usually reusable acrossmultiple biz processes

• Can also be used to integrate other applicationservices

• Mixture of custom and COTS products• Hybrids may cross the line between business

and application logic

Page 7: S6 SOA Service Layers 030409 CH9

8/3/2019 S6 SOA Service Layers 030409 CH9

http://slidepdf.com/reader/full/s6-soa-service-layers-030409-ch9 7/21

9.4 Business Service Layer

• Business services can be mapped to smallgrained or low level specific businessprocesses and entities

• Business oriented services can be – Entity Centric

 – Task Centric

 – Not both, but a business service layer can bea mix of both. Usually will be primarily one orthe other

Page 8: S6 SOA Service Layers 030409 CH9

8/3/2019 S6 SOA Service Layers 030409 CH9

http://slidepdf.com/reader/full/s6-soa-service-layers-030409-ch9 8/21

9.5 Control or OrchestrationService Layer

• Introduces another type or service, theprocess service (aka but not synonymouswith the controller service)

• Directly relates to a business process• Controls other business, hybrid and

application/utility services to automate a

process• Can be implemented in “non-technical”

languages, e.g. BPEL

Page 9: S6 SOA Service Layers 030409 CH9

8/3/2019 S6 SOA Service Layers 030409 CH9

http://slidepdf.com/reader/full/s6-soa-service-layers-030409-ch9 9/21

9.6 Agnostic Services

• Agnostic in this context can mean notbound to any one process

 – e.g. an entity based service can be used by

multiple biz processes that involve that entity

 – e.g. a utility service is by definition a genericreusable service not bound to any business

entity: task or entity based• Exist with the application service layer or

the business layer

Page 10: S6 SOA Service Layers 030409 CH9

8/3/2019 S6 SOA Service Layers 030409 CH9

http://slidepdf.com/reader/full/s6-soa-service-layers-030409-ch9 10/21

9.7 Service Layer Scenarios

• There is no one layered model for the Service InterfaceLayer, some options are: – Single hybrid layer

• Common, doesn’t evolve well, brittle 

 – Hybrid over utility

• Also common among mature software developers, reuse driven – Biz task centric over utility

• Often the goal for mature business centric developers

 – Task centric over entity centric over utility• Common among mature systems, flexible, adaptable

 – Orchestration over hybrid over utility• Better then single hybrid, but extending to new orch. difficult

 – Orchestration over task centric over utility• Flexible, evolves well, flexibly adjusts to change

Page 11: S6 SOA Service Layers 030409 CH9

8/3/2019 S6 SOA Service Layers 030409 CH9

http://slidepdf.com/reader/full/s6-soa-service-layers-030409-ch9 11/21

Exercise #4: Implementing aService Composition

SEAM Index------------------

Register AssetFindAsset

ClassifyAsset

DocManager------------------

StoreDocGetDoc

ClassifyAsset

TextIndexer------------------

IndexDocQueryIndex

TestConsumerUI

Page 12: S6 SOA Service Layers 030409 CH9

8/3/2019 S6 SOA Service Layers 030409 CH9

http://slidepdf.com/reader/full/s6-soa-service-layers-030409-ch9 12/21

Exercise #4 Interface: Services andOperations

• SEAMIndex Service (New Service and Functions) – AssetID RegisterAsset( string AssetAsText )

 – AssetID FindAsset( string Title, string Author )

 – bool ClassifyAsset( string AssetID, string Class)

• TextIndexer Service (Wraps Legacy Component) – Bool StatusFlag IndexDoc( string DocAsText )

 – AssetID[] QueryIndex( string Title, string Author )

• DocManager Service (Wraps Legacy Component) – AssetID StoreDoc( string DocContent )

 – string GetDoc( string DocID )

 – bool ClassifyDoc( string DocID, string Classification )

Page 13: S6 SOA Service Layers 030409 CH9

8/3/2019 S6 SOA Service Layers 030409 CH9

http://slidepdf.com/reader/full/s6-soa-service-layers-030409-ch9 13/21

Legacy Components API

• Supplied as C# Functions

 – TextIndexerAppLibrary

• bool IndexTerms( string Content )

• String FindDocs( string Title, string Author )

 – DocManagerAppLibrary

• string Store( string DocContent )

• string Retrieve( string DocID )• bool Categorize( string DocID, string Category )

Page 14: S6 SOA Service Layers 030409 CH9

8/3/2019 S6 SOA Service Layers 030409 CH9

http://slidepdf.com/reader/full/s6-soa-service-layers-030409-ch9 14/21

Integrating Legacy Apps

• Download complete applicationsassemblies from class web site

 – Integration Stubs available now

 – Fully functional projects will be published nextweek

• Add as projects to your solution

Page 15: S6 SOA Service Layers 030409 CH9

8/3/2019 S6 SOA Service Layers 030409 CH9

http://slidepdf.com/reader/full/s6-soa-service-layers-030409-ch9 15/21

Review for Mid Term Exam

• Review of the previous lectures

• Q&A for Chapters 1 – 9

• Review of Implementing Web Servicesand SOA Designs in VisualStudio/ASP.Net

• Additional Notes

Page 16: S6 SOA Service Layers 030409 CH9

8/3/2019 S6 SOA Service Layers 030409 CH9

http://slidepdf.com/reader/full/s6-soa-service-layers-030409-ch9 16/21

SOA Implementation via WebServices in ASP.Net

• Exercise #1: Web Service Consumers – Web Reference

• What is it doing?

• What is its purpose?• Exercise #2: Building a Web Service

 – What does a Visual Studio Web Serviceproject generate?

• Exercise #3: Publishing a Web Service – What is published to the remote site?

Page 17: S6 SOA Service Layers 030409 CH9

8/3/2019 S6 SOA Service Layers 030409 CH9

http://slidepdf.com/reader/full/s6-soa-service-layers-030409-ch9 17/21

Additional Notes: ServiceOriented’ness 

• When designing a service oriented architecture, askyourself: – Is communication among services and consumers like a phone

conversation or the exchange of standard forms

 – If it is like a phone call interview, it is chatty and not serviceoriented.

• A service is being performed, but each interaction in the system isonly a piece of the complete service

 – If it is like an exchange of standard forms, and all the informationrequired to perform the service is on that single initial form, and

the information required is returned in a equally complete singleform, it is service oriented

• Example: You need to determine if several checksyou’ve written have cleared the bank. 

Page 18: S6 SOA Service Layers 030409 CH9

8/3/2019 S6 SOA Service Layers 030409 CH9

http://slidepdf.com/reader/full/s6-soa-service-layers-030409-ch9 18/21

Not Service Oriented

• Call the bank, the operator ask what your needis.

• You respond you wish to verify if these checkshave cleared

• They ask you to identify your account and yourperson.

• They validate your identity and ask whichchecks: which numbers and what dates.

• You give them the check information, one checkat a time.

• They verify each one at a time.

Page 19: S6 SOA Service Layers 030409 CH9

8/3/2019 S6 SOA Service Layers 030409 CH9

http://slidepdf.com/reader/full/s6-soa-service-layers-030409-ch9 19/21

Service Oriented

• You fill out a form which includes youraccount information, personal identifiers,the service you want performed (verify

checks have cleared), and the numbers ofthe checks.

• The response is another form listing the

state of all the checks you have asked tohave verified.

Page 20: S6 SOA Service Layers 030409 CH9

8/3/2019 S6 SOA Service Layers 030409 CH9

http://slidepdf.com/reader/full/s6-soa-service-layers-030409-ch9 20/21

The Difference?

• They both perform the same businessprocess

• They both have the same accuracy andcompleteness

• One is a complete service performed inone single step, and is service oriented

• The other is performed by many relatedinterdependent steps, and is not

Page 21: S6 SOA Service Layers 030409 CH9

8/3/2019 S6 SOA Service Layers 030409 CH9

http://slidepdf.com/reader/full/s6-soa-service-layers-030409-ch9 21/21

Summary• Session 7: 3/11/09

 – Mid Term Exam

 – Introduction of Class Week

• Spring Break the following week – Exercise #4 is due 3/25/09

 – Specifications for Class Project will bepresented