Web Services

32
Web Services Web Services

description

Web Services. Definisi. Menurut W3C [6] Web service adalah suatu sistem perangkat lunak yang didisain untuk mendukung interaksi mesin ke mesin pada suatu jaringan. - PowerPoint PPT Presentation

Transcript of Web Services

Page 1: Web Services

Web ServicesWeb Services

Page 2: Web Services

DefinisiDefinisi

• Menurut W3C [6] Web service adalah suatu sistem perangkat lunak yang didisain untuk mendukung interaksi mesin ke mesin pada suatu jaringan.

• menurut Michael C. Daconta, Web Service adalah aplikasi perangkat lunak yang dapat ditemukan, diuraikan, dan diakses berdasarkan pada XML dan protokol standard Web pada intranet, extranet, dan Internet.

Page 3: Web Services
Page 4: Web Services
Page 5: Web Services
Page 6: Web Services
Page 7: Web Services

PO Service

Credit Service

Purchase Order

Credit

Check

ReserveInventory

Credit

Response

InventoryResponse

InvoiceConsolidate

Results

Example: Web based purchase

What Is Web Services

Web services are self contained, self describing, modular applications that can be published, located, and invoked across the web. Web services perform functions, which can be anything from simple requests to complicated business processes". ---- According to IBM ---- According to IBM Figure Taken from Oracle Figure Taken from Oracle Session id: 40024

Page 8: Web Services

Service Description

Ser

vice

D

escr

iptio

n

Ser

vice

D

escr

iptio

n

Publish

Directory Service S

earc

h /

Use

Ser

vice

In

teg

rati

on

Virtual TravelAgency

B2B

B2B

B2B

Features Of Web Services

Migration Of Existing web Application

Standards are the Base

Communicate using messages

Robust , Effective, Flexible Security

Services Description

Web Service Discovery

Figure Taken from Intelligent agent course 2003/2004 by Dr. Omar Belakhdar

Page 9: Web Services

Why to use more than one Why to use more than one computer?computer?

• Distributed resourcesDistributed resources– access to shared dataaccess to shared data– access to shared programsaccess to shared programs– access to CPU (e.g. many desktop PCs access to CPU (e.g. many desktop PCs

together), to memory, to special devices together), to memory, to special devices (e.g. printer)(e.g. printer)

• Complete independence on the Complete independence on the internal implementationinternal implementation

Page 10: Web Services

Distributed Distributed architecturearchitecture

• givesgives– access to distributed resourcesaccess to distributed resources– development encapsulationdevelopment encapsulation

• maintainability, re-usability, legacy-awarenessmaintainability, re-usability, legacy-awareness

– implementation independenceimplementation independence

• requiresrequires– adding a communication layer between adding a communication layer between

partsparts– synchronization of effortssynchronization of efforts

• including such nasty things as distributed including such nasty things as distributed garbage collectiongarbage collection

Page 11: Web Services

Sending requests,

getting results

Sending requests,

getting results

Waiting for requests

(known location,known port)

Waiting for requests

(known location,known port)

Communication protocol, Data format

Distributed architectureDistributed architecture

• Basic questions are:Basic questions are:– What kind of protocol to use, and what data What kind of protocol to use, and what data

to transmitto transmit– What to do with requests on the server sideWhat to do with requests on the server side

Page 12: Web Services

Sending requests,

getting results

Sending requests,

getting results

Waiting for requests

(known location,known port)

Waiting for requests

(known location,known port)

Data as name/value pairs

Traditional CGI-based Traditional CGI-based approachapproach

• cgi-bin scripts:cgi-bin scripts:– Data transmitted as name-value pairs (HTML forms)Data transmitted as name-value pairs (HTML forms)– Transport over (state-less) HTTP protocolTransport over (state-less) HTTP protocol– no standards for keeping user sessions (state-fullness)no standards for keeping user sessions (state-fullness)– server side: a script is calledserver side: a script is called

Page 13: Web Services

Sending requests,

getting results

Sending requests,

getting results

Waiting for requests

(known location,known port)

Waiting for requests

(known location,known port)

Data in binary format

CORBA-based approachCORBA-based approach

• CORBA:CORBA:– Data transmitted as objects (at least it looks like that)Data transmitted as objects (at least it looks like that)– Transport (usually) over well standardised IIOP protocolTransport (usually) over well standardised IIOP protocol– user sessions (state-fullness) very inter-operableuser sessions (state-fullness) very inter-operable– server side: an RPC call is madeserver side: an RPC call is made

Page 14: Web Services

Sending requests,

getting results

Sending requests,

getting results

Waiting for requests

(known location,known port)

Waiting for requests

(known location,known port)

Data in XML format

SOAP-based SOAP-based communicationcommunication

• SOAP:SOAP:– Data in a well-defined XML formatData in a well-defined XML format– Transport over various protocolsTransport over various protocols

• HTTP, SMTP are the most used, perhaps because HTTP, SMTP are the most used, perhaps because they are firewall-friendlythey are firewall-friendly

– server side: either an RPC call or a message server side: either an RPC call or a message delivereddelivered

Page 15: Web Services

Web servicesWeb services• A collection of XML-based technologies A collection of XML-based technologies

developed by the e-business community developed by the e-business community to address issues of:to address issues of:– service discoveryservice discovery– interoperable data exchange and/or interoperable data exchange and/or

application invocationapplication invocation– service compositions (workflow, business service compositions (workflow, business

processes)processes)

• Major developers include:Major developers include:– Apache, IBM, HP, SUN & Microsoft (.NET)Apache, IBM, HP, SUN & Microsoft (.NET)

• http://www.webservices.org/http://www.webservices.org/

Page 16: Web Services

W3C (working group) W3C (working group) definitiondefinition

• "A Web service is a software application "A Web service is a software application identified by a URIidentified by a URI, whose interfaces , whose interfaces and bindings are capable of being and bindings are capable of being defined, defined, described and discovereddescribed and discovered as as XML artefacts. A Web service supports XML artefacts. A Web service supports direct interactions with other software direct interactions with other software agents using agents using XML based messagesXML based messages exchanged via exchanged via internet-based protocolsinternet-based protocols."."

• http://www.w3c.org/TR/2002/WD-wsa-reqs-20020819 http://www.w3c.org/TR/2002/WD-wsa-reqs-20020819

Page 17: Web Services

Characteristics of Web services

• Providing services to other computer programs (not to Web browsers)

• Interoperability between software applications running on different computers

• Loosely coupled• Machine-processable• Use of standards: XML, HTTP, SOAP,

WSDL

Page 18: Web Services

Basic idea of Web services• Exchange of messages

– Messages are encoded using XML SOAP

• – Using standard protocols to transport messages– HTTP, SMTP, . . .

• • Message can be sent:• – One-way: Call the service, but don’t expect

an answer• ! asynchronous messaging

• – Request / response: Call the service and wait for the response

• ¤ most common style• ¤ synchronous messagging

Page 19: Web Services

• SOAP (Simple Object Access Protocol)SOAP (Simple Object Access Protocol)• Extensible Markup Language (XML)Extensible Markup Language (XML)• Hypertext Transport Protocol (HTTP)Hypertext Transport Protocol (HTTP)• Web Services Description Language Web Services Description Language

(WSDL)(WSDL)• Universal Discovery Description Universal Discovery Description

Integration (UDDI)Integration (UDDI)

Page 20: Web Services

. Langkah 1, aplikasi klien menemukan informasi tentang Web Service A dalam suatu UDDI registry. Langkah 2, aplikasi klien mendapatkan WSDL untuk Web Service A dari UDDI registry untuk menentukan API milik Web Service A. Akhirnya, pada langkah 3 dan 4, aplikasi klien berkomunikasi dengan Web Service melalui SOAP, menggunakan API yang ditemukan dalam langkah 2.

Page 21: Web Services

• UDDI UDDI provides a mechanism for clients to find provides a mechanism for clients to find web services.web services.

• WSDL WSDL defines services as collections of network defines services as collections of network endpoints or endpoints or portsports. A port is defined by . A port is defined by associating a network address with a binding; a associating a network address with a binding; a collection of ports define a service.collection of ports define a service.

• SOAP SOAP is a message layout specification that is a message layout specification that defines a uniform way of passing XML-encoded defines a uniform way of passing XML-encoded data. It also defines a way to bind to HTTP as the data. It also defines a way to bind to HTTP as the underlying communication protocol. SOAP is underlying communication protocol. SOAP is basically a technology to allow for “RPC basically a technology to allow for “RPC over the over the webweb”.”.

State of the ArtState of the Art

Page 22: Web Services

URI HTML HTTP

UDDI WSDL SOAP

State of the ArtState of the Art

Page 23: Web Services

Web Services StackWeb Services Stack

Page 24: Web Services

• SOAP (Simple Object Access Protocol)SOAP (Simple Object Access Protocol)• Extensible Markup Language (XML)Extensible Markup Language (XML)• Hypertext Transport Protocol (HTTP)Hypertext Transport Protocol (HTTP)• Web Services Description Language Web Services Description Language

(WSDL)(WSDL)• Universal Discovery Description Universal Discovery Description

Integration (UDDI)Integration (UDDI)

Page 25: Web Services

• SOAP adalah spesifikasi yang SOAP adalah spesifikasi yang mendefinisikan tata tata bahasa XML untuk mendefinisikan tata tata bahasa XML untuk mengirim (request) dan menanggapi (respond) mengirim (request) dan menanggapi (respond) pesan yang diterima dari pihak lain.pesan yang diterima dari pihak lain.

• Standar SOAP memiliki dua bagian :Standar SOAP memiliki dua bagian :– Header yang membawa proses instruksiHeader yang membawa proses instruksi– Body yang berisi Body yang berisi payload payload (berisi informasi yang (berisi informasi yang

dikirim)dikirim)

• Pesan SOAP ada 3 tipe :Pesan SOAP ada 3 tipe :– Dokumen (XML)Dokumen (XML)– RPC (Remote Procedure Calls)RPC (Remote Procedure Calls)

Page 26: Web Services

XML Messaging Using XML Messaging Using SOAPSOAP

Page 27: Web Services

• WSDL adalah sebuah spesifikasi yang WSDL adalah sebuah spesifikasi yang berbasis XML yang digunakan untuk berbasis XML yang digunakan untuk mendeskripsikan apa yang akan dilakukan mendeskripsikan apa yang akan dilakukan oleh Web Service dan bagaimana untuk oleh Web Service dan bagaimana untuk mengoperasikannyamengoperasikannya

• WSDL memiliki bagian-bagian yang berisi WSDL memiliki bagian-bagian yang berisi detail bagaimana membuat koneksi ke detail bagaimana membuat koneksi ke service disimpanservice disimpan

Page 28: Web Services

WSDLWSDL

• WWeb eb SServices ervices DDefinition efinition LLanguageanguage– http://www.w3.org/TR/wsdl/http://www.w3.org/TR/wsdl/

• An XML-based language for describing Web An XML-based language for describing Web Services Services– what the service does (description)what the service does (description)– how to use it (method signatures)how to use it (method signatures)– where to find the servicewhere to find the service

• It It does notdoes not depend on the underlying depend on the underlying protocolprotocol

• But: It is not much human-readableBut: It is not much human-readable

Page 29: Web Services

• UDDI adalah sebuah spesifikasi XML yang UDDI adalah sebuah spesifikasi XML yang menggambarkan bagaimana calon menggambarkan bagaimana calon pelangganpelanggandari layanan Web bisa belajar tentang dari layanan Web bisa belajar tentang kemampuannya dan kemampuannya dan memperoleh informasi dasarmemperoleh informasi dasaryang dibutuhkan untuk membuat kontak yang dibutuhkan untuk membuat kontak awal dengan situsawal dengan situs

• Registry UDDI bisa public, private, atau Registry UDDI bisa public, private, atau semiprivatesemiprivate

Page 30: Web Services

UDDI (and alternatives)UDDI (and alternatives)• UUniversal niversal DDescription, escription, DDiscovery and iscovery and

IIntegrationntegration– http://www.uddi.orghttp://www.uddi.org

• UDDI creates a platform-independent, open UDDI creates a platform-independent, open framework & registry for:framework & registry for:– Describing servicesDescribing services– Discovering businessesDiscovering businesses– Integrating business servicesIntegrating business services

• The UDDI may be less used than predicted, The UDDI may be less used than predicted, especially on the Internet levelespecially on the Internet level

• BioMoby - an alternative for Life Sciences BioMoby - an alternative for Life Sciences domain?domain?

Page 31: Web Services

• Mengintegrasikan sistem-sistem legacyMengintegrasikan sistem-sistem legacy• Menurunkan biaya operasionalMenurunkan biaya operasional• Menurunkan biaya pengembangan softwareMenurunkan biaya pengembangan software• pengembangan sistem dilakukan lebih cepatpengembangan sistem dilakukan lebih cepat• Antarmuka yang lebih baik untuk pelangganAntarmuka yang lebih baik untuk pelanggan• Integrasi yang lebih baik dengan partner bisnisIntegrasi yang lebih baik dengan partner bisnis• Peluang pendapatan baruPeluang pendapatan baru• Merupakan model bisnis baruMerupakan model bisnis baru

Page 32: Web Services

•Kesulitan tersembunyi dari Layanan Kesulitan tersembunyi dari Layanan Web :Web :– Masalah ketersediaanMasalah ketersediaan– Matching RequirementsMatching Requirements– Immutable InterfacesImmutable Interfaces– Guaranteed ExecutionGuaranteed Execution

•Memiliki masalah pada performance nyaMemiliki masalah pada performance nya•Standarisasi Web service belum lengkap Standarisasi Web service belum lengkap

atau belum final atau belum final