Presentation is loading. Please wait.

Presentation is loading. Please wait.

Asynchronous Web Services Approach Enrique de Andrés Saiz.

Similar presentations


Presentation on theme: "Asynchronous Web Services Approach Enrique de Andrés Saiz."— Presentation transcript:

1 Asynchronous Web Services Approach Enrique de Andrés Saiz

2 Motivation Web Services have a inherent synchronous operation mode. Synchronous operations are done in one step. Synchronous behavior limits the maximum execution time of the tasks achieved by Web Services. Many services exceeds the limitations imposed by the synchronous behavior.

3 Asynchronous behavior (i) Asynchronous operations are done in two basic steps:  Client requests a service.  Client obtains the results. Two approaches to do it:  Polling  Notification

4 Asynchronous behavior (ii) Polling ClientProvider Request for service Accepted request Request for results Results not available Request for results Results (repeat periodically )

5 Asynchronous behavior (iii) Notification ClientProvider Request for service Accepted request Results available Provider starts the communication Client waits until results are available

6 Polling (i) Tasks to achieve by asynchronous Web Services:  Service request  Polling  Obtaining results It’s necessary to associate a service request with subsequent polling and obtaining results messages.  Unique identifiers generated by service providers  EGEE job identifiers in case of launching jobs to the grid.

7 OBTAIN RESULTS Polling (ii) POLLING SERVICE REQUEST ClientProvider Request for service Accepted request Request for results Results not available Request for results Results (repeat periodically ) Task ID

8 Implementation (i) Split the main method of the Web Service into three methods:  Submit: Input: parameters of the web service Output: unique identifier  Polling: Input: identifier provided during submission Output: status  Fetch: Input: identifier provided during submission Output: results

9 Implementation (ii) Synchronous Web Service InputOutput Asynchronous Web Service (submit method) Asynchronous Web Service (fetching method) Input Task ID Output Asynchronous Web Service (polling method)

10 Implementation (iii) Another approach… split the main method of the Web Service into two methods:  Submit: Input: parameters of the web service Output: unique identifier  Fetch: Input: identifier provided during submission Output:  If execution has not finished yet, method fails  If execution has already finished, method returns output results

11 Implementation (iv) Asynchronous Web Service (submit method) Asynchronous Web Service (fetching method) Input Task ID Output Synchronous Web Service InputOutput

12 Another topics involved in EGEE Web Services (i) Web Services which launch jobs to the EGEE Grid through a LCG-2 User Interface. Authentication:  If web service uses a static UI, it’s necessary to add the UI user name and the password as input parameters.  If there are no default UI, UI must also be an input parameter.  Additionally, and if we want to avoid enter manually in the UI the certificate password, it’s necessary it as input parameter.

13 Another topics involved in EGEE Web Services (ii) Asynchronous Web Service (submit method) Asynchronous Web Service (fetching method) Input Task ID Output UI User name Password Cert. Pass.

14 Another topics involved in EGEE Web Services (iii) Security:  Need to preserve the confidentiality of the data exchanged (passwords)  Hosting Web Services on secure web servers


Download ppt "Asynchronous Web Services Approach Enrique de Andrés Saiz."

Similar presentations


Ads by Google