Re: [OpenMap Users] threading questions

From: Don Dietrick <dietrick_at_bbn.com>
Date: Fri, 16 Jul 2004 20:59:51 -0700

On Jul 16, 2004, at 9:11 AM, Whanger, Thomas wrote:

> Hey all,
>
>  
>
> Without changing the code in OpenMap v4.6, is it safe to have only one
> MapRequestHandler that every HTTP servlet request uses or should a new
> MapRequestHandler be created for each servlet request?

I'd reuse a MapRequestHandler. You don't want to be creating layers
for every request.

>
> Also, I saw the ImageServer class has a Javadoc comment that states,
> "Right now, the ImageServer is single threaded - processing requests
> one after another."  I am just curious, but how much and what work is
> involved to multi-thread the ImageServer class?

It should be thread-safe, but because the method called on each layer
is synchronized.

If you have the memory for it and want to avoid blocking as much as
possible, you might want to think about having a pool of
MapRequestHandlers to use.

- Don

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Sat Jul 17 2004 - 00:01:53 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:05 EDT