Multiple user problem -- C# MapScript Web Application (Is mapserver thread safe?)

Benedikt Rothe umn-ms at HYDROTEC.DE
Wed Aug 9 09:11:38 EDT 2006


Hi

Sorry Tamas. I'm affraid I won't be helpfull.

> How the global synchronization affect the performance of your
> application in a multiuser environment?
I couldn't test the influence of "synchronized", because of the crashes 
without synchronizing. 
(I didn't make a test without parallel requests. Wasn't usefull for me)

Additionally I'm quite shure, that the "Maps per Minutes"-Index
is (almost?) not influenced on a single CPU-machine. I expect that
lock-acquire is *much* cheaper, than map-drawing.

On Multi-CPU things become bad!

Therfore I never thought of "synchroized" as a solution but a workaround.

> I afraid this kind of protection cannot be utilized easily for ASP.NET
> since the host process
> may load and execute multiple separate application domains.
"application domains"? puh ...
I never really wrote a line C#. What about this?:
class MyClass
  static readonly object globalLock = new object();
  ...
  public void anInstanceMethod () {
    lock (globalLock ) {
         umnMap.draw();
     }
   }
Has every application domain it's own static members?

> However i am keen to implement such functionality at the SWIG
> interface level as an alternative to the USE_THREAD approach.
What a pitty! I loved your enthusiasm to provide a "real" solution :-)
I absolutely agree, that this issue will become very important for C#, 
Java and
for Multiprocessor-machines.

Additionaly: I found Ned Harding's approach intersting. This is what Esri 
did with ArcView-IMS an MO-IMS.

Ciao
Benedikt

UMN MapServer Developers List <MAPSERVER-DEV at LISTS.UMN.EDU> schrieb am 
09.08.2006 10:40:21:

> Benedikt,
> 
> How the global synchronization affect the performance of your
> application in a multiuser environment?
> I afraid this kind of protection cannot be utilized easily for ASP.NET
> since the host process
> may load and execute multiple separate application domains.
> However i am keen to implement such functionality at the SWIG
> interface level as an alternative to the USE_THREAD approach.
> 
> Tamas
> 
> 
> 2006/8/9, Benedikt Rothe <umn-ms at hydrotec.de>:
> >
> > Tamas, Umberto
> >
> > Umberto wrote about good experience with Mapserver-Multithreading in 
Java.
> > This is not my experience. In our "Mapserver-Servlet" we had to use a 
global
> > synchronizing around
> > mapserver-calls  (i.e. disabling multithreading) to avoid crashes.
> >
> > Benedikt
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20060809/e1856582/attachment.html


More information about the mapserver-dev mailing list