chapter 3 programming web services l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Chapter 3: Programming Web Services PowerPoint Presentation
Download Presentation
Chapter 3: Programming Web Services

Loading in 2 Seconds...

play fullscreen
1 / 12

Chapter 3: Programming Web Services - PowerPoint PPT Presentation


  • 141 Views
  • Uploaded on

Chapter 3: Programming Web Services. Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005. Highlights of this Chapter. Representational State Transfer (ReST or REST) Developing and Using Web Services Web Service Interoperability.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Chapter 3: Programming Web Services' - sarah


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
chapter 3 programming web services
Chapter 3:Programming Web Services

Service-Oriented Computing: Semantics, Processes, Agents– Munindar P. Singh and Michael N. Huhns, Wiley, 2005

highlights of this chapter
Highlights of this Chapter
  • Representational State Transfer (ReST or REST)
  • Developing and Using Web Services
  • Web Service Interoperability

Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns

representational state transfer
Representational State Transfer
  • REST is an architectural style for networked systems that constrains the connector semantics (not the component semantics)
  • The Web is a network of hyperlinked resources
    • A resource is anything identified by a URI
  • A Web application works as a state machine
  • A client selecting a link is a state transition, resulting in receiving the next page (next state) of the application

Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns

characteristics of rest
Characteristics of REST
  • Client-Server
  • Statelessness: requests cannot take advantage of stored contexts on a server
    • Great for load balancing
  • Caching: responses can be labeled as cacheable
  • Uniform interface: URIs, hypermedia
  • Layered components
  • Focus on resources as opposed to methods:
    • Read, construct, update a resource representation
    • Well-suited to hypermedia applications

Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns

http verbs
HTTP Verbs
  • Popular verbs
    • Get: query (no side effects)
    • Post: update
    • Put
    • Delete
  • In particular, can use Get and Post instead of much of SOAP
  • Idempotent operations
    • Multiple executions = one execution
  • Challenge: the specification imposes requirements but with no way to judge compliance without understanding the designer’s intent

Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns

software for open environments
Software for Open Environments
  • Tempting to simply lift current database and programming techniques for open environments
  • Popular pitfall (blame the tools for it)
    • Think of objects (get and set methods)
    • Invoke them as before even though they are Web services
    • Poor performance
    • Tight coupling

Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns

simple b2c web service example
Simple B2C Web Service Example

Suppose you want to sell cameras over the Web, debit a credit card, and guarantee next-day delivery

  • Your application must
    • update sales database
    • debit the credit card
    • send an order to the shipping department
    • receive an OK from the shipping department for next-day delivery
    • update an inventory database
  • Problems: Some steps complete but not all

Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns

traditional b2c problems
“Traditional” B2C Problems
  • What if the order is shipped, but the debit fails?
  • What if the debit succeeds, but the order was never entered or shipped?

Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns

database approach
Database Approach

A traditional database approach works only for a closed environment:

  • Transaction processing (TP) monitors (such as IBM’s CICS, Transarc’s Encina, BEA System’s Tuxedo) can ensure that all or none of the steps are completed, and that systems eventually reach a consistent state
  • But what if the user’s modem is disconnected right after he clicks on OK? Did the order succeed? What if the line went dead before the acknowledgement arrives? Will the user order again?

The TP monitor cannot get the user into a consistent state!

Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns

approach for open environment
Approach for Open Environment
  • Server application could send email about credit problems, or detect duplicate transactions
  • Downloaded applet could synchronize with server after broken connection was restored, and recover transaction; applet could communicate using http, or directly with server objects via CORBA/IIOP or RMI
  • If there are too many orders to process synchronously, they could be put in a message queue, managed by a Message Oriented Middleware server (which guarantees message delivery or failure notification), and customers would be notified by email when the transaction is complete

The server behaves like an agent!

Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns

requirements
Requirements
  • Cross-enterprise processes
  • Exception handling
  • Conversations and long-lived transactions
  • Contracts among parties involved

Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns

chapter 3 summary
Chapter 3 Summary
  • Tools help with low-level details
    • Agreeing on standards is more important than the standards themselves
  • Should conceptualize interactions in a manner compatible with the Web architecture
    • Can simplify from SOAP in many cases
  • The above is a small point anyway
    • Bigger challenges are in ensuring larger-scale interactions, ensuring integrity, handling exceptions, …
    • Sophisticated programming models are emerging

Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns