Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Choosing Java Spring as a scalable server-side framework for a large website

I'm currently facing a dilema regarding the appropriate server-side framework to use.

Basically, I want to choose the best framework for building a large website to serve millions of page hits. The website itself will be heavily database and ajax reliant, and thus will need to be planned for scalability right from the start.

My wants/needs for a suitable server-side framework are the following:

  • High-Level OO-based language support with some meta programming support.
  • Proper scalability and load balancing on a framework level.
  • MVC architecture.
  • ORM support or atleast Object level mapping support.
  • Proper routing (URL Rewriting) support.

My question finally is that is the Java Spring framework a suitable candidate for a operating a large website based on the wants and needs that were mentioned above? Should I stick to something like Django or Rails?

like image 753
matsko Avatar asked May 26 '11 07:05

matsko


People also ask

Is spring the only Spring Framework that you can just run?

Although definitely not the only framework based on Java it is easy to use to create stand-alone, production-grade Spring-based Applications that you can "just run". It is an opinionated view of the Spring platform and third-party libraries but allows to start with minimum fuss and configuration.

Why use web frameworks for server-side development?

This article has shown that web frameworks can make it easier to develop and maintain server-side code. It has also provided a high level overview of a few popular frameworks, and discussed criteria for choosing a web application framework. You should now have at least an idea of how to choose a web framework for your own server-side development.

What are the main features of the Spring Framework?

It simplifies configuration and is multi-threaded, which is super useful in long or repetitive operations. The main features of Spring are: transaction management - Spring provides a consistent transaction management interface that can scale down to a local transaction and scale up to global transactions,

Should you choose nestjs or spring as the Java framework?

One of those is NestJS - a framework similar to Spring, which can help you achieve comparable results. However, if you were to choose between NestJS or Spring as the Java framework to power your business for the upcoming years, which one would you choose?


2 Answers

Spring is a good framework. However, by itself it is not going to solve your scalability problems (and no other framework would).

To scale heavy load on servers you need to make sure that your servers are stateless or use load balancers with sticky sessions. To reduce load on database you will need caches. No framework will solve it for you.

In other words, think about overall system design rather than specific coding framework.

like image 115
Alex Gitelman Avatar answered Sep 30 '22 08:09

Alex Gitelman


I would prefer the following.

  1. Spring Framework (MVC architecture and DI Principle).
  2. Hibernate Framework.
  3. Caching mechanisam using memcache / Infinispan for reducing load on servers.
  4. Horizontal Load balancing using multiple server/db instances.
like image 34
ikvenu2000 Avatar answered Sep 30 '22 06:09

ikvenu2000