You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by cm...@yahoo.com on 2001/04/13 23:18:21 UTC

Jasper

Hi,

While Mel is working on the JspServlet proposal, I thought it would be a
good idea to send my notes on jasper. 

I looked at both "branches" of jasper, with the idea of trying to merge
them while preserving each "personality".

As I expected, most of the code is still common, with only few variations
that can be resolved by modularization. Unfortunately, the code requires
some work in order to implement most of the optimizations I have in mind
and before we can merge them.

Some ideas are available at http://nagoya.apache.org/~costin/jasper.txt

I don't know how much free time I'll have for that before 3.3 beta, but
there are a lot of cool things that can be done in jasper ( and not only
performance enhancements ).  


Costin


 



Re: Jasper

Posted by Mel Martinez <me...@yahoo.com>.
--- Mel Martinez <me...@yahoo.com> wrote:
> 
> --- cmanolache@yahoo.com wrote:
> > Hi,
> > 
> > While Mel is working on the JspServlet proposal, I
> > thought it would be a
> > good idea to send my notes on jasper. 
> > 
> > I looked at both "branches" of jasper, with the
> idea
> > of trying to merge
> > them while preserving each "personality".
> > 
> > As I expected, most of the code is still common,
> > with only few variations
> > that can be resolved by modularization.
> > Unfortunately, the code requires
> > some work in order to implement most of the
> > optimizations I have in mind
> > and before we can merge them.
> > 
> > Some ideas are available at
> > http://nagoya.apache.org/~costin/jasper.txt
> > 
> > I don't know how much free time I'll have for that
> > before 3.3 beta, but
> > there are a lot of cool things that can be done in
> > jasper ( and not only
> > performance enhancements ).  
> > 
> > 
> 
> Costin,
> 
> Thanks for the above thoughts (in jasper.txt).  Very
> useful input.  I'm going to more fully ingest that
> and
> merge aspects of it, where appropriate into my
> (really
> 'our') proposal.  In the mean time, I've decided to
> get the current state of jasper34 checked in for you
> and others to start to take a look at it. 
> Everything
> is checked in to CVS in two folders:
> 
> jakarta-tomcat/proposals/jasper34
> jakarta-tomcat/src/jasper34
> 
> Please peruse the above after you do an update and
> give me your feedback.  Everything is in it's
> infancy
> and subject to change, so be kind....  :-)
> 

FYI: for those who don't have or want to have tc3.3
checked out, you can also access the proposal via
CVSWeb by using the link:

http://jakarta.apache.org/cvsweb/index.cgi/~checkout~/jakarta-tomcat/proposals/jasper34/JasperToolkit.html
 
I expect this document to undergo rapid and dramatic
changes, so check back occasionally on it.

Mel



__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Re: Jasper

Posted by cm...@yahoo.com.
> > - "commons"-style components. Even if we'll use explicit interfaces for
> > ... 
> 
> I'll need to review the commons project to adopt any
> standards that are in play there, but I don't see a
> problem.  This brings up some things I'll need to know

The important ideas ( for this discussion ) are:
- bean-style components ( i.e. setter/getter instead of properties for
example - properties/xml/other config mechansims can be used via adapters)

- independent components as much as possible

- no "framework" interfaces ( like the Toolkit interfaces you define ).
The JasperToolkit is ok, but the "util" components should be independent
if possible ( for example a the javac tool that compiles java to class, it
is a toolkit component - but it should be implemented as a "bean", and
then have a Toolkit adapter - if we need to ).

> codebase.   How should we handle packaging such stuff?
>  I realize that the goal is to put generalized stuff
> into the commons project, how do we leverage that from
> Jasper?  I.E. what exactly is the strategy for sharing
> the commons stuff?  Oh never mind - I'll go sit down
> and do some reading.

I don't think anyone knows :-) And we don't have to solve
this problem right now - first we need to reorganize the
code and identify the componetns and utils, then we can worry
about commons and sharing ( or using ).

> > If you agree with starting with jasper4 ( because
> > it's more complex ), I
> > can start doing an initial split in components. 
> > 
> 
> I agree with using Jasper 4 code as the basis.  What
> I'd like is to first concentrate on making sure the
> base set of services proposed represents a suitable
> set of tools that are

Well, I have a feeling we have a small disagereement on this
one :-)

I would rather have a step-by-step process, with a number of
simple refactorings ( like moving some files in different 
package ). It doesn't have to be right from the first time.

I think the direction is clear and most components - but 
I doubt we can or should try to define the interfaces or
abstraction at this stage. This is a complex system 
( more complex than tomcat itself IMHO ! ), and 
I doubt a "waterfall" will work. ( I'm not a XP fanatic,
but some ideas are good ).

I don't want to start a XP or revolution/evolution or
any other debate like that - it's just that I would prefer
to start with some experiments and get some prototype 
working before we even start discussing interfaces 
and component details. 

For example we can start with separating the runtime,
then separate the generator, then add the 1.1 runtime
and generator, and see how the code looks. ( in this or 
another order ). 

What do you think ? ( we can do that in parallel, in the
end what matters is to have more modularity ).

Costin


Re: Jasper

Posted by Mel Martinez <me...@yahoo.com>.
--- cmanolache@yahoo.com wrote:
> Hi Mel,
> 
> As you know, we are on the same page on the main
> issue ( refactoring
> jasper), but there are few details... ( sorry for
> responding so late) 
> 

Don't be sorry - I'm going to take a day or to fully
respond to this and your other suggestions myself.  I
am posting now to let you know I've got this post,
that I've read it, and that I have no problem with
just about everything you have to say below - if
anything, you are just proposing things I think I was
too shy to propose m'self.  I will try to incorporate
the suggestions you make below over the weekend and
hopefully get a next phase in by monday.  That version
should look a lot more assertive about some of the
statements you make below instead of simply implying
them.

I wish this was going faster but I've been dreadfully
busy lately, what with doing job interviews (and I'll
be traveling a bit this next week for more) and trying
to gracefully wrap up my current job so folk's still
like me long after I'm gone (documentation!!!!). 
Also, I've had a bad NIC on my linux box at home
causing me no end of pain that I still haven't fully
resolved.  Blah.. blah...

Some very brief comments:

> First, I think we need to agree on the goals :-)
> Your proposal is great,
> but I would like to make explicit the following ( at
> least ):
> 
> - clean separation between runtime and compile time.
> This is important to
> resolve many class loader issues, to allow "real"
> self-contained wars (
> i.e. you include the runtime and jspc-compiled
> servlets - and that should
> run on any container without requiring the full
> jasper )
> 

Agreed - this is a very important requirement, imho.

> - separated and pluggable code generator. This is
> very important for me,
> as I want to do some optimizations and try few ideas
> - and that shouldn't
> affect the stability of the main code. ( this is
> somehow included in the
> toolkig idea, but it's good to make it explicit ).
>

That's the whole idea of the toolkit - to make each
service a modular, separable piece.  It would probably
be good to express that particular separation as a
particular goal of the refactoring.

> - "commons"-style components. Even if we'll use
> explicit interfaces for
> toolkit, we need to separate components as
> independent beans ( with
> setter/getter, and no/minimal inter-dependencies ).
> On top of this we can
> use the Toolkit or whatever internal interfaces are
> required by jasper.
> 

I'll need to review the commons project to adopt any
standards that are in play there, but I don't see a
problem.  This brings up some things I'll need to know
- I have code for some utilities that I can add to the
mix that are very powerful that have general usage
beyond just Jasper.  These touch areas from io to
string handling to reflection and somethings I know
don't have equivalents already in the tomcat/jasper
codebase.   How should we handle packaging such stuff?
 I realize that the goal is to put generalized stuff
into the commons project, how do we leverage that from
Jasper?  I.E. what exactly is the strategy for sharing
the commons stuff?  Oh never mind - I'll go sit down
and do some reading.


> - Important. Merge of jasper40 and 33. It would be a
> waste of time to do
> this only for 3.3 or to re-implement jsp1.2 features
> later. We should
> think of this from start ( and it's not difficult -
> if we support separate
> runtime and generators ). That would require ( IMHO
> ) to start with 4.0
> and combine with 3.3. 
> 

I think this is a great idea.  The codebase for Jasper
is not that different between 3.3 and 4.0.  Might as
well do the refactoring just once.

> Long term, I am very interested in experiments with
> code generators ( like
> using XSLT, optimizations for buffers, etc ), so
> support for multiple
> generators ( with intial support for 2 - "classic"
> 1.1 and 1.2 ) is
> important.
> 
> I do agree with the "toolkit" metaphor, in the sense
> of having multiple
> quasi-independent components. I think we should
> postpone adding the
> interfaces and the "Toolkit" classes until after the
> first round of
> refactoring - but that's not that important.
> 
> If you agree with starting with jasper4 ( because
> it's more complex ), I
> can start doing an initial split in components. 
> 

I agree with using Jasper 4 code as the basis.  What
I'd like is to first concentrate on making sure the
base set of services proposed represents a suitable
set of tools that are

1) comprehensive - cover all the bases needed by most
adapter implementations
2) cohesive - each service should be well-focused on
just particular thing
3) decoupled - there should be minimal or no
dependencies between services other than through the
abstractions released by the toolkits (i.e. the
interfaces)

The latter requires good interfaces or base abstract
classes to be built.

> I do have some experience with refactoring (
> tomcat3.0 -> 3.3 :-), and did
> few experiments with refactoring jasper ( but I'm
> still not happy with
> the result ).
> 
> 

I think the refactoring of tomcat 3->3.3 has taken tc3
a long ways.  Jasper is seriously lagging and it is
time for it to catch up.

Later,

Mel 


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Re: Jasper

Posted by cm...@yahoo.com.
Hi Mel,

As you know, we are on the same page on the main issue ( refactoring
jasper), but there are few details... ( sorry for responding so late) 

First, I think we need to agree on the goals :-) Your proposal is great,
but I would like to make explicit the following ( at least ):

- clean separation between runtime and compile time. This is important to
resolve many class loader issues, to allow "real" self-contained wars (
i.e. you include the runtime and jspc-compiled servlets - and that should
run on any container without requiring the full jasper )

- separated and pluggable code generator. This is very important for me,
as I want to do some optimizations and try few ideas - and that shouldn't
affect the stability of the main code. ( this is somehow included in the
toolkig idea, but it's good to make it explicit ).

- "commons"-style components. Even if we'll use explicit interfaces for
toolkit, we need to separate components as independent beans ( with
setter/getter, and no/minimal inter-dependencies ). On top of this we can
use the Toolkit or whatever internal interfaces are required by jasper.

- Important. Merge of jasper40 and 33. It would be a waste of time to do
this only for 3.3 or to re-implement jsp1.2 features later. We should
think of this from start ( and it's not difficult - if we support separate
runtime and generators ). That would require ( IMHO ) to start with 4.0
and combine with 3.3. 

Long term, I am very interested in experiments with code generators ( like
using XSLT, optimizations for buffers, etc ), so support for multiple
generators ( with intial support for 2 - "classic" 1.1 and 1.2 ) is
important.

I do agree with the "toolkit" metaphor, in the sense of having multiple
quasi-independent components. I think we should postpone adding the
interfaces and the "Toolkit" classes until after the first round of
refactoring - but that's not that important.

If you agree with starting with jasper4 ( because it's more complex ), I
can start doing an initial split in components. 

I do have some experience with refactoring ( tomcat3.0 -> 3.3 :-), and did
few experiments with refactoring jasper ( but I'm still not happy with
the result ).


Costin



Re: Jasper

Posted by Mel Martinez <me...@yahoo.com>.
--- cmanolache@yahoo.com wrote:
> Hi,
> 
> While Mel is working on the JspServlet proposal, I
> thought it would be a
> good idea to send my notes on jasper. 
> 
> I looked at both "branches" of jasper, with the idea
> of trying to merge
> them while preserving each "personality".
> 
> As I expected, most of the code is still common,
> with only few variations
> that can be resolved by modularization.
> Unfortunately, the code requires
> some work in order to implement most of the
> optimizations I have in mind
> and before we can merge them.
> 
> Some ideas are available at
> http://nagoya.apache.org/~costin/jasper.txt
> 
> I don't know how much free time I'll have for that
> before 3.3 beta, but
> there are a lot of cool things that can be done in
> jasper ( and not only
> performance enhancements ).  
> 
> 

Costin,

Thanks for the above thoughts (in jasper.txt).  Very
useful input.  I'm going to more fully ingest that and
merge aspects of it, where appropriate into my (really
'our') proposal.  In the mean time, I've decided to
get the current state of jasper34 checked in for you
and others to start to take a look at it.  Everything
is checked in to CVS in two folders:

jakarta-tomcat/proposals/jasper34
jakarta-tomcat/src/jasper34

Please peruse the above after you do an update and
give me your feedback.  Everything is in it's infancy
and subject to change, so be kind....  :-)

Cheers,

Mel

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/