implementing a large table over a database

Frank Fock Frank.Fock____t-online.de
Fri Oct 4 22:19:01 CEST 2002


Hi Dave,

There have been several AGENT++ users that integrated
database access as part of table implementaions.
I recommend that you implement some generic approach
in your own MibComplexEntry or MibTable subclass.
You should use MibTable, if you users should be able to
create rows in the table. In other cases both approaches
have pros and cons.
If you choose to use MibTable, then you should overwrite
its update Method to create a view of a small (required)
portion of the table from the database when a request is
being processed. You will have to take some precautions
regarding synchronization between concurrent requests to
the same table.

I have not used MySQL in C++ yet, so I cannot help here
(may be someone else can?).

Best regards,
Frank

Dave Mason wrote:
> Hi all,
> I need to implement an alarm log, which will be a child of MibTable, 
> with rows and columns that will correspond to similar rows and columns 
> in a database.  The tables I have done before are entirely memory 
> resident because they don't grow continuously, but the log table will 
> keep growing.  I dont want to keep all the rows in memory, so does 
> anybody have a suggestion as to how to have the table object read a row, 
> update any new values (for a Set) or just return it (for a Get), then 
> delete the row from memory before moving to the next row?  In a normal 
> table, the table object creates a row, then the columnar objects are 
> responsible for getting their values.  In this case, I'd like to operate 
> on the whole row at once with a select or update statement.  Maybe you 
> need to to have a MibTableRow method read the row into some temporary 
> space, and let the columnar objects get their data from there?  Any tips 
> about that would help a lot.
> 
> Also, I'll probably use some public domain database like mysql, which I 
> havent used before.  Questions about that are beyond the scope of this 
> list, but any tips on how to integrate it with Agent++ would be very 
> helpful too.
> 
> Regards,
> Dave
> 
> 
> 







More information about the AGENTPP mailing list