[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Storing Row data in McKoi
> // Create a new row container to insert data into the table.
> RowData row_data = new RowData(table);
> // (Assuming the table has a string and a numeric column...)
> row_data.setColumn(0, "My String");
> row_data.setColumn(1, new BigDecimal(10000));
> // Add the row to the table
> table.addRow(row_data);
Ahh... I think that the class I was looking for here is your RowData class.
I'm guessing based on your example showing how to write to disk, that there
is a mechanism for retrieving/reading data from the disk as well. Once each
column's data is gotten (say, with getColumn()), the RowData object can be
sent to the "slave" computer where it is added to a table.
Presumably, when you perform an update, you first create the RowData using
the existing data on disk, overwrite the appropriate columns, and then
rewrite the data to disk. Deletes somehow release the space used on the
disk, and update the Conglomerate hashtable (this is pure speculation here).
The trick will be to serialize the RowData in order to transmit it to the
slave database server, then reconstitute it, and insert/update. Clearly I
could use something like RMI, which would be a simple way to write some of
this stuff, but I'm concerned about traversing firewalls. I may opt to use
some kind of HTTP-mediated communication mechanism that could be sent out
through a proxy server. One solution would be to use SOAP or another
XML-based solution....
This might take me a while, but I'm motivated to try to write this stuff
because there really aren't any GPL'd databases written in Java that handle
synchronization/replication yet. I work with social workers who need
up-to-date data in the field, and this might be one way to provide it
(assuming I can write this stuff - I've never done anything like this
before, but there's always a first time).
Rob
---------------------------------------------------------------
Mckoi SQL Database mailing list http://www.mckoi.com/database/
To unsubscribe, send a message to mckoidb-unsubscribe@mckoi.com