I'm looking for additional information that could help me decide whether I should port a large web application to Python/Django. The application handles transactions, which often come in bursts. Peaks may go up to tens of thousands of transactions per second. There are 3 views on the system: users (front-end), customers (back-end) and admins. The current version of the application is built upon LAMP (linux, apache, mysql, php) and the Smarty templating framework with a separate database-server and file-server.
The reason for considering a complete rewrite is that the current implementation has grown from a small, one-person project to a very large web application and has reached its end of life. The minimal amount of architecture, documentation and testing that went into it makes that it has reached its limit with regards to scalability and maintainability. The reason for considering alternatives to PHP is that its characteristics (limited support for namespaces, no object orientation (v4), polluted default namespace,...) has lead to a hard to maintain codebase. My personal experience with Python/Django gives me good hope that they are up to the task, but I would like to hear from others what their experiences are. Here are the topics that I would like to hear your opinion/experience about: - Stack. What would currently be a good combination webserver/protocol/ database? Possible options: Lighttpd, Cherokee, apache, FastCGI, mod_python, wsgi, mysql, progress... I realize there is no 'best' solution, but I would like to hear your recommendation. - Database optimization. The database layer is currently the major bottleneck. There is currently one database with over 150 tables, some of which are quite large. Some queries take close to minute to execute (yes, it's that bad). For redundancy reasons the database is replicated to another server (master/slave), but that doesn't help speeding up the response time. In the new version of the web application the database layer should be as scalable and maintainable as possible. This probably means using techniques such as 'sharding' and partitioning. The question is what both Python and Django offer in that respect. - Advantages of an ORM. Currently the web application doesn't use an ORM, but it would make development and maintanance a lot easier if it would. The question is whether an ORM is a wise choice for such large systems. Will what you gain in development speed and maintainability outweigh what you (possibly) loose in speed, 'optimizability' and adaptability? - SQL optimization. When using an ORM the SQL gets abstracted away, but as discussed above a certain amount of optimization is unavoidable. How well does Django support SQL optimization? And if you optimize your SQL, how do you then migrate to a new version? - Database Migration. The database will likely change over time but that should lead to as little downtime as possible. What options does Django offer? - Speed. The current version of the application is written in PHP and is sufficiently fast. How about Django in that regard? Is that something I should worry about? - Security. Since the web application involves transactions security is very important. Any tips/experiences/links/...? - Templating language. Is Django's templating language up to replacing Smarty? What are the pitfalls? Is it fast enough? - Caching. Django has quite some caching support built in, but is it enough for very demanding sites? What are the limits? - Build automation and deploy strategy. In the past I have used 'maven' when developing Java applications and I liked it. What are Python alternatives that I should check out? How do you evolve a Django application without interrupting your service? - Unit testing. Python supports many unit testing frameworks. Which would you recommend when rebuilding a large application from scratch? How would you set up your test environment? How to test all aspects of such a large system (preferably automatically)? - Switching a development team to Python/Django. I'm familiar with Python/Django myself, but three other developers not (although they are eager to learn it). Although Python is one of the most 'learnable' languages, it still takes time to find your way in the standard library and to become a real Pythonista. Does anyone here have experience switching a small development team to Python/Django? - Bzr or Hg? :) There are most certainly many more relevant aspects that I didn't mention here but that I would love to hear about. Please share them, just like links to relevant sites you may have. Thank you very much. 2B --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---