If I read the intent behind Bill's question as asking if master-slave
replication can be done using TDB transaction logs, then the answer is
that there is no option to store the logs for reply onto another system.
In fact, that's the wrong log because the two systems may be slightly
different even if the same data (e.g. bNodes). The fact that disk bytes
are exactly the same for the same data is not guaranteed (it happens to
be true, sans bnodes, for identical hardware currently, but there is no
guarantee of this).
Secondly, transaction logs maybe collapse at any moment. When the
write-back to the main database is properly sync'ed to persistent
storage, the journal is truncated to zero length.
A Master-Slave replication scheme has a very big decision to make. Does
it replicate changes before announcing end of request to the client or
does it commit changes locally and announce success before replication
has occurred?
The first is safe but has bad latency - a commit now has to
synchronously go to another machine. That machine may be busy and slow.
The second is unsafe - the client can be told that an update has
happened but if the master is lost before replication has successfully
completed then the update is lost.
c.f. MongoDB where even the recent changes are still not fully resilient
to node loss.
I have been looking at RDF-level logging of changes whereby a diff log
is generated. It can be used for change propagation or reply against a
backup to bring it quickly up-to-date. Since Fuseki can produce live
backups, the combination is quite effective. Only some proof-of-concept
stuff at the moment.
There are other things you can do about this such as request
replication. Ping me if you want more discussion - it's too late here now.
Andy
From the vaults:
http://www.hpl.hp.com/techreports/98/HPL-98-06.html
On 02/05/13 21:17, Rob Vesse wrote:
Yes
If you use TDB in transactional mode (which I believe Fuseki will do by
default - Andy can probably confirm if this is accurate) then TDB uses
write ahead logging to provide ACID guarantees
Yes - Fuseki is in transaction mode for TDB. There is no option to turn
it off.
http://jena.apache.org/documentation/tdb/tdb_transactions.html
Rob
On 5/2/13 1:12 PM, "Bill Roberts" <b...@swirrl.com> wrote:
Does Fuseki/TDB have the option of storing transaction logs (in the style
of most SQL databases), to allow a history of updates to be replayed - eg
to recover after a problem, or for synchronising databases?
Thanks
Bill