Subject | Re: [firebird-support] Re: FireBird Events |
---|---|
Author | David Johnson |
Post date | 2005-07-17T20:20:44Z |
Are you saying you want the database to PUSH data to the clients? DBMS'
don't work that way - they are a pull only architecture.
However, if you use a Message Oriented Middleware (MOM), a stored
procedure could conceivably push messages into the message queue
(probably via a UDF), tied to the subscribed topics (stocks), and the
client could poll the MOM for the topics of interest or the MOM could
push the messages directly to subscribers (depending on the MOM
architecture and configuration).
You could mimic a persisting MOM by creating a message table (possibly
in a separate database) that contains message ID, topic, timestamp,
expiry timestamp, and data. Your reader application would then poll the
MOM table for topics of interest that are newer than the last read
timestamp. A cleanup job would run every few minutes to delete expired
messages.
Maybe someone will get really ambitious and write a FireQueue based on
Firebird, the way that IBM's MQ is based on DB2. I know I'd love it,
but I also don't have quite that much time right now.
don't work that way - they are a pull only architecture.
However, if you use a Message Oriented Middleware (MOM), a stored
procedure could conceivably push messages into the message queue
(probably via a UDF), tied to the subscribed topics (stocks), and the
client could poll the MOM for the topics of interest or the MOM could
push the messages directly to subscribers (depending on the MOM
architecture and configuration).
You could mimic a persisting MOM by creating a message table (possibly
in a separate database) that contains message ID, topic, timestamp,
expiry timestamp, and data. Your reader application would then poll the
MOM table for topics of interest that are newer than the last read
timestamp. A cleanup job would run every few minutes to delete expired
messages.
Maybe someone will get really ambitious and write a FireQueue based on
Firebird, the way that IBM's MQ is based on DB2. I know I'd love it,
but I also don't have quite that much time right now.
On Sun, 2005-07-17 at 19:38 +0000, sasidhardoc wrote:
> Adam
> > When the stock price changes, fire the stock price event. When you
> > initially query the stock prices, take note of the maximum timestamp,
> > and when you reissue the query, add a timeofinterest > :thattime to
> > the where clause.
> In this scenario, ANY update to the table will cause all the clients
> to requery the Db. This is what I am trying to avoid.
> Imagine the Table has thousands of records, but each client is
> watching only a few - 3 or 4. The number of clients is large. Also,
> the table receives updates at a high frequency. So, each update in
> turn generates a query from every client - although the likelihood
> that any of those clients is actually interested in that particular
> update is low.
> Maybe someone with experience in using Firebird in applications -such
> as Helen Borrie :-) - can point me in the right direction.
> MS
>
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>