[kepler-users] Thread Safety in Actors using external libraries

Tom Parris parris at isciences.com
Wed Dec 11 06:10:34 PST 2013


Dear kepler-users:

We have constructed some Java/JNI actors that make use of GDAL as an
external library for i/o.  A recent change in computing platforms exposed
some thread-safety issues in GDAL that we are now struggling to address.

*Nature of problem:  *
We have two GDAL-based actors.  One for reading raster imagery (ERDAS IMG
files) into a matrix, one for writing raster imagery into a matrix (and, at
some point, we would like to contribute these to Kepler). These actors are
used heavily in PN workflows.  While GDAL is thread safe for reading
(multiple thread can read at the same time), it is not thread safe for
writing (problems occur if any thread is writing while other threads are
either reading or writing).

*Possible fix:*
The GDAL discussions suggest using Java synchronization to avoid thread
safety issues.

*Questions:*
1. Will using java synchronization in an actor cause other problems with
Kepler/Ptolemy under PN?
2. Does anybody have a model of an actor that uses java synchronization to
avoid thread safety issues in external libraries that they would be willing
to share?
3. Are there other solutions we should consider?

Many thanks,
Tom Parris


Thomas M. Parris
Vice President
ISciences, L.L.C.
61 Main Street, Suite 200
Burlington, VT  05401
(802) 864-2999; parris at isciences.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/attachments/20131211/914697eb/attachment.html>


More information about the Kepler-users mailing list