Subject | Correct use of transactions for 24x7 |
---|---|
Author | riaan.b@mweb.co.za |
Post date | 2001-10-07T19:53:03Z |
Hi all
I have a small application that is written in Builder 4, using
IBO3.6 and IB6. The application receives data from an external card-
reader at a maximum rate of about 5 records per second. This data is
placed in a single-table database. The client wants to see the last
50 records in a grid-type display, updated at least once a second.
The application also need to approach 24x7 operation.
Currently, I am using one transaction for writing data to the
database, performing a CommitRetaining after every post. For
displaying data in the grid, I use another transaction, refreshing
the query when new data is received.
I want to make the following modifications, but would like hear any
comments, especially regarding the 24x7 operation.
1. Data is buffered and written to the database only once a second.
The transaction is opened, data is posted, and the transaction is
completed with a 'Commit'.
2. For data display use the following procedure : open transaction;
get top 50 records; wait 1 second; close transaction (Commit); open
transaction; get top 50...
I would have liked to close the transaction immediately after
fetching the data, but then the grid data is cleared - any
suggestions will be appreciated.
Thanks in advance.
Riaan Bosch
Pretoria
South Africa
I have a small application that is written in Builder 4, using
IBO3.6 and IB6. The application receives data from an external card-
reader at a maximum rate of about 5 records per second. This data is
placed in a single-table database. The client wants to see the last
50 records in a grid-type display, updated at least once a second.
The application also need to approach 24x7 operation.
Currently, I am using one transaction for writing data to the
database, performing a CommitRetaining after every post. For
displaying data in the grid, I use another transaction, refreshing
the query when new data is received.
I want to make the following modifications, but would like hear any
comments, especially regarding the 24x7 operation.
1. Data is buffered and written to the database only once a second.
The transaction is opened, data is posted, and the transaction is
completed with a 'Commit'.
2. For data display use the following procedure : open transaction;
get top 50 records; wait 1 second; close transaction (Commit); open
transaction; get top 50...
I would have liked to close the transaction immediately after
fetching the data, but then the grid data is cleared - any
suggestions will be appreciated.
Thanks in advance.
Riaan Bosch
Pretoria
South Africa