Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Introduction to Service Oriented Architecture

Presentation conducted in October of 2007 discussing the fundamentals behind SOA.

  • Login to see the comments

Introduction to Service Oriented Architecture

  1. 1. Introduction to SOA Arabinda (Ari) Roy Senior Project Manager DATA Inc. Montvale, NJ [email_address]
  2. 2. <ul><li>Session I – The Nuts and Bolts </li></ul><ul><li>Why SOA? </li></ul><ul><li>What is SOA anyway? </li></ul><ul><li>Who should adopt SOA? </li></ul><ul><li>When to adopt SOA? </li></ul><ul><li>Challenges </li></ul><ul><li>Session II – Examples </li></ul><ul><li>How to build a real world SOA application </li></ul>Today's Agenda
  3. 3. Why SOA ? Is it compelling enough?
  4. 4. Which one would you pick? ERP/ AS-400 CRM / Siebel Oracle Server PO System/ IBM Mainframe E-Commerce / Web sphere on Solaris Scenario 1
  5. 5. Which one would you pick? Service Bus Scenario 2 CRM/ Oracle Server ERP/ AS-400 E-Commerce/ WebSphere- Solaris PO System/ IBM Mainframe
  6. 6. <ul><li>Which is the ‘better’ implementation? </li></ul><ul><li>Which is easier to maintain? </li></ul><ul><li>Which is the more agile solution? </li></ul><ul><li>To what extent can you use the features? </li></ul>What are your objectives? Which case fits your situation?
  7. 7. The Evolution of SOA <ul><li>Years ago electronic systems were self-contained monolithic systems </li></ul><ul><li>Today’s gadgets are pluggable and independent </li></ul><ul><li>Standardized connections </li></ul>The analogy of A/V Components
  8. 8. The Evolution of Dist. Computing <ul><li>How it all grew… </li></ul>Downsize (Client /Server) Component (CORBA, EJB/RMI, DCOM) Messaging MOM Mainframe/Mid Range Service Orientation
  9. 9. Application Service Evolution Class Layer Service Layer Component Layer Structured design Service Oriented Design (Inter-Enterprise Scope) Component Oriented Design (Inter-Application Scope) Object Oriented Design
  10. 10. Evolution from an IT prospective <ul><li>Parallels drawn between trends </li></ul><ul><ul><li>1970’s – Legacy systems </li></ul></ul><ul><ul><li>2000’s – Distributed systems </li></ul></ul><ul><li>Ideas were always there… </li></ul><ul><ul><li>20 years later now with more disparate platforms.. The need is rising </li></ul></ul><ul><li>Realization possible </li></ul><ul><ul><li>Ubiquity the of Web </li></ul></ul>
  11. 11. Example IBM Mainframe Middleware XML XHTML Campus Users Example of a “Service” that incorporates Mainframe code COBOL Application 1989 & Service for retrieving updating travel Information
  12. 12. Benefits of SOA <ul><li>Efficient and effective usage of ‘Business Services’ </li></ul><ul><li>Greater agility </li></ul><ul><li>Loosely-coupled with reusable assets and services </li></ul><ul><li>Promotes productivity </li></ul><ul><ul><li>Reduces time-to-market </li></ul></ul><ul><li>Drives business processes closer to end users </li></ul>
  13. 13. Benefits of SOA <ul><li>Technology agnostic </li></ul><ul><li>Leverage and integrate existing applications </li></ul><ul><li>Build, maintain & extend vs. rip and replace </li></ul><ul><li>Provide standard connections between systems </li></ul><ul><li>Abstract complexity for developers </li></ul>
  14. 14. Benefits of SOA Independence from technology Adequate business infrastructure Agility Reuse Risk mitigation Evolutionary approach Cost savings More efficient development process Feedback at different levels
  15. 15. What is SOA?
  16. 16. Drawing Parallels… <ul><li>Mumbai, India : Density of 49K-65K people per sq km. </li></ul><ul><li>What symbolizes Mumbai - Gateway of India, Victoria Terminus or the Dabbawalla? </li></ul><ul><li>Why the Dabbawalla? </li></ul>Studied by CMU, NITIE, Univ. of Pittsburg, CMM, etc. Editorials in the Washington Post, NY Times, Indian news
  17. 17. Discover Customized Service Consumers at Different location Collect and Route Pickup and Deliver Standardize
  18. 18. Lessons from Dabbawalla <ul><li>Granularity: </li></ul><ul><ul><li>Contents are prepared individually and tagged </li></ul></ul><ul><li>Standardization: </li></ul><ul><ul><li>All containers are identical in size </li></ul></ul><ul><ul><li>Each has unique markings for routing, traceability and delivery that is understood by all the 4500+ semi-literate co-workers </li></ul></ul>
  19. 19. <ul><li>Integration and service assurance: </li></ul><ul><ul><li>Each of the 4500+ co-workers are not employed, but work independently as franchises! </li></ul></ul><ul><ul><li>Service is guaranteed. The association is a binding force. </li></ul></ul><ul><li>Low cost: </li></ul><ul><ul><li>Service charge ≈ $7 /month /dabba. </li></ul></ul>Lessons from Dabbawalla
  20. 20. <ul><li>Performance and speed: </li></ul><ul><ul><li>Pick up from homes. </li></ul></ul><ul><ul><li>200,000+ boxes distributed by hand before lunch time. </li></ul></ul><ul><ul><li>Average of 4 changes of hands and 3 modes of transport (bus, train, bicycle). </li></ul></ul><ul><ul><li>Each Dabbawalla memorizes up to 35 address. </li></ul></ul>Lessons from Dabbawalla
  21. 21. <ul><li>High Reliability: </li></ul><ul><ul><li>Only one mix-up in 6million deliveries. </li></ul></ul><ul><ul><li>Six sigma certified (reference official website). </li></ul></ul><ul><li>Built in Redundancy </li></ul><ul><li>Flexibility and Scalability </li></ul><ul><ul><li>Ability to serve new locations and add more customers </li></ul></ul>Lessons from Dabbawalla
  22. 22. Question: Can parallels be drawn between Dabawalla and SOA? Question: What does Dabbawalla and SOA have in common? Lessons from Dabbawalla
  23. 23. Definition of SOA <ul><li>Service Oriented Architecture </li></ul><ul><ul><li>Autonomous loosely coupled coarse grained business services that can be discovered and accessed by other applications </li></ul></ul><ul><li>Service Oriented Architecture </li></ul><ul><ul><li>More agile application infrastructure that responds swiftly to shifting business / demands and re-compose services </li></ul></ul>Can we define a Service Oriented Architecture? Our version…
  24. 24. Definition of SOA <ul><li>Service Oriented Architecture </li></ul><ul><ul><li>Broad framework on which enterprises build, deploy, re-compose and manage services </li></ul></ul><ul><ul><li>Accessed through standard protocols </li></ul></ul>Can we define a Service Oriented Architecture? Our version…
  25. 25. Characteristics of SOA <ul><li>Services are platform independent, self describing interfaces (XML) </li></ul><ul><li>Messages are formally defined </li></ul><ul><li>Services can be discovered </li></ul>Interoperable Loosely Coupled Reusable Composable
  26. 26. Characteristics of SOA <ul><li>Services have quality of service characteristics defined in policies </li></ul><ul><li>Services can be provided on any platform </li></ul><ul><li>Can be governed </li></ul>Interoperable Loosely Coupled Reusable Composable Scalable
  27. 27. Examples of a Service <ul><li>Creating a Purchase Order inside a mainframe application </li></ul><ul><li>Requesting and reserving a room in a hotel </li></ul><ul><li>Applying for a loan by filling out a loan request form </li></ul><ul><li>Search books/music based on keywords </li></ul>
  28. 28. Key components of SOA Discovering SOA Analogy: “The 6 blind men and the Elephant” SNAKE ? FAN ? SPEAR ? TREE ? ROPE ? WALL ?
  29. 29. Different interpretation of SOA… ESB ? XML ? BPEL ? Web services ? SOAP? RESTful ?
  30. 30. Key components of SOA SOA Business Services Enterprise Service Bus Service Repository Contract Implementation Interface Governance Front-End Data Business Logic
  31. 31. Key components of SOA <ul><li>Services (common denominator) </li></ul><ul><li>Service Description </li></ul><ul><li>Advertising and Discovery </li></ul><ul><li>Specification of associated data model </li></ul><ul><li>Service contracts </li></ul>
  32. 32. SOA architecture Finds and Retrieves Registers Invokes Service Directory Service Consumer Service Provider
  33. 33. The SOA Life Cycle
  34. 34. Challenges SOA Alphabet Soup What Would You Choose? Axis JBI
  35. 35. Associated Terminology Service Oriented Architecture SOA Service Oriented Development of Applications SODA Service Oriented Business Applications SOBA Web Services WS Service Oriented Enterprise SOE Global Delivery Model GDM Enterprise Service Provider ESP Business Process Management BPM Business Process Outsourcing BPO
  36. 36. How does SOA Work?
  37. 37. Using a Service Developer Service Repository Service Contract Service Client ( Application front-end or services ) Service Stub Contains Creates Searches in Based on Invokes Uses Fulfills Describes
  38. 38. SOA Start-Up checklist <ul><li>Decide what functionality is needed </li></ul><ul><li>Understand your business </li></ul><ul><li>Build a SOA Management or ESB </li></ul><ul><li>Do a ‘reality check’ on underlying application platforms </li></ul><ul><li>Plan for a registry and repository </li></ul><ul><li>Assess the hardware requirements </li></ul><ul><li>Do you need a firewall? </li></ul>
  39. 39. SOA Stack- Based on Standards Source : Network Computing Magazine
  40. 40. SOA – A Perspective <ul><li>Strategy and Roadmap </li></ul><ul><li>Organization and Culture </li></ul><ul><li>IT process governance </li></ul><ul><li>Provisioning and Sourcing Policies </li></ul><ul><li>Resource Optimization within IT and Business. </li></ul><ul><li>Convergence of IT and Business. </li></ul><ul><li>IT process for SOA </li></ul><ul><li>Provider/Consumer Supply Chain </li></ul>Management Framework Interest Focus SOA Choreography
  41. 41. SOA – A Perspective <ul><li>Enterprise Architecture Context </li></ul><ul><li>Architectural Constructs of SOA </li></ul><ul><li>Architectural Governance </li></ul><ul><li>Arch. and Design Policies </li></ul><ul><li>Federated Service Architecture </li></ul><ul><li>Service Identification and Specification </li></ul><ul><li>Lifecycle of Service </li></ul>Architectural Framework Interest Focus SOA Choreography
  42. 42. SOA – A Perspective <ul><li>Standards </li></ul><ul><li>Service Technologies </li></ul><ul><li>Run-Time Governance </li></ul><ul><li>Operational Policies </li></ul><ul><li>Run-Time Deployment of Service and Resources </li></ul><ul><li>Operational Infrastructure </li></ul><ul><li>Service Management </li></ul>Deployment Framework Interest Focus SOA Choreography
  43. 43. Enterprise Service BUS
  44. 44. Enterprise Service BUS <ul><li>An architectural pattern – not a single product </li></ul><ul><ul><li>Provides interconnectivity services </li></ul></ul><ul><ul><li>Interacts based on the QoS requirements </li></ul></ul><ul><li>Common infrastructure for SOA, events, messages </li></ul><ul><ul><li>Connects and integrates an enterprise's IT business </li></ul></ul><ul><ul><li>Bridges heterogeneous platforms, environments and transports </li></ul></ul>A closer look
  45. 45. Enterprise Service BUS <ul><li>Mediates service requests and responses </li></ul><ul><ul><li>Performs transformation, routing and other “value-added” services </li></ul></ul><ul><ul><li>Content based routing, Publish/Subscribe (Event based), Simple XML transformation </li></ul></ul><ul><ul><li>Enables connection-type transparency </li></ul></ul><ul><li>Standard Based </li></ul><ul><ul><li>HTTP/HTTPS with option for WS-Reliable Messaging </li></ul></ul><ul><ul><li>Open APIs and protocols support the interoperability and substitution of middleware from multiple vendors </li></ul></ul><ul><ul><li>JMS, JAX-RPC, SOAP </li></ul></ul><ul><ul><li>WS-Security, WS-Policy, WS-* </li></ul></ul>A closer look
  46. 46. BPEL <ul><li>BPEL = Business Process Execution Language </li></ul><ul><li>Describes Service Orchestration </li></ul><ul><li>Describes Service Interaction </li></ul><ul><li>Easy to write and change </li></ul>
  47. 48. Structure of BPEL <process> <!– Definition and roles of process participants --> <partnerLinks> ... </partnerLinks> <!- Data/state used within the process --> <variables> ... </variables> <!- Properties that enable conversations --> <correlationSets> ... </correlationSets> <!- Exception handling --> <faultHandlers> ... </faultHandlers> <!- Error recovery – undoing actions --> <compensationHandlers> ... </compensationHandlers> <!- Concurrent events with process itself --> <eventHandlers> ... </eventHandlers> </process> Process Language
  48. 49. <switch> <faultHandlers> Determine if Can Fulfill 10:00am Handle Negative Credit Exception Discount Service start end BPEL Flow ? Credit Service Inventory Service Get Discount Send Credit Application Receive Credit Result 03:00pm Send Inventory Request Receive Inventory Result <process> </process> <variable> <partnerLink> <partnerLink> <partnerLink> <receive> <invoke> <invoke> <flow> </flow>
  49. 50. Model View Controller Revisited View Query UI Controller Task Engine Business Process Controller Task Request Select Task Service Request Change State Controller Model Changed Model Changed Select View WS WS WS WS Model
  50. 51. SOA requirements View ERP PLM CRM UI Controller Task Engine Business Process Controller Service Request WS Query Engine WS WS WS WS WS WS A Complete Separation of the Business Logic and UI
  51. 52. Planning for SOA @ myorg <ul><li>Think strategically and plan tactically </li></ul><ul><li>Evolutionary not revolutionary </li></ul><ul><li>Focus on approach, not technology </li></ul><ul><li>“Leave & layer vs. rip & replace” ( Gartner Group) </li></ul>Approach
  52. 53. Planning for SOA @ myorg <ul><li>Make it easy for developers to adopt </li></ul><ul><li>Natural progression of original Object Oriented Architecture and Approach </li></ul><ul><li>Not going to happen overnight- It takes time: “the true adoption is about two years behind the hype”. ( Gartner Group) </li></ul>Approach
  53. 54. Planning for SOA @myorg <ul><li>Process </li></ul><ul><ul><li>Experiment with Web Services </li></ul></ul><ul><ul><ul><li>Small Project – High Degree of Success </li></ul></ul></ul><ul><ul><ul><li>Helpful not Vital </li></ul></ul></ul><ul><ul><li>Adapt some existing systems to use Services </li></ul></ul><ul><ul><li>Remove Intersystem dependencies </li></ul></ul><ul><ul><li>Establish an Internal SOA </li></ul></ul><ul><ul><li>Expand Internal SOA to include external services. </li></ul></ul>
  54. 55. Challenges of SOA
  55. 56. Reality Check … Screen Scrape Screen Scrape Screen Scrape Screen Scrape Message Queue Message Queue Message Queue Download File Download File Download File Transaction File Transaction File Transaction File ORB ORB CICS Gateway CICS Gateway APPC APPC RPC RPC Transaction File Sockets Sockets Message Message Application Application Application Application Application Application Application Application Application Application
  56. 57. Implementation Challenge (1) <ul><li>Technical Challenges </li></ul><ul><ul><li>Security challenges - loosely coupled environment </li></ul></ul><ul><ul><li>Performance - XML brings robustness not speed </li></ul></ul><ul><ul><li>Optimization </li></ul></ul><ul><ul><li>Organizing the services – registry & repository </li></ul></ul>
  57. 58. Implementation Challenge (2) <ul><li>Organizational and Cultural Challenges </li></ul><ul><ul><li>Paradigm shift for developers </li></ul></ul><ul><ul><li>Paradigm shift for IT Managers </li></ul></ul><ul><ul><li>More organizational discipline </li></ul></ul><ul><ul><li>Governance </li></ul></ul><ul><ul><li>Transactional services </li></ul></ul>
  58. 59. Who should use SOA?
  59. 60. <ul><li>eBay </li></ul><ul><ul><li>Abstracting enterprise information </li></ul></ul><ul><ul><li>Helped to mange more than 2 perabytes of data </li></ul></ul><ul><li>IBM </li></ul><ul><ul><li>77 shareable and reusable services in production </li></ul></ul><ul><ul><li>Reduced application inventories </li></ul></ul><ul><li>Wachovia Bank </li></ul><ul><ul><li>Improve business productivity </li></ul></ul><ul><ul><li>Bring IT closer to business </li></ul></ul><ul><li>Harley Davidson </li></ul><ul><ul><li>Break up inflexible system </li></ul></ul><ul><ul><li>Credit and Loan origination process </li></ul></ul><ul><li>Hewlett Packard </li></ul><ul><ul><li>Reuse across services </li></ul></ul><ul><ul><li>Cutting operational costs </li></ul></ul>Where SOA made a difference Top Organizations where SOA made a difference in 2006
  60. 61. <ul><li>Ameriprise Financial </li></ul><ul><ul><li>Reuse of crucial business services </li></ul></ul><ul><ul><li>Saved millions of dollar of development cost of new products/services </li></ul></ul><ul><li> </li></ul><ul><ul><li>H andle 60 million customers and one million partners </li></ul></ul><ul><ul><li>Handle growing Transactional load </li></ul></ul><ul><li>Citi Group </li></ul><ul><ul><li>Governace </li></ul></ul><ul><ul><li>Enable “separation of powers” among corporate, divisions, departments </li></ul></ul><ul><li>OnStar </li></ul><ul><ul><li>Move business rules out of applications </li></ul></ul><ul><li>DreamWorks </li></ul><ul><ul><li>Simplify and consolidate key business operations </li></ul></ul><ul><ul><li>Use SOA to make movies a easier process </li></ul></ul><ul><li>Volvo </li></ul><ul><ul><li>Better customer service by linking all dealership in Belgium </li></ul></ul>Where SOA made a difference Top Organizations where SOA made a difference in 2006
  61. 62. Session II Sample Case Study <SOA> as an Application bridge
  62. 63. Technology/Architecture used <ul><li>J2SE 5 (Java 2 platform Std Ed) </li></ul><ul><li>Java EE 5 (Enterprise Edition) </li></ul><ul><li>Apache Maven, Ant </li></ul><ul><li>Glassfish Application Server </li></ul><ul><li>REST based architecture </li></ul><ul><li>Java Web Services (JWS) API </li></ul>
  63. 64. What is REST? <ul><li>RESTful services are stateless </li></ul><ul><li>REST services have a uniform interface </li></ul><ul><li>Built from resources </li></ul><ul><li>Manipulate resources by exchanging representation of resources </li></ul>( Representational State Transfer )
  64. 65. Problem context <ul><li>XYZ company has many EIS systems: </li></ul><ul><ul><li>Order Management System <OMS> (SAP) </li></ul></ul><ul><ul><li>Customer Service System <CSS> (Seibel) </li></ul></ul><ul><ul><li>Point of Sales System </li></ul></ul><ul><ul><li>…the list goes on </li></ul></ul>
  65. 66. Problem Context contd.. <ul><li>Customer calls to determine order status </li></ul><ul><li><CSS> invokes a RPC /Web services on <OMS> </li></ul><ul><li>Order information retrieved and passed back to <CSS> </li></ul><ul><li>Customer waits avg. 20 sec to receive order status </li></ul>
  66. 67. Business Impact <ul><li>Falling customer loyalty </li></ul><ul><li>Customers switching to competitors for better service </li></ul><ul><li>Higher operational cost </li></ul><ul><li>Change in one system affecting the other </li></ul>
  67. 68. Proposed Solution <ul><li>Use SOA as an application bridge </li></ul><ul><li>Every time a new order is entered in <OMS>, SOA transfers information to <CSS> and adds to customer history log </li></ul><ul><li><CSS> has basic customer order info </li></ul><ul><li>Go to <OMS> only for more detailed info </li></ul><ul><li>Reduces response by more than 50% </li></ul>
  68. 69. Sample Customer Order SOA using JAVA Web services – Mark D. Hansen
  69. 70. XML representation of Order Record source: SOA using java Web services –Mark D. Hansen
  70. 71. Customer History record source: SOA using java Web services –Mark D. Hansen
  71. 72. XML representation of Customer History record source: SOA using java Web services –Mark D. Hansen
  72. 73. Getting EIS record using REST and JWS source: SOA using Java Web Services –Mark D. Hansen
  73. 74. Sending EIS record using REST : Push messaging /w JWS source: SOA using Java Web Services –Mark D. Hansen
  74. 75. RESTful Services deployed using Provider <Source> source: SOA using Java Web Services –Mark D. Hansen
  75. 76. Sales order – Customer History Data mapping
  76. 77. XSLT for transformation – SOA style integration
  77. 78. RESTful Services deployed on Glassfish: Package structure and assembly: Snapshot-I
  78. 79. RESTful Services deployed on Glassfish : Snapshot- II
  79. 80. RESTful Services deployed on Glassfish : Snapshot-III
  80. 81. Resources: <ul><li>Books: </li></ul><ul><li>1. SOA : Using Java Web Services </li></ul><ul><li>- by Mark D. Hansen </li></ul><ul><li>2. Service-Oriented Architecture (Concepts, Technology and Design) - by Thomas Erl </li></ul><ul><li>Web resources: </li></ul><ul><li> </li></ul><ul><li> </li></ul><ul><li> </li></ul><ul><li> </li></ul>
  81. 82. Q&A
  82. 83. Thank you! Visit my company’s website at