chapter 8 web services designing and other tools (case study)

30
Chapter 8 Chapter 8 Web Services Designing and Web Services Designing and Other Tools (Case Study) Other Tools (Case Study)

Upload: heather-mathews

Post on 17-Dec-2015

220 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Chapter 8 Web Services Designing and Other Tools (Case Study)

Chapter 8Chapter 8Web Services Designing and Other Web Services Designing and Other

Tools (Case Study)Tools (Case Study)

Page 2: Chapter 8 Web Services Designing and Other Tools (Case Study)

ObjectivesObjectivesBy case study in the chapter, you will be able to:By case study in the chapter, you will be able to:

Examine typical existing systems for the Web Examine typical existing systems for the Web service applications possibleservice applications possible

Convert the existing systems to Web service Convert the existing systems to Web service applications applications

Describe what are the uniqueness of Web Describe what are the uniqueness of Web services designs services designs

Exam development tools in Web servicesExam development tools in Web services

Questions and DiscussionQuestions and Discussion

HomeworkHomework

Page 3: Chapter 8 Web Services Designing and Other Tools (Case Study)

Case study: incentive reporting systemCase study: incentive reporting system

Analysis the existing incentive reporting systemAnalysis the existing incentive reporting system– See figure in next slide to understand the existing See figure in next slide to understand the existing

reporting systemreporting system– Reasons for dissatisfactionReasons for dissatisfaction

The president of the corporation cannot get what The president of the corporation cannot get what information he/she wants in a timely manner information he/she wants in a timely manner

The president of the corporation cannot get the accurate The president of the corporation cannot get the accurate information because the information has to rely on reports information because the information has to rely on reports from each company’s report from each company’s report

– Goal of redesign the systemGoal of redesign the systemTo receive accurate information on a monthly basis on To receive accurate information on a monthly basis on timetime

Page 4: Chapter 8 Web Services Designing and Other Tools (Case Study)

The original XYZ company’s distributed The original XYZ company’s distributed accounting systemaccounting system

Page 5: Chapter 8 Web Services Designing and Other Tools (Case Study)

Case study: incentive reporting system Case study: incentive reporting system (continue)(continue)

– Basic analysis for Web service designBasic analysis for Web service designThe volume of data to be transferred is relatively smallThe volume of data to be transferred is relatively small

The geographic locations of the companies involved The geographic locations of the companies involved make an Internet-based approach attractivemake an Internet-based approach attractive

The security reasons are manageable if they use firewallThe security reasons are manageable if they use firewall

All IT department in each company can choose whatever All IT department in each company can choose whatever language for their part of programming to create their language for their part of programming to create their serverserver

Future adding of a new company into the system will be Future adding of a new company into the system will be able to integrate rapidly able to integrate rapidly

For all of above, it’s a good candidate for Web service For all of above, it’s a good candidate for Web service applicationapplication

Page 6: Chapter 8 Web Services Designing and Other Tools (Case Study)

Case study: incentive reporting system Case study: incentive reporting system (continue)(continue)

New terminology – styles of data transmissionNew terminology – styles of data transmission– request/responserequest/response

The client initiates the action by making a request of the serverThe client initiates the action by making a request of the server

– Solicit/responseSolicit/responseThe server makes the first move by soliciting a response from a clientThe server makes the first move by soliciting a response from a client

Defining the server and the clientsDefining the server and the clients– The rule is that always begin the transmission with the party The rule is that always begin the transmission with the party

that wants the result firstthat wants the result first– It make sense in this case to create the system using It make sense in this case to create the system using

solicit/response transmission stylesolicit/response transmission style– The corporation computer is defined as solicit type serverThe corporation computer is defined as solicit type server– The company’s computers is defined as Web service clientsThe company’s computers is defined as Web service clients

Page 7: Chapter 8 Web Services Designing and Other Tools (Case Study)

Case study: incentive reporting system Case study: incentive reporting system (continue)(continue)

Designing the message Designing the message – The next logical step is to design the message The next logical step is to design the message

that will be exchanged between a server and that will be exchanged between a server and clientsclients

– Two types of messages need to be sent from Two types of messages need to be sent from the server to the clients in a solicit/response the server to the clients in a solicit/response style:style:

Is the report ready for uploadingIs the report ready for uploading

Please give me your reportPlease give me your report

Page 8: Chapter 8 Web Services Designing and Other Tools (Case Study)

Case study: incentive reporting system Case study: incentive reporting system (continue) (continue)

– Likewise, the clients need two different response Likewise, the clients need two different response message:message:

Yes, the report is ready (or no, it is not ready)Yes, the report is ready (or no, it is not ready)

Here is my reportHere is my report

Description of usage of the systemDescription of usage of the system– On a certain date each month, the server solicits On a certain date each month, the server solicits

the report from each client by sending out the “Is the report from each client by sending out the “Is the report ready?” messagethe report ready?” message

– Upon receiving “yes” answer from any client, the Upon receiving “yes” answer from any client, the server sends a “Please give me your report” server sends a “Please give me your report” message”message”

Page 9: Chapter 8 Web Services Designing and Other Tools (Case Study)

Case study: incentive reporting Case study: incentive reporting system (continue) system (continue)

– Following that, the client process all the data and Following that, the client process all the data and sends the “Here is my report” message with the sends the “Here is my report” message with the reportreport

– If the client answers “No” since report is not If the client answers “No” since report is not ready, a time for next retry is assigned and the ready, a time for next retry is assigned and the server sleeps until it’s time to try soliciting againserver sleeps until it’s time to try soliciting again

– See next slide for the new designed system See next slide for the new designed system

Designing the projectDesigning the project– One of the big advantage of Web services is the One of the big advantage of Web services is the

fact that every one of the 14 different accounting fact that every one of the 14 different accounting systems can use a different computer language systems can use a different computer language and development tool to create its client code and development tool to create its client code

Page 10: Chapter 8 Web Services Designing and Other Tools (Case Study)

New designed Web services systemNew designed Web services system

Page 11: Chapter 8 Web Services Designing and Other Tools (Case Study)

Case study: incentive reporting Case study: incentive reporting system (continue)system (continue)

– In addition, each client can still use its own logic of In addition, each client can still use its own logic of accounting process without problem in the Web service accounting process without problem in the Web service design and developmentdesign and development

– Selection an available Web service development tool Selection an available Web service development tool for creating the new systemfor creating the new system

Development stepsDevelopment steps– Write the serve softwareWrite the serve software– Create the WDSL document based on the server codeCreate the WDSL document based on the server code– Using the document as a guide, IT staff in each Using the document as a guide, IT staff in each

company write the client code using their own selected company write the client code using their own selected computer languages or/and development tools that are computer languages or/and development tools that are best fit into their knowledge and legacy systembest fit into their knowledge and legacy system

Page 12: Chapter 8 Web Services Designing and Other Tools (Case Study)

Case study: incentive reporting system Case study: incentive reporting system (continue)(continue)

– Run a special test version of the Web service Run a special test version of the Web service upon the completion of each of the individual upon the completion of each of the individual subsidiaries subsidiaries

– The whole system is tested and results are The whole system is tested and results are compared to data that is known to be created compared to data that is known to be created upon the completion of all of the subsidiariesupon the completion of all of the subsidiaries

– Deploy the system and ready to go into Deploy the system and ready to go into production production

Page 13: Chapter 8 Web Services Designing and Other Tools (Case Study)

Case study: Designing an E-shopCase study: Designing an E-shop

Initiative thoughtInitiative thought– Along with the popularity of Web services and Along with the popularity of Web services and

availability of commercial information, our system in availability of commercial information, our system in the case study will discover the lower-priced the case study will discover the lower-priced cameras wholesalers’ lists and we will call this E-cameras wholesalers’ lists and we will call this E-shop “CheapestCameras.com”shop “CheapestCameras.com”

Goal of the systemGoal of the system– We could design the E-shop that involves the We could design the E-shop that involves the

discovery and interconnection of clients to Web discovery and interconnection of clients to Web services without human intervention for the services without human intervention for the cheapest camera salescheapest camera sales

Page 14: Chapter 8 Web Services Designing and Other Tools (Case Study)

Case study: Designing an E-shop Case study: Designing an E-shop (continue)(continue)

Defining the servers and clientsDefining the servers and clients– The customers as clients in our website will The customers as clients in our website will

make requests first for cheapest cameras, so our make requests first for cheapest cameras, so our E-shop website will be clientE-shop website will be client

– All the wholesalers, as well as credit card All the wholesalers, as well as credit card service, will be Web servicesservice, will be Web services

– So our system should be request/response styleSo our system should be request/response style

Designing the messageDesigning the message– The following messages will be sent to each of The following messages will be sent to each of

wholesaler Web services: wholesaler Web services:

Page 15: Chapter 8 Web Services Designing and Other Tools (Case Study)

Case study: Designing an E-shop Case study: Designing an E-shop (continue)(continue)

How many cameras of model number How many cameras of model number XXXXXXXX do you have do you have for sale?for sale?What is the price of camera model number What is the price of camera model number XXXXXXXX??Please send Please send nn cameras with model number cameras with model number XXXXXXXX to to address address YYYYYYYYPlease send the current price listPlease send the current price list

– The camera wholesaler Web services respond with The camera wholesaler Web services respond with the following message:the following message:

We have n cameras with model number We have n cameras with model number XXXXXXXXCamera model Camera model XXXXXXXX is $399.00 is $399.00This is a confirmation that This is a confirmation that nn cameras with model cameras with model XXXXXXXX were sent to address were sent to address YYYYYYYYHere is the current price listHere is the current price listAny error message indicating that the camera is out of Any error message indicating that the camera is out of stock or that doesn’t existstock or that doesn’t exist

Page 16: Chapter 8 Web Services Designing and Other Tools (Case Study)

Case study: Designing an E-shop Case study: Designing an E-shop (continue)(continue)

– CheapestCameras.com website will send the CheapestCameras.com website will send the following message to the credit card validation following message to the credit card validation website:website:

Will you approve a purchase of $399.00 on credit card Will you approve a purchase of $399.00 on credit card number 1111-6666-8888-9999?number 1111-6666-8888-9999?

– The credit card Web service will send the following The credit card Web service will send the following messages:messages:

A purchase of $3.00 on credit card number 1111-6666-A purchase of $3.00 on credit card number 1111-6666-8888-9999 is approved/not approved, or8888-9999 is approved/not approved, or

An error message stating that credit card number is An error message stating that credit card number is unknownunknown

Page 17: Chapter 8 Web Services Designing and Other Tools (Case Study)

Case study: Designing an E-shop Case study: Designing an E-shop (continue)(continue)

Description of usage of the systemDescription of usage of the system– At a certain time of every night, our website would At a certain time of every night, our website would

search the Web services repository for new search the Web services repository for new wholesalers to buy fromwholesalers to buy from

– If found a new one, the wholesaler to the list of If found a new one, the wholesaler to the list of current vendor in our website will be addedcurrent vendor in our website will be added

– The message to each wholesaler’s Web service The message to each wholesaler’s Web service asking for the current price list will be the sent outasking for the current price list will be the sent out

– The latest price list will be returned from each The latest price list will be returned from each wholesaler’s Web servicewholesaler’s Web service

Page 18: Chapter 8 Web Services Designing and Other Tools (Case Study)

Case study: Designing an E-shop Case study: Designing an E-shop (continue)(continue)

– Our website will recalculate the prices and Our website will recalculate the prices and reflect these changesreflect these changes

– When a customer goes to our E-shop, she When a customer goes to our E-shop, she chooses a camera to buy. During the chooses a camera to buy. During the checkout, the website sends a message to checkout, the website sends a message to the credit card validation Web service.the credit card validation Web service.

– If the credit card number is approved, a If the credit card number is approved, a message is sent to the wholesaler for that message is sent to the wholesaler for that model asking if that item is still available. model asking if that item is still available.

– If it is, a message ordering that camera is sentIf it is, a message ordering that camera is sent

Page 19: Chapter 8 Web Services Designing and Other Tools (Case Study)

Case study: Designing an E-shop Case study: Designing an E-shop (continue)(continue)

– The wholesaler’s Web service will confirm the The wholesaler’s Web service will confirm the order and ship the product directly to the order and ship the product directly to the customercustomer

– If the camera is not available from this If the camera is not available from this wholesaler, the next cheapest vendor’s Web wholesaler, the next cheapest vendor’s Web service is sent the same messageservice is sent the same message

– This will continue until the requested item is This will continue until the requested item is locatedlocated

– See next slide for detailsSee next slide for details

Page 20: Chapter 8 Web Services Designing and Other Tools (Case Study)

Design logic for CheapestCamerasDesign logic for CheapestCameras

Page 21: Chapter 8 Web Services Designing and Other Tools (Case Study)

Case study: Designing an E-shop Case study: Designing an E-shop (continue)(continue)

Designing the project and development stepsDesigning the project and development steps– The first step is to perform a search to find The first step is to perform a search to find

camera wholesalers who are Web services camera wholesalers who are Web services enabledenabled

– Each wholesaler Web service will provide a Each wholesaler Web service will provide a WSDL document, these documents need to be WSDL document, these documents need to be downloadeddownloaded

– Our website software will be written to act as a Our website software will be written to act as a client and communicate with each wholesaler client and communicate with each wholesaler Web service to obtain prices and to place ordersWeb service to obtain prices and to place orders

Page 22: Chapter 8 Web Services Designing and Other Tools (Case Study)

Case study: Designing an E-shop Case study: Designing an E-shop (continue)(continue)

– Part of our website code must be written to Part of our website code must be written to process the dynamic discovery and setup of process the dynamic discovery and setup of new wholesalers that it finds the Web service new wholesalers that it finds the Web service registryregistry

– Part of our software must also be written being Part of our software must also be written being capable of acting as client to the credit card capable of acting as client to the credit card Web serviceWeb service

– The GUI of our website must be developedThe GUI of our website must be developed– When the project team completes its work, the When the project team completes its work, the

whole system is testedwhole system is tested– Deployment of the system and ready to goDeployment of the system and ready to go

Page 23: Chapter 8 Web Services Designing and Other Tools (Case Study)

Uniqueness of Web services designsUniqueness of Web services designs

In addition to the common characteristics in In addition to the common characteristics in distributed computing technology, Web services distributed computing technology, Web services designs have the following unique features we designs have the following unique features we must consider:must consider:– No incentive data transmission performance No incentive data transmission performance

Systems in which timing is critical are not good candidates Systems in which timing is critical are not good candidates for Web servicesfor Web services

– Lack of rollbackLack of rollback There is not standard approach available to rolling back There is not standard approach available to rolling back

part of a Web service transaction if a later step fails. A part of a Web service transaction if a later step fails. A Web service may not satisfy this requirementWeb service may not satisfy this requirement

Page 24: Chapter 8 Web Services Designing and Other Tools (Case Study)

Uniqueness of Web services designs Uniqueness of Web services designs (continue)(continue)

– Cascading business process executionCascading business process execution No current standard way available to chain together set No current standard way available to chain together set

of Web services into a single transaction using if-then-of Web services into a single transaction using if-then-else logic else logic

– Lack of sophisticated security technologyLack of sophisticated security technology at present only Secure Socket Layer (SSL) can be used at present only Secure Socket Layer (SSL) can be used

in Web services; there is no sophisticated encryption in Web services; there is no sophisticated encryption and decryption or digital signature available todayand decryption or digital signature available today

Page 25: Chapter 8 Web Services Designing and Other Tools (Case Study)

Uniqueness of Web services Uniqueness of Web services designs (continue)designs (continue)

On the other hand, Web services frees On the other hand, Web services frees you from many restrictions that exist for you from many restrictions that exist for other technology as follows:other technology as follows:– The geographic locationsThe geographic locations– FirewallsFirewalls– Computer languages and other programming Computer languages and other programming

toolstools

Page 26: Chapter 8 Web Services Designing and Other Tools (Case Study)

Development tools in Web servicesDevelopment tools in Web services

Apache AxisApache Axis

Java Web services developer packJava Web services developer pack

Microsoft .NetMicrosoft .Net

BEA WebLogicBEA WebLogic

IBM WebSphereIBM WebSphere

Many other Web services development toolsMany other Web services development tools– http://www.freebyte.com/webtools/http://www.freebyte.com/webtools/

Page 27: Chapter 8 Web Services Designing and Other Tools (Case Study)

Summary of Web service development Summary of Web service development stepssteps

Step one: analyzing the legacy system if it Step one: analyzing the legacy system if it existsexists

Step two: establishing goal of the Web service Step two: establishing goal of the Web service systemsystem

Step three: defining the servers and clientsStep three: defining the servers and clients

Step four: designing the messageStep four: designing the message

Step five: describing usage of the systemStep five: describing usage of the system

Page 28: Chapter 8 Web Services Designing and Other Tools (Case Study)

Summary of Web service development Summary of Web service development steps (continue)steps (continue)

Step six: designing the project by selecting Step six: designing the project by selecting Languages and toolsLanguages and tools

Step seven: writing the softwareStep seven: writing the software

Step eight: testing and modifying codeStep eight: testing and modifying code

Step nine: deploying the software package Step nine: deploying the software package into productioninto production

Page 29: Chapter 8 Web Services Designing and Other Tools (Case Study)

Questions and DiscussionQuestions and Discussion

Page 30: Chapter 8 Web Services Designing and Other Tools (Case Study)

Homework for Extra PointsHomework for Extra Points

Using the examples and Web service Using the examples and Web service development steps discussed in the chapter development steps discussed in the chapter to create CheapestBooks.com Web service to create CheapestBooks.com Web service systemsystem

Due: Wednesday, May 25, 2005 in the classDue: Wednesday, May 25, 2005 in the class