Re: Which is the winner----Singleton Class or Base Servlet????

2003-11-06 Thread Rodrigo Ruiz
I totally agree with Justin. One object instantiation does not take more 
than a few milliseconds. This is not a performance issue. Object 
instantiation becomes an issue only when a great number of objects are 
constantly being created. This is the case of, for example, JDBC 
connections or sockets in your server (that is why pooling is the best 
strategy for them), but not of a singleton.

As for your performance tunning, it seems to me that you have taken good 
decissions: using oracle connection pooling, and using a native server 
for your video clips.

Maybe you could switch from IIS to Apache. Independently of religious 
ideas, Apache has a very good performance, many experts recommend it 
over IIS due to important security bugs in IIS, and it can run on other 
platforms, so you could install the server on a Linux box. I do not want 
to begin an OS war discussion, just pointing that you could reduce 
costs, as Linux is free ;-)

Regards,
Rodrigo Ruiz
Justin Ruthenbeck wrote:

At 05:07 PM 11/5/2003, you wrote:

>In addition to what others have said, why don't you ask >your highly
>knowledgeable friend for proof of what he's claiming?
Anyway his answer to this question is,-- using base servlet does not
create a separate object instance as it is done when using a singleton
class.That way u use one object less from JVM point of view.However this
answer did not solve my quest.


Really?  That's the reason?  Ignore it.

Choosing to implement something in a base class or in a singleton is a 
decision based on your app's architecture -- choose whichever is more 
clear and/or more maintainable for you.  There may be performance 
issues involved, but that would have to be discussed with specific 
examples ... in any case, this is not one of them.

justin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Which is the winner----Singleton Class or Base Servlet????

2003-11-05 Thread Justin Ruthenbeck
At 05:07 PM 11/5/2003, you wrote:
>In addition to what others have said, why don't you ask >your highly
>knowledgeable friend for proof of what he's claiming?
Anyway his answer to this question is,-- using base servlet does not
create a separate object instance as it is done when using a singleton
class.That way u use one object less from JVM point of view.However this
answer did not solve my quest.
Really?  That's the reason?  Ignore it.

Choosing to implement something in a base class or in a singleton is a 
decision based on your app's architecture -- choose whichever is more 
clear and/or more maintainable for you.  There may be performance issues 
involved, but that would have to be discussed with specific examples ... 
in any case, this is not one of them.

justin 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Which is the winner----Singleton Class or Base Servlet????

2003-11-05 Thread kgsat
Hi Rodrigo Ruiz
currently i am not resorting to servlet way of downloading the video
files.Instead i am using http download , that is, the user is forced to
right click and select the -'save target as 'option to save the file into
his harddisk.
And i am storing the files in the separate machine(file server like) which
runs IIS and serves the files to the end user once when he clicks on the
download link of a particular video clip.
Otherwise all other pages are served by apache-tomcat on linux.
regards
sat

- Original Message - 
From: "Rodrigo Ruiz" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 05, 2003 8:20 PM
Subject: Re: Which is the winnerSingleton Class or Base Servlet


> JNDI adds a little performance penalty (extra overhead), and provides
> you more independency from the database layer. If that independency is
> not much important for you, your current configuration will probably
> suit better ;-)
>
> Apart from this, if your app serves video content, a careful tunning of
> your servlet output buffer size, and number of concurrent client
> connections will probably be the best point to optimize. Just curiosity,
> where do you store the video clips? file system, oracle or somewhere else?
>
> kgsat wrote:
>
> >Hi Rodrigo Ruiz
> >Thanks for your response.I have been using oracle conneciton pooling
> >features in my singleton db class for the faster connectivity with the
> >database from my application.
> >Should i go for a JNDIDatasource model for the better db access or the
> >current one will serve the needs.My application is a video download
> >application   meant for the members of the site.
> >U have any thing to suggest with respect to database access ?
> >regards
> >sat
> >- Original Message - 
> >From: "Rodrigo Ruiz" <[EMAIL PROTECTED]>
> >To: "Tomcat Users List" <[EMAIL PROTECTED]>
> >Sent: Wednesday, November 05, 2003 6:23 PM
> >Subject: Re: Which is the winnerSingleton Class or Base Servlet
> >
> >
> >
> >
> >>Both techniques have their advantaes and disadvantages. A singleton
> >>class usually has problems when reloading the context. Using a Servlet
> >>Base for JSPs makes you container version dependent (As the minimum
> >>implementation required can change among jasper versions).
> >>
> >>Anyway, the performance improvements you can achieve selecting between
> >>these two options are probably minimal. Depending on your webapp DB
> >>load, you could obtain a greater performance boost using a connection
> >>pool. Look at the "JNDI DataSource HOW-TO" for more info about this :-)
> >>
> >>Hope this help,
> >>Rodrigo Ruiz
> >>
> >>kgsat wrote:
> >>
> >>
> >>
> >>>Dear experts,
> >>>
> >>>It may not be appropriate to ask this doubt here.Though i am aware of
it
> >>>
> >>>
> >, i
> >
> >
> >>>chose to ask here thinking that experts would forgive me.
> >>>
> >>>Now the doubt is...
> >>>
> >>>In a web application, what is the performance difference of using
> >>>
> >>>
> >singleton
> >
> >
> >>>class and a base servlet to do the database related operations such as
> >>>loading the driver, obtaining the dbURL and obtaining the connection
> >>>instance for further db operations.
> >>>I use a singleton class for my db requirements in jsps and servlets and
> >>>
> >>>
> >also
> >
> >
> >>>in other beans.
> >>>One of my friends suggests that using base servlet to do the same work
is
> >>>more efficient.
> >>>Can any one throw some more light on this topic.i want to improve the
> >>>performance of my web application.
> >>>Any white papers or pointing URLs are given astounding welcome.
> >>>thanks and regards
> >>>sat
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Which is the winner----Singleton Class or Base Servlet????

2003-11-05 Thread kgsat
hi Shapira,
>In addition to what others have said, why don't you ask >your highly
>knowledgeable friend for proof of what he's claiming?

Yes! i could do that.Once he says so,then i should find out whether his
statements bear any truth? Instead, asking him would not reveal the facts at
all.

Anyway his answer to this question is,-- using base servlet does not
create a separate object instance as it is done when using a singleton
class.That way u use one object less from JVM point of view.However this
answer did not solve my quest.
regards
sat
- Original Message - 
From: "Shapira, Yoav" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 05, 2003 11:12 PM
Subject: RE: Which is the winnerSingleton Class or Base Servlet



Howdy,
In addition to what others have said, why don't you ask your highly
knowledgeable friend for proof of what he's claiming?

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: kgsat [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, November 05, 2003 1:36 AM
>To: Tomcat Users List; tomcat-user-sc.1064369106.oligoebllpoplhbjhnhi-
>[EMAIL PROTECTED]
>Subject: Which is the winnerSingleton Class or Base Servlet
>
>Dear experts,
>
>It may not be appropriate to ask this doubt here.Though i am aware of
it ,
>i
>chose to ask here thinking that experts would forgive me.
>
>Now the doubt is...
>
>In a web application, what is the performance difference of using
singleton
>class and a base servlet to do the database related operations such as
>loading the driver, obtaining the dbURL and obtaining the connection
>instance for further db operations.
>I use a singleton class for my db requirements in jsps and servlets and
>also
>in other beans.
>One of my friends suggests that using base servlet to do the same work
is
>more efficient.
>Can any one throw some more light on this topic.i want to improve the
>performance of my web application.
>Any white papers or pointing URLs are given astounding welcome.
>thanks and regards
>sat



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Which is the winner----Singleton Class or Base Servlet????

2003-11-05 Thread Shapira, Yoav

Howdy,
In addition to what others have said, why don't you ask your highly
knowledgeable friend for proof of what he's claiming?

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: kgsat [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, November 05, 2003 1:36 AM
>To: Tomcat Users List; tomcat-user-sc.1064369106.oligoebllpoplhbjhnhi-
>[EMAIL PROTECTED]
>Subject: Which is the winnerSingleton Class or Base Servlet
>
>Dear experts,
>
>It may not be appropriate to ask this doubt here.Though i am aware of
it ,
>i
>chose to ask here thinking that experts would forgive me.
>
>Now the doubt is...
>
>In a web application, what is the performance difference of using
singleton
>class and a base servlet to do the database related operations such as
>loading the driver, obtaining the dbURL and obtaining the connection
>instance for further db operations.
>I use a singleton class for my db requirements in jsps and servlets and
>also
>in other beans.
>One of my friends suggests that using base servlet to do the same work
is
>more efficient.
>Can any one throw some more light on this topic.i want to improve the
>performance of my web application.
>Any white papers or pointing URLs are given astounding welcome.
>thanks and regards
>sat



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Which is the winner----Singleton Class or Base Servlet????

2003-11-05 Thread Christopher Schultz
kgsat,
I use a singleton class for my db requirements in jsps and servlets and also
in other beans.
One of my friends suggests that using base servlet to do the same work is
more efficient.
Don't do either of these; use a database connection pool.

-chris

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Which is the winner----Singleton Class or Base Servlet????

2003-11-05 Thread Rodrigo Ruiz
JNDI adds a little performance penalty (extra overhead), and provides 
you more independency from the database layer. If that independency is 
not much important for you, your current configuration will probably 
suit better ;-)

Apart from this, if your app serves video content, a careful tunning of 
your servlet output buffer size, and number of concurrent client 
connections will probably be the best point to optimize. Just curiosity, 
where do you store the video clips? file system, oracle or somewhere else?

kgsat wrote:

Hi Rodrigo Ruiz
Thanks for your response.I have been using oracle conneciton pooling
features in my singleton db class for the faster connectivity with the
database from my application.
Should i go for a JNDIDatasource model for the better db access or the
current one will serve the needs.My application is a video download
application   meant for the members of the site.
U have any thing to suggest with respect to database access ?
regards
sat
- Original Message - 
From: "Rodrigo Ruiz" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 05, 2003 6:23 PM
Subject: Re: Which is the winner----Singleton Class or Base Servlet

 

Both techniques have their advantaes and disadvantages. A singleton
class usually has problems when reloading the context. Using a Servlet
Base for JSPs makes you container version dependent (As the minimum
implementation required can change among jasper versions).
Anyway, the performance improvements you can achieve selecting between
these two options are probably minimal. Depending on your webapp DB
load, you could obtain a greater performance boost using a connection
pool. Look at the "JNDI DataSource HOW-TO" for more info about this :-)
Hope this help,
Rodrigo Ruiz
kgsat wrote:

   

Dear experts,

It may not be appropriate to ask this doubt here.Though i am aware of it
 

, i
 

chose to ask here thinking that experts would forgive me.

Now the doubt is...

In a web application, what is the performance difference of using
 

singleton
 

class and a base servlet to do the database related operations such as
loading the driver, obtaining the dbURL and obtaining the connection
instance for further db operations.
I use a singleton class for my db requirements in jsps and servlets and
 

also
 

in other beans.
One of my friends suggests that using base servlet to do the same work is
more efficient.
Can any one throw some more light on this topic.i want to improve the
performance of my web application.
Any white papers or pointing URLs are given astounding welcome.
thanks and regards
sat


 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Which is the winner----Singleton Class or Base Servlet????

2003-11-05 Thread kgsat

Hi Rodrigo Ruiz
Thanks for your response.I have been using oracle conneciton pooling
features in my singleton db class for the faster connectivity with the
database from my application.
Should i go for a JNDIDatasource model for the better db access or the
current one will serve the needs.My application is a video download
application   meant for the members of the site.
U have any thing to suggest with respect to database access ?
regards
sat
- Original Message - 
From: "Rodrigo Ruiz" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 05, 2003 6:23 PM
Subject: Re: Which is the winner----Singleton Class or Base Servlet


> Both techniques have their advantaes and disadvantages. A singleton
> class usually has problems when reloading the context. Using a Servlet
> Base for JSPs makes you container version dependent (As the minimum
> implementation required can change among jasper versions).
>
> Anyway, the performance improvements you can achieve selecting between
> these two options are probably minimal. Depending on your webapp DB
> load, you could obtain a greater performance boost using a connection
> pool. Look at the "JNDI DataSource HOW-TO" for more info about this :-)
>
> Hope this help,
> Rodrigo Ruiz
>
> kgsat wrote:
>
> >Dear experts,
> >
> >It may not be appropriate to ask this doubt here.Though i am aware of it
, i
> >chose to ask here thinking that experts would forgive me.
> >
> >Now the doubt is...
> >
> >In a web application, what is the performance difference of using
singleton
> >class and a base servlet to do the database related operations such as
> >loading the driver, obtaining the dbURL and obtaining the connection
> >instance for further db operations.
> >I use a singleton class for my db requirements in jsps and servlets and
also
> >in other beans.
> >One of my friends suggests that using base servlet to do the same work is
> >more efficient.
> >Can any one throw some more light on this topic.i want to improve the
> >performance of my web application.
> >Any white papers or pointing URLs are given astounding welcome.
> >thanks and regards
> >sat
> >
> >
> >
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Which is the winner----Singleton Class or Base Servlet????

2003-11-05 Thread Rodrigo Ruiz
Both techniques have their advantaes and disadvantages. A singleton
class usually has problems when reloading the context. Using a Servlet
Base for JSPs makes you container version dependent (As the minimum
implementation required can change among jasper versions).

Anyway, the performance improvements you can achieve selecting between
these two options are probably minimal. Depending on your webapp DB
load, you could obtain a greater performance boost using a connection
pool. Look at the "JNDI DataSource HOW-TO" for more info about this :-)

Hope this help,
Rodrigo Ruiz

kgsat wrote:

>Dear experts,
>
>It may not be appropriate to ask this doubt here.Though i am aware of it , i
>chose to ask here thinking that experts would forgive me.
>
>Now the doubt is...
>
>In a web application, what is the performance difference of using singleton
>class and a base servlet to do the database related operations such as
>loading the driver, obtaining the dbURL and obtaining the connection
>instance for further db operations.
>I use a singleton class for my db requirements in jsps and servlets and also
>in other beans.
>One of my friends suggests that using base servlet to do the same work is
>more efficient.
>Can any one throw some more light on this topic.i want to improve the
>performance of my web application.
>Any white papers or pointing URLs are given astounding welcome.
>thanks and regards
>sat
>
>  
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Which is the winner----Singleton Class or Base Servlet????

2003-11-04 Thread kgsat
Dear experts,

It may not be appropriate to ask this doubt here.Though i am aware of it , i
chose to ask here thinking that experts would forgive me.

Now the doubt is...

In a web application, what is the performance difference of using singleton
class and a base servlet to do the database related operations such as
loading the driver, obtaining the dbURL and obtaining the connection
instance for further db operations.
I use a singleton class for my db requirements in jsps and servlets and also
in other beans.
One of my friends suggests that using base servlet to do the same work is
more efficient.
Can any one throw some more light on this topic.i want to improve the
performance of my web application.
Any white papers or pointing URLs are given astounding welcome.
thanks and regards
sat