Difference between revisions of "Asynchronous Web Services"
| Line 12: | Line 12: | ||
Currently supported are only first two patterns. To support scenario 3 & 4 import result should be pushed to export queue with appropriate endpoint setup (standard, error). | Currently supported are only first two patterns. To support scenario 3 & 4 import result should be pushed to export queue with appropriate endpoint setup (standard, error). | ||
| − | [[File:async process.png]] | + | [[File:async process.png|650px]] |
| + | |||
| + | *Note that block "Crete Request With Result" is not implemented. | ||
| + | |||
| + | == Asynchronous Web Service Definition == | ||
| + | |||
| + | To enable Asynchronous Import setup Storage Type as "AsyncWebService". | ||
| + | |||
| + | [[File:import def form.png]] | ||
| + | |||
| + | |||
| + | Asynchronous import definition consists of regular import and additional section <ack>…<ack>. Inside ack element defined is additional separate import definition (full featured) which is responsible for generating acknowledgement. Import form ack section is processed first and import result is responded to client immediately. After respond main import is processed asynchronously (in separate thread). Result is stored in syImpExpQueue.AsyncResult. | ||
| + | |||
| + | [[File:queue det formAsync result.png]] | ||
Revision as of 11:58, 21 June 2016
Introduction
Base principal of asynchronous processing is to store request data (from web service client) in queue and immediately respond with simple acknowledgement. From client point of view acknowledge means that his message is delivered and pending processing. Web service host process (import) received data in separate thread. Advantage of asynchronous processing is that client do not have to wait for time consuming processing (big data volume). Network connection can be easily broken and it is important to keep it as short as possible. Action after processing of message depend on agreement. Possible scenarios:
- Client don’t expect processing results (send ad forget)
- Client will periodically call sever and asks for results (until processed)
- Client expects that server will always send back result.
- Client expects that server will send back result only when processing fail.
Currently supported are only first two patterns. To support scenario 3 & 4 import result should be pushed to export queue with appropriate endpoint setup (standard, error).
- Note that block "Crete Request With Result" is not implemented.
Asynchronous Web Service Definition
To enable Asynchronous Import setup Storage Type as "AsyncWebService".
Asynchronous import definition consists of regular import and additional section <ack>…<ack>. Inside ack element defined is additional separate import definition (full featured) which is responsible for generating acknowledgement. Import form ack section is processed first and import result is responded to client immediately. After respond main import is processed asynchronously (in separate thread). Result is stored in syImpExpQueue.AsyncResult.

