[gdal-dev] Question about using Python API to GDAL/OGR in a"production" environment

Sean Gillies sgillies at frii.com
Fri Jan 18 13:43:45 EST 2008


And it's easy to stay in synch with Python. In fact, because of the
global interpreter lock, you'll have to really go out of your way to get
in trouble. See

http://linuxgazette.net/107/pai.html

for a nice intro to the GIL. BTW, Python doesn't take threads as
seriously as Java (for example). If you think you need Python threads,
you might want to take a look at the various multi-process modules instead.

Cheers,
Sean

mchapman at texelinc.com wrote:
> If you know how to correctly synchronize your code execution with critical sections, mutexes, etc then gdal works great in a mt environment.  
> 
> Martin
> 
> Sent via BlackBerry by AT&T
> 
> -----Original Message-----
> From: "Roger André" <randre at gmail.com>
> 
> Date: Fri, 18 Jan 2008 09:53:53 
> To:gdal-dev at lists.osgeo.org
> Subject: [gdal-dev] Question about using Python API to GDAL/OGR in a
> 	"production" environment
> 
> 
> I've been using the GDAL and OGR modules in Python scripts for a little while now to automate a variety of tasks at work.  It's worked very well, and I would now like to use it in conjunction with Apache and FastCGI to create some web services that read a variety of different data sources and serve up KML and custom data strings that feed web-based map API's.  However, I've been strongly cautioned not to do this, as I'm told that GDAL isn't "thread safe", and that I would need to write some sort of "connection manager" to manage "things".  This intrigues me, and in no way dissuades me from trying my idea out, but I'm curious if some of you have used GDAL/OGR in a similar fashion in a "production" environment?  (Just exactly what constitutes a 'production', or 'Enterprise' system is also a topic of some interest to me.)  My use would strictly be "read-only", and using the Python API. 
> 
> Any feedback or suggestions of things to keep in mind would be greatly appreciated.
> 
> Roger
> --
>  _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev



More information about the gdal-dev mailing list