Die Präsentation wird geladen. Bitte warten

Die Präsentation wird geladen. Bitte warten

Webbasierte Kommunikation am Beispiel REST Seminarvortrag von Heiko Overath.

Ähnliche Präsentationen


Präsentation zum Thema: "Webbasierte Kommunikation am Beispiel REST Seminarvortrag von Heiko Overath."—  Präsentation transkript:

1 Webbasierte Kommunikation am Beispiel REST Seminarvortrag von Heiko Overath

2 CAE Elektronik GmbH Confidential and/or Proprietary Information Gliederung 1.Einführung 2.Webservice 3.REST 4.SOAP 5.Vergleich REST und SOAP 6.Zusammenfassung und Ausblick 2

3 CAE Elektronik GmbH Confidential and/or Proprietary Information Einführung  GESI  Kommunikation über Voice-Controller 3 Audioserver Voice-Controller Simulation Audioclient

4 CAE Elektronik GmbH Confidential and/or Proprietary Information Einführung 4 Audioserver Voice-Controller Simulation Audioclient  Audioserver speichert Zuordnung von Simulationszeit und Gesprächszeit  Momentaner Stand: eigenes Protokoll  Ziel: Dynamische Anbindung

5 CAE Elektronik GmbH Confidential and/or Proprietary Information Gliederung 1.Einführung 2.Webservice 3.REST 4.SOAP 5.Vergleich REST und SOAP 6.Zusammenfassung und Ausblick 5

6 CAE Elektronik GmbH Confidential and/or Proprietary Information Webservice - Definition 6 „A Webservice is a software application identified by a URI, whose interfaces and binding are capable of being defined, described and discovered by XML-artifacts, an which supports direct interactions with other softwareapplications using XML-based messages via Internet-based protocols. The full range of application functionality can be exposed in a Webservice.“[W3C]

7 CAE Elektronik GmbH Confidential and/or Proprietary Information Webservices - Aufbau  Client-Server Prinzip  Schnittstelleninformationen werden zur Verfügung gestellt  Nachrichtenaustausch zwischen Client und Server  Maschine-zu-Maschine Kommunikation 7

8 CAE Elektronik GmbH Confidential and/or Proprietary Information Gliederung 1.Einführung 2.Webservice 3.REST 4.SOAP 5.Vergleich REST und SOAP 6.Zusammenfassung und Ausblick 8

9 CAE Elektronik GmbH Confidential and/or Proprietary Information REST - Geschichte  Representational State Transfer  Roy Fielding  2000  „Architectural Styles and the Design of Network-based Software Architectures“  Grundidee: einheitliches Konzept zur Datenverarbeitung im WWW 9

10 CAE Elektronik GmbH Confidential and/or Proprietary Information REST – Was ist REST?  5 Grundmerkmale: 1.Ressourcen 2.Unterschiedliche Repräsentationsformate 3.Standardmethoden 4.Hypermedia 5.Statuslose Kommunikation 10

11 CAE Elektronik GmbH Confidential and/or Proprietary Information REST – Ressourcen  Ressourcen-orientierte Architektur  Adressierung der Ressource mittels Uniforme Resource Identifier –Beispiel: http://example.com/customers/1234http://example.com/customers/1234 –Allgemein: [SCHEME]:[AUTHORITY]/[PATH]?[QUERY]#[FRAGMENT]  Ressource bildet die Schnittstelle zur Außenwelt  Kategorien für Ressourcen: Primärressourcen, Listenressourcen, Filter, Projektionen, Aggregationen, Aktivitäten 11

12 CAE Elektronik GmbH Confidential and/or Proprietary Information REST – Ressource und Repräsentation  Anfrage einer Ressource liefert Repräsentation  Ressource als Menge von Repräsentationen definierbar  Übergang fließend  Beispiel: Visitenkarte und Bild einer Person 12

13 CAE Elektronik GmbH Confidential and/or Proprietary Information Exkurs - HTTP  Roy Fielding und Tim Berners-Lee (CERN)  1989  Anwendungsprotokoll im TCP/IP Modell  Zustandsloses Protokoll  Request + Response  Header + Body 13

14 CAE Elektronik GmbH Confidential and/or Proprietary Information HTTP - Verben  Verben sind GET, HEAD, PUT, POST, DELETE, OPTIONS  Verben können sicher oder/und idempotent sein  Beispiel für GET-Anfrage: 14 GET /index.php HTTP/1.1 Host: www.html-wordl.dewww.html-wordl.de User-Agent: Mozilla/4.0 Accept: image/gif, image/jpeg, */* Connection: close

15 CAE Elektronik GmbH Confidential and/or Proprietary Information REST - Standardmethoden  REST benutzt Standardmethoden (vgl. Java- Interface)  Client weiß, welche Methoden anwendbar sind  Standardmethoden basieren auf HTTP 15 interface Ressource() { Ressource(Uri u); Response get(); Response post(Request r); Response put(Request r); Response delete(); }

16 CAE Elektronik GmbH Confidential and/or Proprietary Information REST - Optionsdreieck 16

17 CAE Elektronik GmbH Confidential and/or Proprietary Information REST – Verben SicherIdempotentIdentifizierbare Ressource Cache- fähig Sichtbare Semantik GETXXXXX HEADXXXXX PUTXXX POST OPTIONSXXOX DELETEXXX 17

18 CAE Elektronik GmbH Confidential and/or Proprietary Information REST – Hypermedia  Hypertext -> Hypermedia  Repräsentationen entsprechen Hypermedia!  „Hypermedia as the engine of application state“ – HATEOAS  Entwickler stellt Möglichkeiten zur Verfügung, Anwender wählt eine Möglichkeit aus  Beispielanwendung Beispielanwendung 18

19 CAE Elektronik GmbH Confidential and/or Proprietary Information REST - Hypermedia 19

20 CAE Elektronik GmbH Confidential and/or Proprietary Information REST – Statuslose Kommunikation  2 Arten der Kommunikation bei verteilten Systemen: –zustandslos –zustandsbehaftet  Beispiel für Zustandsbehaftung: Cookies  Zustandslose Kommunikation erstrebenswert: –Einzelne Interpretation der Nachrichten möglich –Bessere Skalierbarkeit 20

21 CAE Elektronik GmbH Confidential and/or Proprietary Information REST – Statuslose Kommunikation Statusbehaftet: server = connect(username, pasword); employeeManagement = server.getEmployeeManagement(); project = employeeManagement.createNewProject(); employeeManagement.addEmployee(20,employee); employeeManagement.logout(); Statuslos: server = connect(username, pasword); employeeManagement = server.getEmployeeManagement(username, password); project = employeeManagement.createNewProject(username, password); project = employeeManagement.addEmployee(username,password,project,20,employee); employeeManagement.logout(); 21

22 CAE Elektronik GmbH Confidential and/or Proprietary Information Gliederung 1.Einführung 2.Webservice 3.REST 4.SOAP 5.Vergleich REST und SOAP 6.Zusammenfassung und Ausblick 22

23 CAE Elektronik GmbH Confidential and/or Proprietary Information SOAP - Allgemeines  Simple Object Access Protocol  Entstand aus XML-RPC  Dave Winter und Microsoft  Seit 2007 in Version 1.2 vorliegend  Spezifikation legt lediglich Nachrichtenstruktur fest 23

24 CAE Elektronik GmbH Confidential and/or Proprietary Information SOAP - Arbeitsweise  Anbieter erstellt WSDL-Dokument –Beschreibungssprache für Webservice –Durch Tools aus Code erstellbar, bzw. umgekehrt –Beispiel: Axis  Veröffentlichung über UDDI (Universal Description, Discovery and Integration) Verzeichnisdienst 24

25 CAE Elektronik GmbH Confidential and/or Proprietary Information SOAP - Nachrichtenaufbau  3 Teile: Envelope, Header und Body  Envelope muss Body enthalten  Header optional 25

26 CAE Elektronik GmbH Confidential and/or Proprietary Information Gliederung 1.Einführung 2.Webservice 3.REST 4.SOAP 5.Vergleich REST und SOAP 6.Zusammenfassung und Ausblick 26

27 CAE Elektronik GmbH Confidential and/or Proprietary Information Vergleich von REST und SOAP REST  ressourcenorientiert  Jede Ressource adressierbar  benutzt ausschließlich etablierte Standards  Lose Kopplung zwischen Client und Server SOAP  serviceorientiert  Service nur zentral adressierbar  arbeitet mit eigenen Standards  Starke Kopplung zwischen Client und Server 27

28 CAE Elektronik GmbH Confidential and/or Proprietary Information Zusammenfassung und Ausblick  Anforderungen an Audioserver stimmen mit REST überein  Großer Vorteil: Lose Kopplung des Systems gegeben  REST gewinnt SOAP gegenüber immer mehr an Bedeutung  Frage: Bietet REST die Möglichkeit alle Funktionen zu realisieren? 28

29 CAE Elektronik GmbH Confidential and/or Proprietary Information Quellen  Fielding, Roy T.; Architectural Styles and the Design of Networkbased Software Architectures, University of California, Irvine, Diss., 2000  Tilkov, Stevan: REST und HTTP – Einsatz der Architektur des Web für Integrationsszenarien, dpunkt, verlag, 2011  W3C: The Original HTTP as defined in 1991. http://www.w3.org/Protocols/HTTP/AsImplemented.html. Version:1991http://www.w3.org/Protocols/HTTP/AsImplemented.html  W3C: Web Services Description Requirements. http://www.w3.org/TR/ws-des-reqs/. Version: Oktober 2002http://www.w3.org/TR/ws-des-reqs/  W3C: Hypertext Transfer Protocol – HTTP/1.1. http://www.w3.org/Protocols/rfc2616/rfc2616.html Version: September 2004http://www.w3.org/Protocols/rfc2616/rfc2616.html  W3C: SOAP Version 1.2 Part: Messaging Framework, http://www.w3.org/TR/soap12-part1/. Version: April 2007http://www.w3.org/TR/soap12-part1/  Wikipedia: Hypertext Transfer Protocol. http://de.wikipedia.org/wiki/Hypertext_Transfer_Protocol. Version: Oktober 2013http://de.wikipedia.org/wiki/Hypertext_Transfer_Protocol  Wikipedia: Uniform Resource Identifier. http://de.wikipedia.org/wiki/Uniform_Resource_Identifier. Version: September 2013http://de.wikipedia.org/wiki/Uniform_Resource_Identifier  Wikipedia: Webservice, http://de.wikipedia.org/wiki/Webservice. Version: November 2013http://de.wikipedia.org/wiki/Webservice 29

30 Vielen Dank!

31 CAE Elektronik GmbH Confidential and/or Proprietary Information Beispielanwendung - Warenkorb Ihr Warenkorb ist grade leer. 31 BEENDEN Ansehen Profil ansehen

32 CAE Elektronik GmbH Confidential and/or Proprietary Information Beispielanwendung – Artikel 1 32 BEENDEN Ansehen Könnte Ihnen auch gefallen: Kamm - „Seidenglatt pur“Profil ansehen Zum Warenkorb

33 CAE Elektronik GmbH Confidential and/or Proprietary Information Beispielanwendung – Artikel 2 33 Fußball - „Kommt ins Eckige!“ Könnte Ihnen auch gefallen: Ansehen Profil ansehen BEENDEN Zum Warenkorb

34 CAE Elektronik GmbH Confidential and/or Proprietary Information Beispielanwendung - Profil 34 Ihr Profil Ansehen Zum Warenkorb BEENDEN


Herunterladen ppt "Webbasierte Kommunikation am Beispiel REST Seminarvortrag von Heiko Overath."

Ähnliche Präsentationen


Google-Anzeigen