Service Oriented Architecture Slides - Phil Windley's Technometria
Service Oriented Architecture Slides - Phil Windley's Technometria
Service Oriented Architecture Slides - Phil Windley's Technometria
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Service</strong> <strong>Oriented</strong><strong>Architecture</strong>s &Web <strong>Service</strong>s<strong>Phil</strong>lip J. Windley, PhDBrigham Young Universityphil@windley.comwww.windley.com
www.windley.comRailroad and Highways
Traditional <strong>Architecture</strong>www.windley.com
<strong>Service</strong> <strong>Oriented</strong><strong>Architecture</strong>www.windley.com
Key Differences• Creating applications by•• that are very far away• and owned by strangers•integrating network servicesNetwork services not subroutines orobjectswww.windley.com
<strong>Service</strong> <strong>Oriented</strong><strong>Architecture</strong> Properties• Discoverable and dynamic• Loosely coupled• Locationally transparent•Diversely owned• Interoperable• Composable•• Self healingNetwork addressablewww.windley.com
Loose CouplingTight Coupling Loose CouplingInterface Classes/methods Fixed verbsMessaging Procedure call Document passingTyping Static DynamicSynchronization Synchronous AsynchronousReferences Named QueriedOntology By prior agreement Self describingSchema First-order Higher-orderCommunications Point to point Pub/SubInteraction Direct BrokeredEvaluation Eager LazyMotivation Correctness & efficiency InteroperabilityBehavior Planned AdaptiveCoordination Centralized DistributedContracts Implicit Explicitwww.windley.com
Latency• Absolute limit of system architecture•One of the few physical limits oncomputation• New York is always going to be 30ms fromLondon regardless of Moore’s Lawwww.windley.com
<strong>Service</strong> <strong>Oriented</strong><strong>Architecture</strong> Benefits• Code Re-use• Correctness• Maintainability• Productization• Security••• Scalability• Feature augmentationFocused developer rolesBetter alignment with business goalswww.windley.com
www.windley.comWeb <strong>Service</strong>s• Web services are self-contained pieces ofcode with three distinguishing properties:• Communicate in an interoperable XMLprotocol, such as SOAP.• Describe themselves in an interoperableXML meta-format, such as WSDL.• Federate globally through XML basedregistry services, such as UDDI.• Not defined in terms of SOAP, WSDL, andUDDI.
Roles in a <strong>Service</strong> <strong>Oriented</strong><strong>Architecture</strong>www.windley.com
Using Web <strong>Service</strong>s toCreate SOAs• SOAP - service binding and functionality• WSDL - service description• UDDI - service discoverywww.windley.com
SOAP Example98.6www.windley.com
WSDL Examplesample temperature conversion servicewww.windley.com
Using <strong>Service</strong> <strong>Oriented</strong><strong>Architecture</strong>s• Think philosophy, not product• Build a few pilot projects• Then do the planning:• Enterprise architecture• Interoperability frameworkwww.windley.com
Synchronous Messagingwww.windley.com
Asynchronous Messagingwww.windley.com
<strong>Service</strong> Intermediarieswww.windley.com
<strong>Service</strong> Aggregatorswww.windley.com
www.windley.comXML Firewalls
www.windley.comThe Williams FamilyLife Event: Moving to Utah• Change of address• Register car• Register to vote• Enroll child in school• Bussing• City services• Health information• Child safety• Check the commute• Tax information
Federating <strong>Service</strong>sMoving to UtahReal estateTaxesRegister carRegister to voteEnroll child in schoolBussingCity servicesUtilitiesHealth informationBankingChild safetyChange of addressCheck commuteChild in SchoolEnrollmentHealth informationGradesTuition and feesBooksChild safetyBussingFederal programsCheck commutewww.windley.com
www.windley.comLegacy Data
Web <strong>Service</strong>s for Data• Start Web services now:•••Incrementally expose your dataIncrementally expose your APIsThe more data and APIs that you exposethe greater the potential interoperability• Small marginal cost and high return, but…design is importantwww.windley.com
Design Principles• Every data element and collection is aresource• Every resource should have a URI• Cool URI’s don’t change•Preserve the structure of data until the lastpossible moment (i.e. return XML)• Make XML Schemas available online••www.windley.comData queries on existing resources shouldbe done with a GETUse POST to create new resources
Design Principles (cont)• Document your service API using WSDL,WRDL, or some other standard• Advertise the presence of the data usingWSIL• Adhere to data standards such as RSS whereavailable• Use Metadata (RDF) for XML••www.windley.comUse HTTP authentication as much as possibleMake data available in multiple flavors(XSLT)
www.windley.comBrainstorming TwoWebsites
Case Study: RSS• Rich Site Summary••XML-based content syndicationUsed by feedreaders as well as Web siteswww.windley.com
Why RSSWorkPortalNYTLocalPaperParkDistrictFavBlogGadgetNewsCNN1 2 3 4 5 6 7SchoolSite2nd FavBlogFCWFeedreader8 9 10 11 12 13 14InfoWorldc|netNewsYABlogYahoo!www.windley.com
www.windley.comWho Has RSS?
How Do I Find RSS?www.windley.com
What’s It Look Like?www.windley.com
www.windley.comFeedreaders
www.windley.comMy Yahoo!
Using RSS• Aggregate feeds onto Web sites• Portals• Press releases• Calendars• Del.icio.us• Enclosures and podcastingwww.windley.com
• Edit by hand•••Blog softwareCreating RSSCalendaring toolsCustom applicationswww.windley.com
Why RSS, Part II• Simple, HTTP-based Web service• Easy to create, easy to use•RSS is an email replacement for manyapplications• No Spam, pull instead of push•Works for infrequent updates (and frequentones)www.windley.com
Serendipitous Applications• Small, scripted aggregations lead toserendipitous applications• Example: Udell’s Library Lookupwww.windley.com
Example Web <strong>Service</strong>s• Common Payment Gateway••Web services creates easy interfacesNo need for multiple SDKswww.windley.com
www.windley.comSOAP Requestccn4111111111111111y2003m10120
SOAP ResponseReturn code: 100Auth code: testauthComment: Authorized $12.00www.windley.com
A Word of Warning• Good architects should do everything theycan to avoid data serialization.• Web services is nothing but serialization.•When serialization cannot be avoided, itcan be mitigated through caching in somecases.• SOAP over HTTP makes caching difficult(uses POST).www.windley.com
Summary• First steps:• Don’t let the hype scare you• Don’t try to figure it all out first• Adopt simple principals• Jump in and do something• The keys are• XML• Incrementally exposing data and APIswww.windley.com
Contact InformationContact me• phil@windley.com• www.windley.comQuestions?www.windley.com
www.windley.comAppendix
Messaging Pattern:Request-Responsewww.windley.com
Messaging Pattern:Publish and Subscribewww.windley.com
Messaging Pattern:Broadcast and Multicastwww.windley.com