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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: event based scheduling and queues

Re: event based scheduling and queues

From: Chris Stephens <cstephens16_at_gmail.com>
Date: Fri, 9 Dec 2005 15:45:33 -0500
Message-ID: <d95e86070512091245x5b16bca2vd33fec7aca766fc3@mail.gmail.com>


we were trying to make use of the new event based dbms_scheduler functionality. an example of that is over on oracle-base. that plan is definitely scratched because of the possibility of ignored events....which is actually documented/expected behavior.

we are now thinking of going with dynamically creating jobs to do the processing. it'll work as follows:

application calls a database procedure that

  1. calls dbms_aq.enqueue to enqueue the document.
  2. if passed isFullSet = 'true' will create a job through dbms_scheduler to process the queued item and all other members of its set.

chris

On 12/9/05, Christo Kutrovsky <kutrovsky.oracle_at_gmail.com> wrote:
> Can you give us more details about how you enque and make the job
> wakeup ? Perhaps some code extracts ?
>
> On 12/9/05, Chris Stephens <cstephens16_at_gmail.com> wrote:
> > 10gR2 on linux
> >
> > We have a queue that accepts xml documents. Documents are members of
> > sets. No document can be processed unless the entire set has been
> > enqueued. We indicate this by a 'isLastInSet' attribute in the
> > payload. We were hoping to set an event based job that is triggered
> > this attribute having a 'true' value.
> >
> > In testing this out we discovered that events can be ignored when the
> > job that wakes up is already active. We ran a loop that enqueued
> > 20,000 items that all had isLastInset = 'true'. The action in the job
> > was to simply insert a row into a table. After executing the test,
> > there were only 224 rows inserted. This obviously leaves open the
> > possibility that many items will be left unprocessed.
> >
> > We need a solution that ensures all sets are processed as soon as the
> > last set member is enqueued.
> >
> > Has anyone had similar requirements? ...and if so, what was the
> > implementation? did you have a polling process that wakes up every so
> > often and evaluates the entire queue?
> >
> > thanks,
> > chris
> > --
> > http://www.freelists.org/webpage/oracle-l
> >
> >
> >
>
>
> --
> Christo Kutrovsky
> Database/System Administrator
> The Pythian Group
>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Dec 09 2005 - 14:48:55 CST

Original text of this message

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