home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.sybase
- Path: sparky!uunet!shearson.com!news
- From: fgreco@shearson.com (Frank Greco)
- Subject: SUMMARY - Notifying clients of table mods
- Message-ID: <1993Jan7.145200.12137@shearson.com>
- Sender: news@shearson.com (News)
- Organization: Lehman Brothers
- Date: Thu, 7 Jan 1993 14:52:00 GMT
- Lines: 56
-
- Thanks for the many, many responses everyone. Here's my
- original post:
-
- >I have a potential appliation where I would like to notify distributed
- >client processes (LAN) that a table(s) was modified in a Sybase database.
- >
- >I'd like to not use OpenClient at this point if at all possible.
- >
- >My initial thought is to write a master process that polls a
- >"modifications" table (perhaps created via trigger(s)) that tracks what
- >was modified and then looking up in a "subscriber" table to see who to
- >notify. Then, if needed, send some data via a socket (I'm assuming all
- >SPARC machines) to the appropriate subscribers.
- >
- >Another thought would be to front-end all the queries and, upon
- >successful table modification, directly notify any clients (again
- >through sockets). This alternative would seem to have performance
- >ramifications.
- >
- >I'd appreciate any comments that any of you might have,
-
- The overwhelming number of folks said to use OpenServer (my
- post was faulty in that I said I'd rather not use "OpenClient";
- I meant "OpenServer"). Many others (correctly) told me that
- Sybase cannot call routines in your pgm directly.
-
- While you cannot directly have a trigger invoke a routine
- (unfortunately) in your application via Sybase [I believe
- Interbase can do this], you can setup a trigger quite easily to
- call OpenServer via an RPC. From there all clients that are
- registered to be interested in this RPC will be notified.
-
- There are other places in dblib where the dataserver calls your
- own specified routines (e.g., message/error handling); it'd be
- nice if there was some mechanism to allow triggers (and
- alerters ... hint... hint) to do this *directly* in Sybase.
-
- Since I really didn't want to use OpenServer for this
- particular application for various reasons, I decided on using
- ToolTalk (from Sun) and a little polling program. Whenever an
- update/delete/insert happens, an entry in written into a
- logtable. My polling (delay is dynamically set) ToolTalk
- program looks into this table for database activity, and if
- there is any, uses ToolTalk messages to notify interested
- parties via multicasting. Really wasn't too bad to write; took
- me about 1 week to complete this with a nice API for client
- (ie, "interested") applications.
-
- Thanks to everyone (I got over 50 responses)!
-
- Frank G.
- --
- +-On Assignment at: Lehman Brothers-+-Office: Mercury Technologies, Inc.-+
- | World Financial Center, 11th Floor| PO Box 529 |
- | New York City, NY 10285 Desk: 1515| Fanwood, NJ 07023 |
- | email: fgreco@shearson.com | email: fgreco@mercury.com |
-