[Mapserver-dev] Estimated costs for thread safety in mapserver

Frank Warmerdam warmerdam at pobox.com
Wed Aug 27 09:27:59 EDT 2003


m.spring at gmx.de wrote:
  > Hi devs,
> 
> are there any estimations about the costs to implement thread safety
> (for mod_perl usage) in mapserver?
> In the Dep. of Health and Environment of the city of Munich we are
> using mapserver at the moment in a hybrid environment of mod_perl and
> calls to the mapserver binary and now it would be interesting how
> expensive the rewrite of the not-thread-safe parts would be.

Markus,

In part this depends on whether you just want to make things "safe" or
if you also want MapServer written in such a way that it can take
maximum advantage of multiple threads.  It isn't to hard to put locks
around big chunks of potentially dangerous machinery.  It is much harder
to rewrite problem parts to be fully reentrant and to only put locks around
minimal amounts of logic.

Without doing an indepth analysis I would give ballpark estimates something
like:

1) Implement and test coarse grained thread safety (including perl mod_perl
    specific issues) - 75 hours.

2) Add fine grained locking and effective multi-threading for core mapserver
    (shapefile driver, GD renderer, parser (possibly)) - 60 hours

3) Add fine grained locking and effective multi-threading for additional
    components such as GDAL, PROJ.4, OGR, Oracle Spatial interface, PostGIS,
    SDE interface etc. - 30 to many hundreds of hours depending on requirements.

A significant amount of (1) and (2) are already done (in theory) so the actual
development shouldn't be enormously difficult but a contractor taking this on
for a fix price would be responsible for extensive testing and fixing any
unanticipated problems.   That sort of open ended contractor side risk always
bloats times a bit.

Depending on your performance sensitivity and funds available I would suggest
doing at least (1), and (2) if you are interested in performance.  Then
consider some components of (3) that might be important in your environment.

If you are willing to take on some of the risk, you might just want to have
someone do the work on an hourly basis, and if things go smoothly it might be
quite a bit cheaper.

Some candidates that come to my minds for doing such work would be DM
Solutions Group (while they might not end up being the cheapest, they have
the greatest collection of expertise and the biggest stake in ensuring the
thread safety continues to work in the long term), Steve Lime, Sean Gillies
and myself.  I am sure there are other competent developers in the mapserver
community who could do it as well.  I would be interested in making a bid on
such work if you decide to proceed.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent





More information about the mapserver-dev mailing list