Building large scale web applications in Java

Discussions

Performance and scalability: Building large scale web applications in Java

  1. Building large scale web applications in Java (1 messages)

    We are planning to build a web application that can potentially have millions of concurrent users. We plan to use Java 6, Spring, Spring JDBC or Hibernate, MySQL, EhCache, JQuery. I know obvious things like caching frequently needed data, making sessions compact, tuning SQL, paging results, not allocating many objects to reduce GC time.

    • Are there any frameworks that supports such web applications?
    • How about using a clusters or a load balancer?
    • How should we handle session information? (client side, server side, database)
    • What tool can be used to check performance?
    • Any good book to read about this topic?
    • Any other best practices
    • Things not to do?
    • Should we consider a REST best architecture?

    Many thanks!

     

     

  2. Performance improvement by caching[ Go to top ]

    Caching will definately help in improving performance of such a system. AS you might know Spring has its own data cache feature to cache function results to avoid reaxecution, similarly hibernates also provides 2nd level cache for cross session object and query caching. However you should make sure to use these feature appropriately so that they does not result in performance degradation instead of improvement.

    Hibernate and spring caching features are very limited. You can always use caching directly in your application (instead of spring/hibernate cache) to avail full functionality of caching solution.

    For a caching solution you can also look into TayzGrid (http://www.tayzgrid.com/). TayzGrid is a distribted caching solution with a rich set of features including support for hibernate 2nd level cache, spring caching and web session caching. A distributed cache will help you scale your performance when needed. TayzGrid provides linear scalability by allowing you to add more cache servers on runtime.