Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: DBMS_PIPE vs DBMS_ALERT

Re: DBMS_PIPE vs DBMS_ALERT

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Tue, 25 May 1999 12:43:25 GMT
Message-ID: <374b99bf.87899612@newshost.us.oracle.com>


A copy of this was sent to Furkan Khan <khanf_at_home.com> (if that email address didn't require changing) On Tue, 25 May 1999 07:51:29 GMT, you wrote:

>Folks, has any one used these APIs ? If so can some
>shed some light on the pros and cons of the two
>mechanisms.
>
>I have used DBMS_PIPE, it seems to work,
>but its not very reliable. Is DBMS_ALERT any
>better ??
>

can you elaborate? i've been using dbms_pipe since v7.0.9 and have found it to be very reliable?

>a. DBMS_ALERT is transactions based

which can be a problem as well. If one session fires "dbms_alert.signal( 'some_event' )" -- NO other session will be able to signal 'some_event' until the first session commits. dbms_alert serializes, watch out for that.

also, dbms_alert works like unix signals. If, while a session is processing an alert message, 5 other 'signals' are raised - the session interested in that event might 'lose' the intervening signals (of the 5, perhaps only the last one will be available)

alerts and pipes are *very* different. *very* different.

pipes give you a reliable bi-directional IPC mechanism.

alerts give you a way to get a message OUT (one direction) and messages can and will be "lost" (not really lost but overwritten by subsequent messages of the same type)

there are also advanced queues which have many of the properties of pipes and alerts sort of mixed together. AQ is a real 'message' queue. you might want to investigate this as well

>b. both mechanism are asynchronous.
>

pipes are synchronous.
alerts are async.

>Are there any performance implications etc...
>I am looking for a very scalable model
>

scalable to do *what* though. without understanding what you are attempting -- no one can really tell you the best way.

>Any ideas appreciated.
>
>You can mail me directly also.
>
>Thanks and best regards.
>
>Furkan.
>

See http://www.oracle.com/ideveloper/ for my column 'Digging-in to Oracle8i'...  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Tue May 25 1999 - 07:43:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US