Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Fast Way to Identify Updated Database
Mon, Apr 9 2007 5:50 PMPermanent Link

"Johnnie Norsworthy"
I have a number of computers that will be updating a C/S database and a
single computer that needs to be informed immedietly when an update happens.
I mean very very quickly.

Can I use standard DBISAM stuff and just poll the database every second or
should I look into a system where I use my own TCP socket for notification?
Is it time consuming or a system drain to have a thread that constantly
requests a table's last modified date?

-Johnnie

Mon, Apr 9 2007 8:05 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Johnnie,

<< I have a number of computers that will be updating a C/S database and a
single computer that needs to be informed immedietly when an update happens.
I mean very very quickly.

Can I use standard DBISAM stuff and just poll the database every second or
should I look into a system where I use my own TCP socket for notification?
Is it time consuming or a system drain to have a thread that constantly
requests a table's last modified date? >>

I would look at using notification since polling will be extremely
inefficient due to the small time window required for the notification.  My
recommendation would be to use a single server-side procedure for all
updates, and have the notification functionality send a message to all
interested parties from within the server-side procedure after the updates
are completed.  Likewise, you could do so in a trigger(s) so that the
updates don't have to go through a specific server-side procedure and will
get triggered for all SQL statements, etc.  The only downside with that
approach is that you may end up sending a boat-load of notifications if a
lot of rows are updated at once.

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Apr 12 2007 4:33 AMPermanent Link

Chris Erdal
"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in
news:003D8B11-72CC-4E71-A29C-1FC14ED487B1@news.elevatesoft.com:

>  The only downside with that
> approach is that you may end up sending a boat-load of notifications
> if a lot of rows are updated at once.
>

If that became a problem you could set a flag on each trigger notification
and use a timer to check if it has been set and if so reset the flag and
send the message(s) to the distant pc(s). (or put this part in a slave
service on the server)

--
Chris
(XP-Pro + Delphi 7 Architect + DBISAM 4.25 build 3 + EDB 1.00 build 6)
Image