cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: JSP v. XSP (was Re: performance inquiry)
Date Thu, 21 Jun 2001 17:05:25 GMT
Anthony Mills wrote:
> 
> I am not sure I see why XSP is nessisary for a content management system.  I
> actually am desiging a content management system.  I just decieded to use
> JSP for the bean support. This could be a wrong assumtion, but I see XSP as
> basicly just another scripting language.  One could use python, php, or even
> perl.  Why is the inital file being XML nesissary(BTW with Tomcat 4 the JSP
> is in XML format)?  Maybe I should ask the question again in a differnet
> way.  Why should one use XSP instead of another language?  As long as XML is
> output does it really matter?

The biggest difference is not that XSP is an XML based standard--but that the
communication mechanism is SAX based instead of Stream based.  With JSP you
are required to send the results through an InputStream into Cocoon (or your
next layer) and perform modifications.  When the JSP Generator in Cocoon
receives the stream, it promptly converts it to SAX events.  This additional
overhead is avoided with XSP.  XSP stores SAX events in the generated class,
and as the generate() method of the class is executed, it simply fires off
the SAX events.  This is even quicker than the FileGenerator in that respect.

> On a side note, I think Cocoon2 rocks!  While I don't have the luxury of
> having a web development team, being able to seaparate my form from my
> content speeds up development 2 fold.  Thanks, and keep up the good work.
> 
> Thanks,
> 
> Anthony Mills
> 
> ----- Original Message -----
> From: "Frans Thamura" <fth4mura@yahoo.com>
> To: <cocoon-users@xml.apache.org>
> Sent: Thursday, June 21, 2001 1:24 AM
> Subject: Re: JSP v. XSP (was Re: performance inquiry)
> 
> > Are you ever create a contentn management system using XML???
> >
> > You will see how great XSP is it? and how powerfull is a XML system.
> >
> > Frans Thamura
> >
> >
> >
> >
> > -----Original Message-----
> > From: Anthony Mills <pyramid_6@yahoo.com>
> > To: cocoon-users@xml.apache.org <cocoon-users@xml.apache.org>
> > Date: Thursday, June 21, 2001 2:41 AM
> > Subject: JSP v. XSP (was Re: performance inquiry)
> >
> >
> > >I am not interested in time right now, atleast not ms.  Why else would I
> > >want to use XSP?  I used XSPs for awhile, but I prefer JSP for a few
> > reason,
> > >and right now one doesn't work.  I will consider migrating, as most of my
> > >work is done in classes and XSLT.  The first is:
> > ><jsp:useBean id="login" class="com.pyramid6.util.WebLogin"
> scope="session"
> > >/>
> > ><jsp:setProperty name="login" property="*" />
> > >
> > >This makes it real easy and nice to support sessions and read the request
> > >parameters.
> > >
> > >The second one, which doesn't work in beta 1 is:  <jsp:directive.page
> > >errorPage="error.html" />
> > >
> > >This will catch exceptions real easy, and display a nice page for me.
> > >
> > >Now the only benifit I saw with XSP over JSP is with databases.  I am not
> > >planning on using a database, so this point was lost on me.
> > >
> > >JSP is an industry standard right now.  While I am sure XSP is gaining
> > >support, I am tring to stick to established standards.  I am not real
> > >concerned with this, as my files are only about 20 lines long, and I will
> > >have about five of them.
> > >
> > >Thanks,
> > >
> > >Anthony Mills
> > >
> > >----- Original Message -----
> > >From: "Berin Loritsch" <bloritsch@apache.org>
> > >To: <cocoon-users@xml.apache.org>
> > >Sent: Wednesday, June 20, 2001 12:07 PM
> > >Subject: Re: performance inquiry
> > >
> > >
> > >> Anthony Mills wrote:
> > >> >
> > >> > Hello,
> > >> >
> > >> > I am developing a web site using JSP and Cocoon 2.  I am running two
> > >tomcat
> > >> > web servers (3.2 and 4.0beta) on the same box at the same time.  I
> have
> > >a
> > >> > Pentium III 450 with 192mb ram.  I have noticed a few things.  First,
> > it
> > >> > takes a little while to start, about 20 seconds.  A page take about
5
> > >> > seconds to load the first time.  After that, I am more limited by
my
> > >> > connection (128kbps up) than I am by my web pages.  The pages come
> back
> > >> > within seconds.  I have JSPs being run through Cocoon 2; I assume
> that
> > >xsp
> > >> > would have similar speeds.  Keep in mind this is not a scientific
> > >> > measurement, just what I "notice".  Also, both web server are running
> > >about
> > >> > 34mb, with little interaction so far.  One thing to consider when
> > >deploying
> > >> > your app.  You can precompiled your jsp/xsp pages.  This would speed
> > >things
> > >> > up considerably.
> > >>
> > >>
> > >> The first access is from the Sitemap compiling.  It and the XSP pages
> can
> > >be
> > >> precompiled.  Cocoon takes roughly 15-20 seconds to start up mainly
> > >because of
> > >> the number of managed resources it is controlling, and because of the
> > >compiled
> > >> sitemap.  If you make Cocoon load on startup then most of the
> > >initialization
> > >> will have been done before the first request.
> > >>
> > >> 5 seconds is about right for an XSP page.
> > >>
> > >> Keep in mind that XSP is a better match than JSP for Cocoon--there is
> > less
> > >> translation and parsing that has to happen.  By doing that you will
> shave
> > >off
> > >> a few milliseconds per request (10-50ms depending on size of
> > information).
> > >>
> > >> >
> > >> > Hope this helps,
> > >> >
> > >> > Anthony Mills
> > >> >
> > >> > ----- Original Message -----
> > >> > From: "java guru" <javacocoon@yahoo.co.in>
> > >> > To: <cocoon-users@xml.apache.org>
> > >> > Sent: Wednesday, June 20, 2001 8:33 AM
> > >> > Subject: performance inquiry
> > >> >
> > >> > > Hi.,
> > >> > >   I am begining of developing a
> > >> > > standalone/networked/web application. But need to
> > >> > > decide what to use. C2 attracted be 'coz of many cool
> > >> > > features i might use in the future..
> > >> > >
> > >> > > But performance issues scares me.... I need advice..
> > >> > >
> > >> > > The application need to run standalone or networked
> > >> > > like web app...Considering this..
> > >> > >
> > >> > > 1. Is it better to do with servlet and jsp: In this
> > >> > > case i have problem with connection pooling and o/r
> > >> > > mapping to database
> > >> > >
> > >> > > 2. Is it better to use xml stuff with c2: In this i
> > >> > > fear for performance. I fear it might demand high end
> > >> > > configuration user systems compared to no1..
Mime
View raw message