prevent table polling - How?

From: Jim Kennedy <odysscci_at_teleport.com>
Date: 1995/08/16
Message-ID: <odysscci.429.00175B2F_at_teleport.com>#1/1


Imagine that I have a table that I want to know when a value changes in it. Also imagine that I do not want to keep issueing queries against it for two reasons. I would rather not keep generating the network traffic and also I do not want to add more processing to the server.

Instead I would rather have the server push some small piece of information out to me and I can decide what to do.

So I read the manuals and looked in the script files that come with Oracle and low and behold I see this stuff on pipes and alerts. Sounds good.

So I set a up a small table and define an update trigger (I am only concerned with updates not inserts and deletes, but they would work in a similar fashion I imagine.) with an alert.

I bring up sqlPlus on my handy dandy MS Windows machine and issue the commands to register interest in the alert. I cannot believe it it works with one small problem. While SQLPlus is executing the alert procedure I cannot run any other applications! Since I cannot change the platform, shaky as it is, of the client machine, does anyone know how to get around this problem?

The application is written in C++ and I could spawn another app that does the alert call and when the alert times out or gets an alert sends a message to my main app about what went on. But it won't work if the spawned app does not yield any cycles to the rest of the system. Now I know part of the problem is MS windows, so please do not tell me if I just moved to UNIX or NT or Windows 95 all would be right. I do not have the choice.

Then I though of pipes, but it is not clear to me if the client side keeps polling a pipe that it is not doing the same thing as polling the table. That is does reading a pipe from the client cause network packets and resource drain on the server? Or does the act of stuffing the pipe send the itme to the thing interested in the pipe's output. Is it a push from the server to the client or a pull (the client keeps asking if something is ready)

Any help would be much appreciated.

TIA
Jim Kennedy

I can also be reached at jim_kennedy_at_medicalogic.com Received on Wed Aug 16 1995 - 00:00:00 CEST

Original text of this message