Your SlideShare is downloading. ×
SOA Patterns: New Insights or Recycled Knowledge?
SOA Patterns: New Insights or Recycled Knowledge?
SOA Patterns: New Insights or Recycled Knowledge?
SOA Patterns: New Insights or Recycled Knowledge?
SOA Patterns: New Insights or Recycled Knowledge?
SOA Patterns: New Insights or Recycled Knowledge?
SOA Patterns: New Insights or Recycled Knowledge?
SOA Patterns: New Insights or Recycled Knowledge?
SOA Patterns: New Insights or Recycled Knowledge?
SOA Patterns: New Insights or Recycled Knowledge?
SOA Patterns: New Insights or Recycled Knowledge?
SOA Patterns: New Insights or Recycled Knowledge?
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

SOA Patterns: New Insights or Recycled Knowledge?

343

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
343
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Gregor Hohpe: SOA Patterns SOA Patterns: New Insights or Recycled Knowledge? Gregor Hohpe Software Engineer www.eaipatterns.com © 2007 Google, Inc. All rights reserved, Could It Be So Easy? WSDL Int MyMethod(String text) {…} SOAP WebMethod Cut WS-* Copy Paste • Buzzword compliant, but not a service-oriented architecture • Synchronous call stack mentality • No interface-implementation separation © 2007 Google, Inc. All rights reserved, 2 Fifth International Workshop on SOA and Web Services Best Practices 1
  • 2. Gregor Hohpe: SOA Patterns SOA on Architect's Napkin Endpoint Orchestration Application Message Document Conversation Transform Application Rules “Architect’s Dream” © 2007 Google, Inc. All rights reserved, 3 SOA on Developer's Napkin Object-Document Event-based Mapping Endpoint Programming Orchestration Application Message Document Process Conversation Modeling Transform Application Protocol Declarative Design Programming Rules “Developer’s Nightmare” © 2007 Google, Inc. All rights reserved, 4 Fifth International Workshop on SOA and Web Services Best Practices 2
  • 3. Gregor Hohpe: SOA Patterns Service-oriented architectures involve a variety of new programming models. We can expect to see a renaissance of design patterns that capture our experience in using them correctly. © 2007 Google, Inc. All rights reserved, 5 Understanding Technology • Syntax • Basic language mechanism • Artefact of crude input devices • Constructs • "Vocabulary": Objects, Classes, Interfaces, Inheritance • Easily explained but no guidance on good design • Principles • Separation of Concerns, Open-Closed, etc. • Help evaluate a solution • Patterns • Guidance © 2007 Google, Inc. All rights reserved, 6 Fifth International Workshop on SOA and Web Services Best Practices 3
  • 4. Gregor Hohpe: SOA Patterns Patterns Origin – C. Alexander BED ALCOVE Design problem Bedrooms make no sense. Forces First, the bed in a bedroom creates awkward spaces around it: dressing, working, watching television, sitting, are all rather foreign to the side spaces left over around a bed. Second, the bed itself seems more comfortable in a space that is adjusted to it. Solution Don't put single beds in empty rooms called bedrooms, but instead put individual bed alcoves off rooms with other nonsleeping functions, so the bed itself becomes a tiny private haven. © 2007 Google, Inc. All rights reserved, 7 Design Patterns • “Mind sized” chunk of information (Ward Cunningham) • Human-to-human communication • Expresses intent (the “why” vs. the “how”) • Observed from actual experience • Not a firm rule • Not copy-paste code © 2007 Google, Inc. All rights reserved, 8 Fifth International Workshop on SOA and Web Services Best Practices 4
  • 5. Gregor Hohpe: SOA Patterns Design Patterns in Software Development • Substitute for industry standard vocabulary • "Soft" around the edges • Guide in the absence of strict rules • Subject to hype cycle: "pattern" = "credible" © 2007 Google, Inc. All rights reserved, 9 10 Years After GoF -- Why Revisit Patterns? • New programming models bring new patterns. • Patterns are expressed using the constructs of the underlying architectural style (e.g. OO, SOA). • Good to document our knowledge when not all kinks are worked out yet. • Patterns help discover higher levels of abstraction. • Ultimately, some patterns can be implemented in the platform. © 2007 Google, Inc. All rights reserved, 10 Fifth International Workshop on SOA and Web Services Best Practices 5
  • 6. Gregor Hohpe: SOA Patterns New Programming Models in SOA • Event-based, Asynchronous Programming • Explicit state management • Sequencing, timing uncertainty • Declarative Programming • Execution path chosen at run-time • XSLT, Rules engines • Object-Document Mapping • Analogous to O-R mapping: subtle, but important • Process Modeling • Many concurrent, long-running instances • No two-phase-commit style transactions • Protocol Design © 2007 Google, Inc. All rights reserved, 11 “Doodleware” Only Limited Help • Example • Graphical process editors • Graphical transformation editors • We love pictures • Programming in pictures tedious • Scalability issues “EAI Art” • Diff, Merge mostly unsupported • Often a thin veneer over a complex (or unfamiliar) programming paradigm © 2007 Google, Inc. All rights reserved, 12 Fifth International Workshop on SOA and Web Services Best Practices 6
  • 7. Gregor Hohpe: SOA Patterns New Patterns in SOA • Asynchronous Messaging Patterns • Conversation Patterns • Orchestration Patterns • Process / Workflow Patterns • Endpoint Patterns • Security Patterns • Architectural Patterns •… © 2007 Google, Inc. All rights reserved, 13 Async. Messaging Patterns • Components communicate via message exchanges • Simplified interaction model • Compose solutions out of routing, transformation elements • www.eaipatterns.com • 65 patterns • Java, C#, Axis, JMS, MSMQ, TIBCO, BizTalk © 2007 Google, Inc. All rights reserved, 14 Fifth International Workshop on SOA and Web Services Best Practices 7
  • 8. Gregor Hohpe: SOA Patterns Messaging Pattern Language Message R outing Message Construction Message Router Content-Based Router Message Message Filter Command Message Dynamic Filter Message Document Message Recipient List Transformation Event Message Splitter Message Translator Request-Reply Aggregator Envelope Wrapper Return Address Resequencer Content Enricher Correlation Identifier Composed Msg. Processor. Content Filter Message Sequence Scatter-Gather Claim Check Message Expiration Routing Slip Normalizer Format Indicator Process Manager Canonical Data Model Message Broker Endpoint Endpoint Message Router Translator Channel Application Application A B Messaging Endpoints Messaging Message Endpoint Channels S ystems Messaging Gateway Message Channel Management Messaging Mapper Point-to-Point Channel Monitoring Control Bus Transactional Client Publish-Subcr. Channel Detour Polling Consumer Datatype Channel Wire Tap Event-Driven Consumer Invalid Message Channel Message History Competing Consumers Dead Letter Channel Message Store Message Dispatcher Guaranteed Messaging Smart Proxy Selective Consumer Channel Adapter Test Message Durable Subscriber Messaging Bridge Channel Purger Messaging Adapter Message Bus Idempotent Receiver © 2007 Google, Inc. All rights reserved, 15 Service Activator Conversations Conversation Conversation State State Internal State: Internal State: Internal State: Internal State: Order Processing Waiting for Waiting for Processing Payment Payment Payment Payment Invoice Payment Internal State: Internal State: Making Drinks Making Drinks Drinks • A process supports the desired exchange of messages through send and receive activities • Each conversation corresponds to one process instance • Each participant has a (potentially different) process definition © 2007 Google, Inc. All rights reserved, 16 Fifth International Workshop on SOA and Web Services Best Practices 8
  • 9. Gregor Hohpe: SOA Patterns Conversation Patterns Discovery Discovery Multi-Party Conversations Multi-Party Conversations Dynamic Discovery Dynamic Discovery Proxy Proxy Consult Directory Consult Directory Contingent Requests Contingent Requests Referral Referral Reaching Agreement Reaching Agreement Leader Election Leader Election Establishing a Conversation Establishing a Conversation Three-way Handshake Three-way Handshake Reaching Agreement Reaching Agreement Acquire Token First Acquire Token First Receiver Cancels Receiver Cancels Rotate Tokens Rotate Tokens Sender Cancels Sender Cancels Address Verification Address Verification Binding Request Binding Request Binding Offer Binding Offer Basic Conversations Basic Conversations Resource Management Resource Management Fire-and-Forget Fire-and-Forget Lease Lease Request-Response Request-Response Renewal Reminder Renewal Reminder Request-Response with Retry Request-Response with Retry Polling Polling Error Handling Error Handling Subscribe-Notify Subscribe-Notify Do Nothing Do Nothing Quick Acknowledgment Quick Acknowledgment Retry Retry Compensating Action Compensating Action © 2007 Google, Inc. All rights reserved, 17 Process Patterns • Long-running processes • Multiple instances of a process template • Orchestration ≈ process across multiple services exposed as composite service • WS-BPEL (Business Process Execution Language) Orchestration describes the automated arrangement, coordination, and management of complex computer systems, middleware, and services. --WikiPedia © 2007 Google, Inc. All rights reserved, 18 Fifth International Workshop on SOA and Web Services Best Practices 9
  • 10. Gregor Hohpe: SOA Patterns Workflow Patterns (Subset) • Exclusive Choice (XOR) A • Choose one execution path from many alternatives B C A • Multiple Choice (OR) • Choose several execution paths from many B C D alternatives © 2007 Google, Inc. All rights reserved, 19 Workflow Patterns (Subset) • Synchronizing Merge • Merge many execution paths. A B Synchronize if multiple paths are taken. Wait for A and B, C then execute C once • Multiple Merge A B • Merge many execution paths without Execute C synchronizing. twice C • Discriminator A B • Merge many execution paths without synchronizing. Execute the Execute C C once as soon as subsequent activity only once. A or B completes © 2007 Google, Inc. All rights reserved, 20 Fifth International Workshop on SOA and Web Services Best Practices 10
  • 11. Gregor Hohpe: SOA Patterns Seems Trivial But… Support by standards can be spotty. XPDL UML BPEL XLANG WSFL BPML WSCI Parallel Split + + + + + + + Synchronization + + + + + + + Exclusive Choice + + + + + + + Simple Merge + + + + + + + Multi Choice + - + - + - - Synchronizing Merge + - + - + - - Multi Merge - - - - - +/- +/- Discriminator - - - - - - - Deferred Choice - + + + - + + Source: www.workflowpatterns.com © 2007 Google, Inc. All rights reserved, 21 Take-Away • New architectural styles bring new patterns. • Use pattern languages as design check list. • Use pattern languages as catalog of options. • Patterns often highlight subtleties that vendors like to glance over. • Keep us from reinventing the wheel. • Patterns harvested from actual usage. • We are likely to experience a pattern renaissance. • Share your knowledge. © 2007 Google, Inc. All rights reserved, 22 Fifth International Workshop on SOA and Web Services Best Practices 11
  • 12. Gregor Hohpe: SOA Patterns SOA Pattern Resources: Books Enterprise Integration Patterns Pattern-Oriented Software Gregor Hohpe, Bobby Woolf Architecture Vol.2 Addison-Wesley, 2004 Schmidt et al Wiley, 2000 Integration Patterns Pattern-Oriented Software Microsoft Patterns & Practices, Architecture Vol.4 2004 Buschmann et al. Wiley, 2007 Essential Business SOA Patterns Process Modeling Arnon Rotem-gal-oz Havey Manning, 2008 (?) O'Reilly, 2005 © 2007 Google, Inc. All rights reserved, 23 SOA Pattern Resources: On-line Integration Patterns msdn.microsoft.com/practices/Topics/patterns Messaging Patterns eaipatterns.com Remoting Patterns www.voelter.de/publications/books-rem.html Orchestration Patterns orchestrationpatterns.com SOA Patterns www.rgoarchitects.com/SOAPatterns/ Workflow Patterns workflowpatterns.com Conversation Patterns conversationpatterns.com (WIP) Service Interaction Patterns serviceinteraction.com Data Integration Patterns msdn.microsoft.com/practices/Topics/patterns Web Service Security Patterns msdn.microsoft.com/practices/Topics/patterns © 2007 Google, Inc. All rights reserved, 24 Fifth International Workshop on SOA and Web Services Best Practices 12

×