Download presentation
Presentation is loading. Please wait.
Published bySara Bjerre Modified over 5 years ago
1
Service-Oriented Computing: Semantics, Processes, Agents
August 2004 Chapter 3: Programming Web Services Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2004 © Singh & Huhns
2
Highlights of this Chapter
Service-Oriented Computing: Semantics, Processes, Agents August 2004 Highlights of this Chapter Representational State Transfer (REST) Developing and Using Web Services Web Service Interoperability Chapter 3 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns © Singh & Huhns
3
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, which are things identified by a URI A Web application appears to be a virtual state machine A client selecting a link is a state transition, resulting in receiving the next page (next state) of the application Chapter 3 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
4
Characteristics of REST
Client-Server Statelessness – requests cannot take advantage of stored contexts on a server Caching – responses can be labeled as cacheable Uniform Interface – URIs, hypermedia Layered Components Clients can be extended by code-on-demand Chapter 3 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
5
Software for Open Environments
Tempting to simply lift current database and programming techniques for open environments Unsatisfactory, because of the needs of such environments Web services will work only if we they are not merely traditional programming in XML syntax Chapter 3 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
6
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 Chapter 3 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
7
“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? Chapter 3 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
8
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! Chapter 3 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
9
Approach for Open Environment
Server application could send 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 when the transaction is complete The server behaves like an agent! Chapter 3 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
10
Requirements Cross-enterprise processes Exception handling
Conversations and long-lived transactions Contracts among parties involved Chapter 3 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
11
Web Service Development Tools
Several exist (e.g., .NET, Cape Clear) Generate WSDL documents automatically from OO (e.g., Java) source code Generate source code stubs from WSDL Java Class Files WSDL Docs WSDL Generator Chapter 3 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
12
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 Chapter 3 Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and Michael Huhns
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.