09.12.2012 Views

Advanced Queuing - Oracle

Advanced Queuing - Oracle

Advanced Queuing - Oracle

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Modeling Queue Entities<br />

Figure 7–3 Client-Server Communication Using AQ<br />

Enqueue<br />

Dequeue<br />

Application A<br />

producer & consumer<br />

Request<br />

Queue<br />

Response<br />

Queue<br />

Application B<br />

consumer & producer<br />

Dequeue<br />

Enqueue<br />

Client<br />

Server<br />

1. Application A enqueues a request into the request queue.<br />

2. Application B dequeues the request.<br />

3. Application B processes the request.<br />

4. Application B enqueues the result in the response queue.<br />

5. Application A dequeues the result from the response queue.<br />

In this way the client does not have to wait to establish a connection with the server,<br />

and the server dequeues the message at its own pace. When the server is finished<br />

processing the message, there is no need for the client to be waiting to receive the<br />

result. In this way a process of double-deferral frees both client and server.<br />

Note: The various enqueue and dequeue operations are part of<br />

different transactions.<br />

7-6 <strong>Oracle</strong>9i Application Developer’s Guide - <strong>Advanced</strong> <strong>Queuing</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!