Is Python good enough for big applications?

21,682

Solution 1

Python is a pleasure to work with on big applications. Compared to other enterprise-popular languages you get:

  • No compilation time, if you ever worked on a large C++ project you know how time consuming this can get
  • A concise and clean syntax that makes reading code easier, also a big time saver when reading someone else's code or even yours when it was written long time ago
  • Portability at the core level, if it's important for your app to run on more than one platform it certainly helps
  • It's fast enough for most things, and when it's not, rewriting hot spots in C is trivial with tools such as Cython and numpy. People advocating against dynamic languages for speed reasons have forgotten the 80-20 rule (or never heard about it). The important thing to consider when choosing a language for a performance-critical application IMHO is how easily you can gain access to the C level when needed, and Python is great for that

It's not a magic language however, you need to use the same techniques used for big projects in other languages: TDD (some may argue that it's more important than in other languages because of the lack of type checking, but that's not a win for other languages, unit tests are always important in big projects), clean OO design, etc... or maintaining your application will become a nightmare.

The main reason for its lack of acceptance in enterprise compared to .NET, Java et al. is probably not having herds of consultants and "certified specialists" bragging about their tool being the best thing on Earth. I also heard Java was easily accepted because its syntax resembled C++... that may not be such a silly idea considering C# also chose to take this route.

Solution 2

Google tend to use python for a lot, so I assume its ready for big time. We use python as glue for our products so we're happy with it.

Solution 3

The back end of YouTube is almost entirely in Python. Here is a talk by Cuong Do Cuong, the engineering manager on the YouTube scalability team that goes into a lot of detail of the issues they faced and how they solved them. He points out that lanaguage speed is almost never a bottleneck.

I suspect that YouTube has a significantly higher load that whatever you are working on will.

Solution 4

The answer to your question really boils down to what you have in mind when you say "big application". The simple answer will be "yes". Python serves as the backbone for incredibly complex systems and it does so elegantly (just take a look at how large yet well designed Twisted & Django are). However, it's a tool like any other. It contains performance tradeoffs that may or may not be well suited to your application domain.

If you're looking to build a high-performance flight simulator that must run complex calculations at over 1000Hz... then Python probably isn't the right choice for the whole project. If, on the other hand, single-CPU performance isn't a predominant factor or the application will be spread out over multiple servers to achieve scalability requirements, Python will likely be a good choice.

It's amazing how easily people forget just how expensive development time is. Python is well known for the incredible speed with which production quality applications can be developed. For almost anything non trivial, the development time saved will far outweigh the cost associated with tossing a few extra servers into the pool.

Solution 5

In general, yes you can.

I am mainly focused on the web development so for examples I can give Stack Overflow, Facebook, Amazon etc.

Reddit.com is written in Python. It has a large user base and receives a fair amount of traffic and seems to be doing well. Reddit doesn't use Django though.

Share:
21,682
Ilian Iliev
Author by

Ilian Iliev

Updated on July 09, 2022

Comments

  • Ilian Iliev
    Ilian Iliev almost 2 years

    From the moment I have faced Python, the only thing I can say for it is "It is awesome". I am using Django framework and I am amazed by how quick things happen and how developer friendly this language is. But from many sides I hear that Python is a scripting language, and very useful for small things, experiments etc.

    So the question is can a big and heavy loaded application be built in Python (and django)? As I mainly focus on web development, examples of such applications could be Stack Overflow, Facebook, Amazon etc.


    P.S. According to many of the answers maybe I have to rephrase the question. There are several big applications working with Python (the best example is You Tube) so it can handle them but why then it is not so popular for large projects as (for example) Java, C++ and .NET?