Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Choosing between Django-Apache and Java-Tomcat for a web application [closed]

In order to develop a web application that can easily scale, provide production stability, is easily deploy-able, and allows for fast development cycles, what points would you recommend I look at before choosing one or the other framework - using Java and Tomcat, or Django and Apache/Mod_WSGI?

Some pros and cons I could see immediately,

  • Tomcat apps are simple to deploy - drop a WAR file and you're done. Django apps seem to need more wrangling (Not sure if creating .egg files and dropping them in would work as well?)
  • Django's ORM seems much nicer than Hibernate - generates models directly compared to Hibernate's manual configuration files
  • Python as a language is faster to develop in, and much more concise than Java can be. (Of course, this is a relatively higher level discussion).

I've looked at Disqus's slides about scaling Django and am under no doubts it can be done. But would scaling a Django app be any harder than scaling a Java/Tomcat one?

I'm familiar with both Java and Python and the frameworks mentioned above, and it boils down to getting feedback those who've worked with either (or both) on scale.

Thanks!

like image 620
viksit Avatar asked Mar 16 '11 02:03

viksit


People also ask

What is difference between Apache web server and Tomcat?

Key difference between Tomcat and the Apache HTTP Server the Apache HTTP Server, but the fundamental difference is that Tomcat provides dynamic content by employing Java-based logic, while the Apache web server's primary purpose is to simply serve up static content such as HTML, images, audio and text.

Is Tomcat still relevant?

Nowadays, Apache Tomcat is widely used by many companies as it implements many of the Java EE specifications, such as: Java Servlet.

Do I need a webserver for Django?

Django, being a web framework, needs a web server in order to operate. And since most web servers don't natively speak Python, we need an interface to make that communication happen. Django currently supports two interfaces: WSGI and ASGI.

Can Django be used for web apps?

Django makes it easier to build better web apps more quickly and with less code.


1 Answers

Here are my experiences:

  • Django-Apache fits in 16MBs of memory, whereas Java-Tomcat requires much more than that.
  • Coding in Python is much faster, that is true. In Java, on the other hand, you have compile-time checks, profilers and debuggers that help you increase the stability of your application.
  • If you are planning to do heavy computations or need complex data structures, Java's compilation technologies will provide the speed you need.
  • It is easier to maintain a large project in a strictly object-oriented environment with advanced refactoring tools, such as Java.
  • Then again, coding in Python is much faster.
like image 65
Eser Aygün Avatar answered Sep 26 '22 14:09

Eser Aygün