240 likes | 381 Views
Webservices. Henrik Westergaard Hansen Microsoft henrikwh@microsoft.com. Kort introduktion til Web Services. SOAP - Simple object access Protocol . WSDL – Web service description language. <definitions> WSDL rodelement <types> Datatyper der transmitteres
E N D
Webservices Henrik Westergaard Hansen Microsoft henrikwh@microsoft.com
WSDL – Web service description language <definitions> WSDL rodelement <types> Datatyper der transmitteres <messages> Beskeder der transmitteres <portType> Hvilke metoder er understøttet <binding> Hvordan vil beskederne blive transmitteret på linien <service> Hvor er servicen placeret
Webservices demo En kort demo af Webservices i Visual Studio 2005
Web Services ArchitectureASP.NET Web Services Applications & Application Infrastructure Connected Applications BusinessProcess … Management Security Reliability Transactions Metadata Foundation Messaging XML … HTTP TCP SMTP Transports
Web Services Architecture Web Services Enhancements 2.0 Applications & Application Infrastructure Connected Applications BusinessProcess … Management Security Reliability Transactions Metadata Foundation Messaging XML … HTTP TCP SMTP Transports
Windows Communication Foundation Applications & Application Infrastructure BusinessProcess Connected Applications … Management Security Reliability Transactions Metadata Foundation Messaging XML … HTTP TCP SMTP Transports
Hvilke IT-problemer står virksomheder med i dag • Meget store og komplekse arkitekturer • Har måske udviklet sig over 30 år • Mange forskellige teknologier • Meget svært at skifte teknologi (modernisering) • Kompetencer & investeringer • Systemer er meget dyre at vedligeholde • Kompleksitet • Forretningen har svært ved at vokse hurtigt og fleksibelt nok • For svært at følge nye muligheder
ServiceorienteringLidt baggrund Objektorientering 1980erne Polymorphism Indkapsling Nedarvning Statisk genbrug Komponentorientering 1990erne Interface-baseret Dynamisk loading Runtime Metadata Dynamisk genbrug Serviceorientering 2000+ Besked-baseret Skemaer+Kontrakter Binding gennem politikker Deployed service og data genbrug
Services, SO, and SOA • Service – An endpoint that reacts to messages • Service Orientation– An architectural paradigm that employs the following four tenets: • Boundaries are explicit • Services are autonomous • Services share schema and contract, not class • Service compatibility is determined based on policy • Service Oriented Architecture (SOA) – Any architecture the adheres to the Four Tenets of Service Orientation
4 principper for SOA • Grænser er eksplicitte • Messages sendes over eksplicitte grænser. • Serviceinteraktioner er en grænse • Det har omkostninger at krydse en grænse • Services er autonome • Der er ikke nogen kontrollerende autoritet • Services er deployed, styret og versioneret individuelt • En service må ikke fejle når en afhængig service fejler • Services deler skema og kontrakt • Services bruger skemaer for data og kontrakter for opførsel • Kontrakter og skemaer burde være stabile over tid • Kompatibilitet er beskrevet i policies • Egenskaber og krav er beskrevet i policies
Tenet 1 – Boundaries are Explicit • Services interact by exchanging messages • Each message exchange traverses boundaries and may have costs • SO formalizes intentional, and explicit interaction
Tenet 2 – Share Schema and Contract, Not Types • Services expose schemas defining data structures and contracts defining available operations • Contracts and schema may be independently versioned over time
Tenet 3 – Policy defines Service Compatibility • Policy is the statement of communication requirements necessary for service interaction • Service capabilities and requirements are expressed in terms of a policy expression • A policy can contain multiple assertions
Tenet 4 – Services Are Autonomous • Autonomy ≠ Independence • Topology of a system evolves over time • Unlike OO, services do not share behavior • Services gracefully handle failure
Benefits of Service Orientation Architecture & Development • Reflects the new application model • Loose coupling, enabling composition of new capabilities • Standards-based interoperability IT Operations • Topology independent • Leverage heterogeneous resources • Independent deployment, versioning, management Business • Business agility and reduced time to market • Efficiency through reuse
Systemer Operationelle krav Tilstand består af gennemtvinger vedligeholder Politikker beskyttet af bundet af har Beskedudvekslings-format Kontrakter beskriver er et set af Skemaer definerer struktur af indeholder ServiceorienteringKoncepter Services udveksler Beskeder
A A A B B B C C C C B A Adresse, Binding, Kontrakt Klient Service Adresse Hvor? Binding Hvordan? Kontrakt Hvad? Endpoint
Spørgsmål ? Skriv til henrikwh@microsoft.com
Kom godt igang • Software • Web services – Visual Studio 2005 • Windows communication Foundation, VS 2005 Beta 2 og WinFx beta 1 • Artikler • WS-ReliableMessaging • http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwse/html/wseandws-rm.asp • A Guide to Developing and Running Connected Systems with Indigo:http://msdn.microsoft.com/msdnmag/issues/04/01/Indigo/default.aspx • Introducing Indigo: An Early Look http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnlong/html/introindigov1-0.asp
Projektforslag • Lav en P2P klient i WinForms eller WPF • Brug WCF (Mesh), så der kan distribueres software. • Systemet skal være sikkert og login skal verificeres gennem passports, måske med delegated management • Link: http://216.55.183.63/pdc2005/slides/COM311_Singhal.ppt