rdf-pipeline / framework

Automatically exported from code.google.com/p/rdf-pipeline
Apache License 2.0
4 stars 1 forks source link

Lock output while updating #7

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
At present a node's output could be modified (by one thread or process) while a 
downstream node is reading it (in another thread or process), thus causing the 
downstream node to see the output in an inconsistent state.  To handle lots of 
asynchronous requests reliably, at some point we'll need to add locking or some 
other mechanism, such as an actor model, to ensure that access to the output is 
properly controlled.

Some possibly helpful reading:
http://stackoverflow.com/questions/34920/how-do-i-lock-a-file-in-perl
http://search.cpan.org/~rani/IO-LockedFile-0.23/LockedFile.pm
http://search.cpan.org/~jv/LockFile-Simple-0.207/Simple.pm
http://perldoc.perl.org/functions/flock.html
http://perldoc.perl.org/DB_File.html

Original issue reported on code.google.com by david@dbooth.org on 14 Nov 2011 at 4:03

GoogleCodeExporter commented 9 years ago
P.S.  Of course we need to consider deadlock, race condition and related issues 
along with this.

Original comment by david@dbooth.org on 19 Dec 2011 at 8:06