-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matthew Toseland a ?crit :
> On Tuesday 05 August 2008 15:17, Julien Cornuwel wrote:
>> Matthew Toseland a ?crit :
>>> What's your consistency strategy going to be? Never commit, just set()
>>> everywhere, thus can access from any thread (hopefully) ?
>> I'm affraid I don't understand what you are talking about. Can you explain ?
> 
> Databases can be a major PITA. How do you propose to use db4o exactly? One 
> strategy, which you appear to be using now, is never to call commit() and to 
> just access it wherever you need it. This can work, although it does mean 
> that if you have an unclean shutdown, either all data is lost, or it is 
> rolled back to before startup. If you call commit() on the other hand, you 
> can be more sure of consistency, but you have various worries about 
> concurrence  (i.e. what happens if one thread is doing X and another thread 
> is doing Y and the first thread commits before the second thread is done). On 
> the db4o branch, we do all database access on a single thread and commit 
> regularly, for this reason. Yet another option is to have multiple 
> transactions within one VM (which leads to having to update objects manually 
> in case they have been changed by another transaction...).
> 
> But with something simpler (WoT) you may be able to get away with some sort 
> of 
> compromise.

Understood. Till now, I didn't think about it.
If I'm able to do non blocking inserts, WoT will run in only one thread.
That means I'll have to commit regularily :
- - After each identity creation/insertion
- - After each setTrust()
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFImGXTmY5qNqKdYw0RAhb6AKCeFwdIOxhXr9yARCC7O2IVYXXdOACgjHX8
yVpAq25jD14w5YcTMhdKGYI=
=YZ3n
-----END PGP SIGNATURE-----

Reply via email to