You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by beam <ri...@gmail.com> on 2007/09/27 16:24:11 UTC

Wicket + Hibernate + Spring + Terracotta + Tomcat + Apache

Hello everybody!
I've used wicket, spring jdbc and tomcat in my last project.
Now, we want to start a web project, some kind of social network. And we'll
go to use wicket as a web framework, hibernate for persistence and spring
for DI. So, this project must be deployed on a cluster. I've decided to use
Open Terracotta for this kind of cluster. But I don't know which app.
server(JBoss) or servlet container(Tomcat?) to use. This is a first
question. Second, as far as I know, tomcat or any app. server like JBoss
isn't a very good solution to deliver static content(e.g. images, video or
even *.css files), so I decide to use Apache Web Server or Nginx as a
Frontend, and terrcotta cluster with Tomcats(or JBoss) for dynamic backend.
But, I don't have enough experience to do this :) So, I need an advise, how
to do this, maybe one of you, java-guru, can help me?

And third, I want to use C-JDBC(Sequoia) to cluster mysql database - is it a
good solution for DB clustering, or better to use mysql 5.1 with native
cluster support?

Thank you very much for any kind of answers, and sorry for my bad english :)
-- 
View this message in context: http://www.nabble.com/Wicket-%2B-Hibernate-%2B-Spring-%2B-Terracotta-%2B-Tomcat-%2B-Apache-tf4528720.html#a12922367
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket + Hibernate + Spring + Terracotta + Tomcat + Apache

Posted by Orion Letizi <or...@terracotta.org>.
I don't know exactly how Jetty compares to Tomcat, performance wise, but I'm
sure the folks at mortbay can shed some light on it, if you ask them.

Vis a vis loadbalancers, here are some places to start looking:

http://www.onjava.com/pub/a/onjava/2001/09/26/load.html
http://www.networkworld.com/reviews/0614rev.html
http://tomcat.apache.org/tomcat-5.0-doc/balancer-howto.html (mod_jk,
mod_proxy, mod_rewrite)

If you are going to use HTTP session clustering, you'll want a loadbalancer
that does sticky sessions (i.e., routes requests with the same session id to
the same server, if possible).

--Orion


beam wrote:
> 
> Thanks a lot, Orion!
> And what do you use in high-scalable application?
> Is Jetty faster than tomcat?
> And in a cluster environment I still need to use some front-end for
> load-balancing, so what do I use instead?
> 
> Orion Letizi wrote:
>> 
>> Oh, also, check out Geronimo (http://geronimo.apache.org/) as a
>> container.
>>   
>> 
>> Orion Letizi wrote:
>>> 
>>> I've always used apache as a front-end to tomcat, but it's been a while
>>> since I ran a high-scale web application.  You might also look into
>>> Jetty (http://jetty.mortbay.org/).  It's lightweight, easily embeddable,
>>> and very fast-- and, quite frankly, a joy to use.
>>> 
>>> BTW, if you have any questions about getting Terracotta set up, don't
>>> hesitate to ask on the Terracotta forums, mailing lists, etc.
>>> 
>>> Cheers,
>>> --Orion
>>> 
>>> 
>>> beam wrote:
>>>> 
>>>> Hello everybody!
>>>> I've used wicket, spring jdbc and tomcat in my last project.
>>>> Now, we want to start a web project, some kind of social network. And
>>>> we'll go to use wicket as a web framework, hibernate for persistence
>>>> and spring for DI. So, this project must be deployed on a cluster. I've
>>>> decided to use Open Terracotta for this kind of cluster. But I don't
>>>> know which app. server(JBoss) or servlet container(Tomcat?) to use.
>>>> This is a first question. Second, as far as I know, tomcat or any app.
>>>> server like JBoss isn't a very good solution to deliver static
>>>> content(e.g. images, video or even *.css files), so I decide to use
>>>> Apache Web Server or Nginx as a Frontend, and terrcotta cluster with
>>>> Tomcats(or JBoss) for dynamic backend. But, I don't have enough
>>>> experience to do this :) So, I need an advise, how to do this, maybe
>>>> one of you, java-guru, can help me?
>>>> 
>>>> And third, I want to use C-JDBC(Sequoia) to cluster mysql database - is
>>>> it a good solution for DB clustering, or better to use mysql 5.1 with
>>>> native cluster support?
>>>> 
>>>> Thank you very much for any kind of answers, and sorry for my bad
>>>> english :)
>>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Wicket-%2B-Hibernate-%2B-Spring-%2B-Terracotta-%2B-Tomcat-%2B-Apache-tf4528720.html#a12947822
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket + Hibernate + Spring + Terracotta + Tomcat + Apache

Posted by beam <ri...@gmail.com>.
Thanks a lot, Orion!
And what do you use in high-scalable application?
Is Jetty faster than tomcat?
And in a cluster environment I still need to use some front-end for
load-balancing, so what do I use instead?

Orion Letizi wrote:
> 
> Oh, also, check out Geronimo (http://geronimo.apache.org/) as a container.
>   
> 
> Orion Letizi wrote:
>> 
>> I've always used apache as a front-end to tomcat, but it's been a while
>> since I ran a high-scale web application.  You might also look into Jetty
>> (http://jetty.mortbay.org/).  It's lightweight, easily embeddable, and
>> very fast-- and, quite frankly, a joy to use.
>> 
>> BTW, if you have any questions about getting Terracotta set up, don't
>> hesitate to ask on the Terracotta forums, mailing lists, etc.
>> 
>> Cheers,
>> --Orion
>> 
>> 
>> beam wrote:
>>> 
>>> Hello everybody!
>>> I've used wicket, spring jdbc and tomcat in my last project.
>>> Now, we want to start a web project, some kind of social network. And
>>> we'll go to use wicket as a web framework, hibernate for persistence and
>>> spring for DI. So, this project must be deployed on a cluster. I've
>>> decided to use Open Terracotta for this kind of cluster. But I don't
>>> know which app. server(JBoss) or servlet container(Tomcat?) to use. This
>>> is a first question. Second, as far as I know, tomcat or any app. server
>>> like JBoss isn't a very good solution to deliver static content(e.g.
>>> images, video or even *.css files), so I decide to use Apache Web Server
>>> or Nginx as a Frontend, and terrcotta cluster with Tomcats(or JBoss) for
>>> dynamic backend. But, I don't have enough experience to do this :) So, I
>>> need an advise, how to do this, maybe one of you, java-guru, can help
>>> me?
>>> 
>>> And third, I want to use C-JDBC(Sequoia) to cluster mysql database - is
>>> it a good solution for DB clustering, or better to use mysql 5.1 with
>>> native cluster support?
>>> 
>>> Thank you very much for any kind of answers, and sorry for my bad
>>> english :)
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Wicket-%2B-Hibernate-%2B-Spring-%2B-Terracotta-%2B-Tomcat-%2B-Apache-tf4528720.html#a12935581
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket + Hibernate + Spring + Terracotta + Tomcat + Apache

Posted by Orion Letizi <or...@terracotta.org>.
Oh, also, check out Geronimo (http://geronimo.apache.org/) as a container.
  

Orion Letizi wrote:
> 
> I've always used apache as a front-end to tomcat, but it's been a while
> since I ran a high-scale web application.  You might also look into Jetty
> (http://jetty.mortbay.org/).  It's lightweight, easily embeddable, and
> very fast-- and, quite frankly, a joy to use.
> 
> BTW, if you have any questions about getting Terracotta set up, don't
> hesitate to ask on the Terracotta forums, mailing lists, etc.
> 
> Cheers,
> --Orion
> 
> 
> beam wrote:
>> 
>> Hello everybody!
>> I've used wicket, spring jdbc and tomcat in my last project.
>> Now, we want to start a web project, some kind of social network. And
>> we'll go to use wicket as a web framework, hibernate for persistence and
>> spring for DI. So, this project must be deployed on a cluster. I've
>> decided to use Open Terracotta for this kind of cluster. But I don't know
>> which app. server(JBoss) or servlet container(Tomcat?) to use. This is a
>> first question. Second, as far as I know, tomcat or any app. server like
>> JBoss isn't a very good solution to deliver static content(e.g. images,
>> video or even *.css files), so I decide to use Apache Web Server or Nginx
>> as a Frontend, and terrcotta cluster with Tomcats(or JBoss) for dynamic
>> backend. But, I don't have enough experience to do this :) So, I need an
>> advise, how to do this, maybe one of you, java-guru, can help me?
>> 
>> And third, I want to use C-JDBC(Sequoia) to cluster mysql database - is
>> it a good solution for DB clustering, or better to use mysql 5.1 with
>> native cluster support?
>> 
>> Thank you very much for any kind of answers, and sorry for my bad english
>> :)
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Wicket-%2B-Hibernate-%2B-Spring-%2B-Terracotta-%2B-Tomcat-%2B-Apache-tf4528720.html#a12924037
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket + Hibernate + Spring + Terracotta + Tomcat + Apache

Posted by Orion Letizi <or...@terracotta.org>.
I've always used apache as a front-end to tomcat, but it's been a while since
I ran a high-scale web application.  You might also look into Jetty
(http://jetty.mortbay.org/).  It's lightweight, easily embeddable, and very
fast-- and, quite frankly, a joy to use.

BTW, if you have any questions about getting Terracotta set up, don't
hesitate to ask on the Terracotta forums, mailing lists, etc.

Cheers,
--Orion


beam wrote:
> 
> Hello everybody!
> I've used wicket, spring jdbc and tomcat in my last project.
> Now, we want to start a web project, some kind of social network. And
> we'll go to use wicket as a web framework, hibernate for persistence and
> spring for DI. So, this project must be deployed on a cluster. I've
> decided to use Open Terracotta for this kind of cluster. But I don't know
> which app. server(JBoss) or servlet container(Tomcat?) to use. This is a
> first question. Second, as far as I know, tomcat or any app. server like
> JBoss isn't a very good solution to deliver static content(e.g. images,
> video or even *.css files), so I decide to use Apache Web Server or Nginx
> as a Frontend, and terrcotta cluster with Tomcats(or JBoss) for dynamic
> backend. But, I don't have enough experience to do this :) So, I need an
> advise, how to do this, maybe one of you, java-guru, can help me?
> 
> And third, I want to use C-JDBC(Sequoia) to cluster mysql database - is it
> a good solution for DB clustering, or better to use mysql 5.1 with native
> cluster support?
> 
> Thank you very much for any kind of answers, and sorry for my bad english
> :)
> 

-- 
View this message in context: http://www.nabble.com/Wicket-%2B-Hibernate-%2B-Spring-%2B-Terracotta-%2B-Tomcat-%2B-Apache-tf4528720.html#a12923986
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Wicket + Hibernate + Spring + Terracotta + Tomcat + Apache

Posted by beam <ri...@gmail.com>.
Thanks a lot, Mark
I'll take a look at the Apache Portable Runtime

For the servlet container you can use either Tomcat or JBoss with the Apache
Portable Runtime. Performance will be similar to using Apache as a frontend,
but is simpler to setup.
http://labs.jboss.com/jbossweb/index.html

As for whether to go with Tomcat or JBoss, perhaps that will depend on
whether it is likely you will want other J2EE features, eg JMS. I've tended
to settle on JBoss because those extra libraries are there if I need them.

Mark
</qoute>

-- 
View this message in context: http://www.nabble.com/Wicket-%2B-Hibernate-%2B-Spring-%2B-Terracotta-%2B-Tomcat-%2B-Apache-tf4528720.html#a12935488
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Wicket + Hibernate + Spring + Terracotta + Tomcat + Apache

Posted by Mark van Leeuwen <ma...@internode.on.net>.
For the servlet container you can use either Tomcat or JBoss with the Apache
Portable Runtime. Performance will be similar to using Apache as a frontend,
but is simpler to setup.
http://labs.jboss.com/jbossweb/index.html

As for whether to go with Tomcat or JBoss, perhaps that will depend on
whether it is likely you will want other J2EE features, eg JMS. I've tended
to settle on JBoss because those extra libraries are there if I need them.

Mark

-----Original Message-----
From: beam [mailto:rik.shader@gmail.com] 
Sent: Friday, 28 September 2007 12:24 AM
To: users@wicket.apache.org
Subject: Wicket + Hibernate + Spring + Terracotta + Tomcat + Apache


Hello everybody!
I've used wicket, spring jdbc and tomcat in my last project.
Now, we want to start a web project, some kind of social network. And we'll
go to use wicket as a web framework, hibernate for persistence and spring
for DI. So, this project must be deployed on a cluster. I've decided to use
Open Terracotta for this kind of cluster. But I don't know which app.
server(JBoss) or servlet container(Tomcat?) to use. This is a first
question. Second, as far as I know, tomcat or any app. server like JBoss
isn't a very good solution to deliver static content(e.g. images, video or
even *.css files), so I decide to use Apache Web Server or Nginx as a
Frontend, and terrcotta cluster with Tomcats(or JBoss) for dynamic backend.
But, I don't have enough experience to do this :) So, I need an advise, how
to do this, maybe one of you, java-guru, can help me?

And third, I want to use C-JDBC(Sequoia) to cluster mysql database - is it a
good solution for DB clustering, or better to use mysql 5.1 with native
cluster support?

Thank you very much for any kind of answers, and sorry for my bad english :)
-- 
View this message in context:
http://www.nabble.com/Wicket-%2B-Hibernate-%2B-Spring-%2B-Terracotta-%2B-Tom
cat-%2B-Apache-tf4528720.html#a12922367
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket + Hibernate + Spring + Terracotta + Tomcat + Apache

Posted by Sam Hough <sa...@redspr.com>.
Do you _need_ several tomcat instances? Modern machines are _very_ powerful.
My advice would be really understand your software architecture so you can
keep it simple and well tuned. I don't mean hand optimising just taking
advantage of various levels of cache in an elegant way. 

The level of complexity goes through the roof when you start trying to
distribute your workload across multiple boxes and at the same time
effeciency hits the floor. If you don't have a budget then a protocol aware
router would be a better way to go but you get into horrible issues of
session affinity and failover etc and I've found even expensive solutions
(like arrow point  - couldn't cope with HTTP/1.1) to be buggy.

Having a well filled hibernate cache, putting version number and never
expires for static content, avoiding trips to db etc etc will buy you a lot
of headroom.

If you want uptime more than throughput spend more on good hosting and
hardware. If you do a complex deployment on a budget blown PSUs and brain
dead ISPs turning off routers will hurt your downtime more.

Think about your boss ringing you on a friday night when it is your partners
birthday saying that the website is "slow". How much stuff do you want to
have to debug?  Which set of servers was he using was the problem in apache
or jk or tomcat or your code or wicket or spring or hibernate or terracotta
or postgres or linux or network or JVM...? 


beam wrote:
> 
> Thank you very much!
> But if I use several tomcat's instances then I still need some load
> balancing server, like apache with mod_jk, so why don't use it for content
> delivery too ? Or do I need to investigate another load balancing
> mechanism?
> 
> 
> Sam Hough wrote:
>> 
>> [serving static content]
>> The argument I heard was that Java apps were not able to cope as well
>> with badly behaved clients (dropped connections etc). Apache httpd
>> probably is more efficient than Tomcat etc at serving static content.
>> However modern cheap hardware can almost always shove out more than most
>> connections can cope with. If you want to manipulate, control access etc
>> to your static content and your app is in Java I would be tempted to stay
>> with pure Java. You also have less to worry about which bit of your
>> platform is causing trouble. Tomcat also has a native plugin that you
>> might want to investigate... I would guess that careful tuning of what
>> you serve (compression, cache management) will buy you a lot.
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Wicket-%2B-Hibernate-%2B-Spring-%2B-Terracotta-%2B-Tomcat-%2B-Apache-tf4528720.html#a12936536
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket + Hibernate + Spring + Terracotta + Tomcat + Apache

Posted by beam <ri...@gmail.com>.
Thank you very much!
But if I use several tomcat's instances then I still need some load
balancing server, like apache with mod_jk, so why don't use it for content
delivery too ? Or do I need to investigate another load balancing mechanism?


Sam Hough wrote:
> 
> [serving static content]
> The argument I heard was that Java apps were not able to cope as well with
> badly behaved clients (dropped connections etc). Apache httpd probably is
> more efficient than Tomcat etc at serving static content. However modern
> cheap hardware can almost always shove out more than most connections can
> cope with. If you want to manipulate, control access etc to your static
> content and your app is in Java I would be tempted to stay with pure Java.
> You also have less to worry about which bit of your platform is causing
> trouble. Tomcat also has a native plugin that you might want to
> investigate... I would guess that careful tuning of what you serve
> (compression, cache management) will buy you a lot.
> 
> 

-- 
View this message in context: http://www.nabble.com/Wicket-%2B-Hibernate-%2B-Spring-%2B-Terracotta-%2B-Tomcat-%2B-Apache-tf4528720.html#a12935457
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket + Hibernate + Spring + Terracotta + Tomcat + Apache

Posted by Sam Hough <sa...@redspr.com>.
Guess servlet filter is the obvious way. I've certainly done that in the
past.

At worse case the default servlet is open source...


Andrew Klochkov wrote:
> 
> Sam Hough wrote:
>> trouble. Tomcat also has a native plugin that you might want to
>> investigate... I would guess that careful tuning of what you serve
>> (compression, cache management) will buy you a lot.
>>   
> btw dont you know how to tune cache headers tomcat generates for static 
> resources? I thought it's impossible..
> 
> -- 
> Andrew Klochkov
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Wicket-%2B-Hibernate-%2B-Spring-%2B-Terracotta-%2B-Tomcat-%2B-Apache-tf4528720.html#a12923360
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket + Hibernate + Spring + Terracotta + Tomcat + Apache

Posted by Andrew Klochkov <a....@webalta-team.com>.
Sam Hough wrote:
> trouble. Tomcat also has a native plugin that you might want to
> investigate... I would guess that careful tuning of what you serve
> (compression, cache management) will buy you a lot.
>   
btw dont you know how to tune cache headers tomcat generates for static 
resources? I thought it's impossible..

-- 
Andrew Klochkov


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket + Hibernate + Spring + Terracotta + Tomcat + Apache

Posted by Sam Hough <sa...@redspr.com>.
[serving static content]
The argument I heard was that Java apps were not able to cope as well with
badly behaved clients (dropped connections etc). Apache httpd probably is
more efficient than Tomcat etc at serving static content. However modern
cheap hardware can almost always shove out more than most connections can
cope with. If you want to manipulate, control access etc to your static
content and your app is in Java I would be tempted to stay with pure Java.
You also have less to worry about which bit of your platform is causing
trouble. Tomcat also has a native plugin that you might want to
investigate... I would guess that careful tuning of what you serve
(compression, cache management) will buy you a lot.



beam wrote:
> 
> Hello everybody!
> I've used wicket, spring jdbc and tomcat in my last project.
> Now, we want to start a web project, some kind of social network. And
> we'll go to use wicket as a web framework, hibernate for persistence and
> spring for DI. So, this project must be deployed on a cluster. I've
> decided to use Open Terracotta for this kind of cluster. But I don't know
> which app. server(JBoss) or servlet container(Tomcat?) to use. This is a
> first question. Second, as far as I know, tomcat or any app. server like
> JBoss isn't a very good solution to deliver static content(e.g. images,
> video or even *.css files), so I decide to use Apache Web Server or Nginx
> as a Frontend, and terrcotta cluster with Tomcats(or JBoss) for dynamic
> backend. But, I don't have enough experience to do this :) So, I need an
> advise, how to do this, maybe one of you, java-guru, can help me?
> 
> And third, I want to use C-JDBC(Sequoia) to cluster mysql database - is it
> a good solution for DB clustering, or better to use mysql 5.1 with native
> cluster support?
> 
> Thank you very much for any kind of answers, and sorry for my bad english
> :)
> 

-- 
View this message in context: http://www.nabble.com/Wicket-%2B-Hibernate-%2B-Spring-%2B-Terracotta-%2B-Tomcat-%2B-Apache-tf4528720.html#a12922975
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org