qexo-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qexo-general] Re: useful servlet


From: ivelin
Subject: [Qexo-general] Re: useful servlet
Date: Mon, 3 Feb 2003 23:28:18 -0600

Tom,

Your improvements work for me.

Please see the following notes:

1)
String.intern() is a good idea, however I am not sure that there is not an
oportunity for corrupting the cache. Say that two request for different xql
files hit the KawaPageServlet at the same time.
Now what is the guarantee that one of them putting a new entry will not
change the internal array such that the other's get will fetch the wrong
value?

2)
The saveClass should probably be a servlet init parameter, rather than
request parameter.

3)
Reportedly Servlet Printer and Writer are implemented very inefficiently.
Using plain OutputStream is preferable.

4)
If possible, add more descriptive JavaDoc to show explitly that the class
writing is just a debug option and will not affect performance.


Best,


-=Ivelin=-
----- Original Message -----
From: "Tom Reilly" <address@hidden>
To: "'Per Bothner'" <address@hidden>
Cc: "Ivelin Ivanov" <address@hidden>
Sent: Monday, February 03, 2003 10:40 AM
Subject: RE: useful servlet


>
> Attached is Ivelin's servlet reworked.  Notables:
>
> - supports multiple languages (at the same time this time)
> - supports writing out the class file for debugging purposes
> - servlet functionality works
> - I made it look like other kawa source files as much as possible
> (couldn't get my IDE to match Per's brace style perfectly), I also added
> the copyright header from other files (I have no problem assigning the
> copyright to Per, assuming Ivelin feels the same)
>
> I had to make changes in other parts of Kawa to get this to work,
> diff attached as well.  Comments/questions welcome.
>
> > -----Original Message-----
> > From: Per Bothner [mailto:address@hidden
> > Sent: Wednesday, January 29, 2003 2:50 PM
> > To: Tom Reilly
> > Cc: Ivelin Ivanov
> > Subject: Re: useful servlet
> >
> >
> > Tom Reilly wrote:
> > > I've got another proposal that will greatly simplify things but
> > > is a little more radical.
> > >
> > > If we have a servlet that can invoke a Kawa source language
> > > compiled to a Procedure do we even need the ability to compile
> > > a Kawa source language file to a servlet at all?
> >
> > Well, I think that *is* Ivelin's suggestion.
> >
> > > Ie, maybe Ivelin's servlet is the only servlet support Kawa
> > > needs.  Real servlets have init parameters, an init/destroy
> > > lifecycle, are configured in web.xml etc.  Kawa programs running
> > > under a servlet don't need all that baggage IMHO.
> >
> > Not directly - and in any case Kawa servlets access the servlet
> > context (by which I include request and request) via the
> > ServletCallContext anyway.
> >
> > The real question is whether the forwarding/compilation is an
> > instance of KawaServlet (and thus sets up the ServletCallContext)
> > or whether the compiled XQuery is an instance of KawaServlet.
> > Either works, it seems.
> >
> > If there is extra overhead for the compiled servlet then I
> > agree we don't need it, since all we actually usen is its
> > doGet method.
> >
> > If we're agreed on the basic approach, perhaps it would make
> > sense it you went over Ivelin's implementation, tested it,
> > and made any suggestions for improvements you can.  (To start
> > with, I suspect his XqlServlet is doing a bit too much logging.
> > Plus it should be generalized to other langauages.  It would be
> > cool if you could try out BRL/KRL.)  Thnough perhaps wait to see
> > if anyone else on the list has any comments first.
> > --
> > --Per Bothner
> > address@hidden   http://www.bothner.com/per/
> >
>
>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]