Upload
melvin-hicks
View
218
Download
4
Embed Size (px)
Citation preview
Asynchronous Web Services Approach
Enrique de Andrés Saiz
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.
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
Asynchronous behavior (ii)Polling
Client Provider
Request for service Accepted
request
Request for results Results not
available
Request for results
Results
(repeat periodically)
Asynchronous behavior (iii) Notification
Client Provider
Request for service Accepted
request
Results available
Provider starts the communicationClient waits until
results are available
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.
OBTAIN RESULTS
Polling (ii)
POLLING
SERVICE REQUEST
Client Provider
Request for service Accepted
request
Request for results Results not
available
Request for results
Results
(repeat periodically)
Task ID
Task ID
Task ID
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
Implementation (ii)
Synchronous
Web ServiceInput Output
Asynchronous
Web Service
(submit method)
Asynchronous
Web Service
(fetching method)Input
Task ID
Output
Asynchronous
Web Service
(polling method)
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
Implementation (iv)
Asynchronous
Web Service
(submit method)
Asynchronous
Web Service
(fetching method)
Input
Task ID
Output
Synchronous
Web ServiceInput Output
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.
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.
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