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

前端 未结 6 2100
北荒
北荒 2021-02-10 07:50

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 ser

相关标签:
6条回答
  • 2021-02-10 08:08

    Web Server: -Static Contents to be hosted by Web server: http://nginx.org/en/. -A lot of assets could be hosted in a Content delivery network. -Enabling gzip compression @ web server and application server. -The GUI should be thick client and only fetch data from the server once initialized. -Reduce the # of trips to server. -Compress the contents (HTML,CSS,JS,Embed images in the html itself etc.)

    Application Server: -Ensure you using pooling techniques for all the resources that are involved like DB, message processors etc. -Good coding practices which are optimized for garbage collection. -Using NBIO application servers (JBoss Wildfly,Netty,Tomcat 8 etc.)

    Database: -Clustering the DB. -Denormalizing the database and maintaing soft integrity in the code rather then in the DB. Referential integrity & constraint checks have a huge cost in querying (Join, insert,updates etc.) -You can look @ migrating to ACID NoSQL databases like Orient DB.

    0 讨论(0)
  • 2021-02-10 08:09

    Almost any framework, if used properly, will do. Spring / Spring MVC is a good choice:

    • it supports custom url mappings
    • ORM support
    • Caching support - this will be very important for your scalability
    0 讨论(0)
  • 2021-02-10 08:22

    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.

    0 讨论(0)
  • 2021-02-10 08:27

    Another good choice - and a standards based one at that - would simply be Java EE. EE 6 is a good option, and JBoss AS 7 - which supports EE 6 - has made great headway, is small, efficient and lightning fast. And is free and open source.

    Java EE 6, as a standard, has pretty much all you'd need: CDI as a programming model, web front-end based on JSF, JAX-RS for RESTful web services, JPA2 for object-relational mapping, and if you so need it, JMS messaging, etc etc. Sun/Oracle's Java EE 6 tutorial is probably the place to start if you want to learn about this tech.

    And if you choose to go with JBoss as a runtime environment, you have great tooling as well - a set of Eclipse plugins to make building Java EE apps a snap.

    0 讨论(0)
  • 2021-02-10 08:27

    I would go for Spring.

    • Simple
    • Supports all features you need + lot more
    • Good community support
    0 讨论(0)
  • 2021-02-10 08:29

    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.
    0 讨论(0)
提交回复
热议问题