tags:

views:

481

answers:

5

Is it worth to use Google Web Toolkit for heavy traffic website (something like Youtube, Hulu). If not then what Java framework should be used?

+3  A: 

As a part of evaluation of presentation layer frameworks, we performed load tests for the Google Web Toolkit. We used sample application DynaTable, shipped with the GWT. We deployed DynaTable application to Tomcat Server. We recorded test scripts using Grinder TCPProxy. The test methodology is described in this post.

http://jroller.com/galina/entry/google_web_toolkit_performance_test

Robert Harvey
+6  A: 

What are you planning on doing with GWT? If you will be serving up huge video files, I don't think GWT will be much of a blip on your radar. Since GWT executes on the client side, it won't be putting any processor load on your servers, and the actual javascript files that are generated are compiled down to the bare minimum of code needed, and would be tiny compared to even one video download.

GWT is used for google's adsense management console, and for google wave. Is your site going to get more traffic than either of those? ;) With GWT 2.0 we should see even more performance gains as the optimization techniques get even better.

This IO session talks a bit about squeezing extra performance out of GWT.

Peter Recore
+1  A: 

Performance-wise, GWT is pretty fine -- and if you absolutely need to squeeze a few milliseconds more, the Java side of things has little to do with it: rather, you need to serve well-coded Javascript (maybe using a strong framework such as dojo or jquery).

All of this is mostly about doing (some or all of the) work client-side, which intrinsically scales up better than any purely server-side approach -- because by definition you get proportionally more computing power (in your users' browsers!-) as your load increases!

Alex Martelli
+1  A: 

Your biggest problem with that many clients is coding the back end properly, not the front end. All the top sites (facebook, youtube, myspace) use PHP as their back end so I think there's something to be said for using that over Java, with something like memcache in the background. It's more lightweight memory wise, and much more scalable without throwing mega amounts of hardware at it.

All that said GWT is fine for the front end, because you have to remember even if you have 1 million clients, all the code is running client side, so all you have to worry about are any RPC packets being sent to your server.

rustyshelf
+2  A: 

There are plenty of high-end sites using Java as the back-end. I've used PHP, it's been a while, but it's not something I'd want to use to build a web site from a testability, maintainability and security standpoint. That's just my preference.

Essentially, GWT provides client-side and server-side components. The client side won't be your primary concern when it comes to scalability. So the client-side decision is just a question of will GWT's client-side components provide the functionality and widgetry you need, either alone or in conjunction with or javascript toolkits. Have a look at the GWT application gallery to see some of the things that people are doing with it.

GWT's server-side components wrap conventional servlets to serve up the Ajax asynchronously, and will run in most any Java servlet engine. I have a small GWT-based web site on a VPS, and the GWT server side runs under Tomcat.

Since it's Ajax, you should get better scalability with a well-designed website than over a conventional servlet-based solution, since the server isn't composing and delivering entire pages continuously, but only much smaller responses.

Furthermore, you can build your GWT app and serve it from the Google App Engine, which would allow you to easily support whatever size community you want. From the page:

"App Engine developers can now purchase additional computing resources beyond the free quota limits. Scale your application to millions of users and pay only for what you use. App Engine will always be free to get started so you can try it out with no risk."

Don Branson
Awesome explanation! Thanks Don.
Maksim
You're welcome. Hope it helps.
Don Branson