Advanced Queuing   «Prev  Next»

Lesson 1

Advanced Queuing in Oracle

Oracle Queuing Features: Modifying Client-Server Interactions

I am working as an Oracle DBA and am investigating its queueing features.
  1. Introduction:
    Oracle Advanced Queuing (AQ) provides robust queuing functionality that dramatically transforms the traditional client-server interaction model. By employing message queuing and asynchronous processing, applications can scale more effectively, improve performance, and achieve more reliable data communication.
  2. Asynchronous Processing:
    1. Traditional Model: In a standard client-server model, a client sends a request to the server and waits for an immediate response. This synchronous interaction can lead to bottlenecks when dealing with a large number of simultaneous requests.
    2. With Oracle AQ: The client places a request in a queue, allowing the server to process the message at its own pace. This means clients are not left waiting for server responses, promoting faster and more efficient interactions.
  3. Decoupling of Client and Server:
    1. Benefit of Decoupling: Queuing allows the client and server components to operate independently. This decoupling results in enhanced scalability and fault tolerance.
    2. Scalability: The server can be scaled out to process messages from the queue in parallel, accommodating high loads without affecting the client side.
    3. Fault Tolerance: If the server component fails or becomes unreachable, messages remain in the queue until they can be processed. This ensures no data loss during transient server issues.
  4. Priority-based Processing:
    1. Priority Levels: Oracle AQ supports priority-based message processing. This means certain critical messages can be processed ahead of others, ensuring that essential tasks receive immediate attention.
    2. Adaptive Workflow: By assigning different priority levels, businesses can adapt to changing conditions, ensuring that the most vital processes are attended to promptly.
  5. Delayed Processing and Scheduling:
    1. Timed Messages: Oracle AQ allows for the scheduling of messages. A client can place a request in the queue to be processed at a specific future time.
    2. Advantages: This feature is beneficial for tasks that need to be executed during off-peak hours, or for events that are planned in advance.
  6. Guaranteed Message Delivery:
    1. Reliability: One of the paramount features of Oracle AQ is its guarantee of message delivery. Once a message is in the queue, Oracle ensures its delivery to the intended recipient, even in cases of system failures.
    2. Transactional Integrity: Oracle AQ supports transactions. This means that queuing operations (enqueue and dequeue) can be made part of larger database transactions, ensuring data consistency and integrity.
  7. Conclusion:
    Oracle's queuing features provide a paradigm shift in the way clients and servers interact within applications. By introducing asynchronous communication, decoupling components, and offering advanced functionalities like priority processing and scheduled messaging, Oracle AQ offers applications a path to enhanced performance, scalability, and reliability. This results in robust systems that can better meet the evolving demands of modern business operations.
Although we normally think about Oracle as a database, Oracle can also be seen as the focal point of an entire application system. Advanced Queuing is a feature of Oracle that lets you dramatically modify the way that the clients in your application interact with their associated server.

Module Objectives

In this module, you will learn about Advanced Queuing, including how to:
  1. Define Advanced Queuing and the entities involved
  2. Describe important data dictionary views that contain information about Advanced Queuing
  3. Describe the prebuilt PL/SQL packages used to create an Advanced Queuing application
  4. Use PL/SQL to create an Advanced Queuing application
  5. Set up enqueuing to the Advanced Queue
  6. Set up dequeuing from the Advanced Queue
  7. Set up propagation functionality with PL/SQL
  8. Run the application you have created with Advanced Queuing

Over the course of several lessons, in addition to learning about Advanced Queuing, you will develop a series of PL/SQL packages that you can use to implement some of its functionality. Advanced Queuing is nothing less than a completely new way to think about communications between a client and a database server, and this module provides an in-depth introduction to this functionality.
In the next lesson, we will discuss Advanced Queuing in general.

Oracle 12c Performance Tuning