A few days ago, I chatted with a Rails developer who is optimistic about Python. the reason why PHP rules today's network application development. Python is like the next PHP. A few days ago, I chatted with a Rails developer who is optimistic about Python. the reason why PHP rules today's network application development. Python is like the next PHP. Reply: python can. Why can't node. js be used? why can't go define "next PHP? Is it about popularity? If so, I don't think Python is as popular as PHP. The root cause lies in the difficulty of deployment.
PHP is almost useless in terms of language, and the quality of implementation is also poor, but it wins in the worst deployment: no other language is suitable for large-scale deployment like PHP. After Apache/mod_php is installed, PHP application deployment is simplified to copy files. Even if nginx/FastCGI is used for performance reasons, the additional work is only the initial configuration. Once the configuration is complete, all subsequent deployments are file replication. After the server is restarted, apache/nginx is usually started automatically, and fastcgi manager is responsible for starting the php-cgi process. However, PHP applications do not need to worry about more maintenance when calling files. This is crucial for platforms such as Dreamhost: they usually require a server to handle thousands of low-traffic users, and these users do not have root permissions to run other processes. The lifecycle of PHP scripts is short, and there are no resident processes. the scripts are terminated after each call. the requirements for application authors are lower, so you don't need to worry too much about resource management.
This is quite different from the deployment of Python streams: Most Python network applications, such as Django and Tornado, require independent resident processes (Apache/mod_python seems like a cup of cake ). These processes require additional maintenance to manage the startup and stop of them, and also need additional monitoring processes to handle the restart after unexpected exit. This requires you to have a deeper understanding of the system. Resident processes need to occupy system memory. generally, it is impossible to run hundreds of applications on one server. for service providers such as Dreamhost, it is not suitable for processing simple applications such as WordPress blogs. Resident processes also require the author to have a deeper understanding of system resource management and garbage collection mechanisms to avoid problems such as memory leakage and excessive resource occupation. Now, App Engine is the easiest way to deploy Python network applications. it uses a lifecycle similar to PHP (the request processing speed is limited to 30 seconds, timeout is terminated, and resident processes cannot be run ), it greatly simplifies management, but cannot be accessed in China...
In terms of popularity, Python will not exceed PHP, because a large number of service providers cannot use Python to support the existing user scale. However, this popularity is meaningless for startups and professionals. Many core network applications are not suitable for PHP's short request processing mechanism (such as quasi-real-time push reminders and instant Web chat), but are more suitable for processing by resident processes. These are the places where Python, Ruby, and other languages exert their energy. Python is Python. why is it the next PHP? Is Python deployment a problem? Python Web applications are only deployed on virtual hosts, and are well deployed on other platforms.
No host is missing. Who else uses cheap virtual hosts? I don't think python can replace php. at least it is completely impossible at present.
The reasons are as follows: php is still advancing with the times, and the number and quality of phper and php-related programs are constantly expanding and improving. The important thing is that php is still being maintained and updated, and all aspects of language are constantly improved and improved. in this era, php has been eliminated, python has always been a product that does not keep pace with the times and does nothing against humanity. it can do a lot of things, such as mathematical computing, 2D/3D graphics processing, in recent years, many people with ideas have applied Python to scientific research and mathematical computation, and established many scientific tools and libraries, it is expected that Python will one day become a powerful and rich computing environment like Matlab, Ave, SAGE, and SciLab. Behind Blender, GIMP, and other software, the Python graphics processing script has been playing an increasingly important role. If you have watched three open-source animated films produced by the Blender Foundation, you can even expect the near future. Python will one day enter Hollywood and become a tool for digital film production. Different languages have different advantages and different fields of expertise, just as PHP does not support programs with long-time mechanisms, it can be said that PHP is not good at it, however, the rapid and agile WEB development is especially evident in PHP. However, Python can be said to be more powerful. it can be used not only for WEB development, but also for background data monitoring, WEB page capturing, and other time-consuming applications, as well as data analysis, mathematical computing, and other high-end applications. It can be said that each has its own advantages. you can select the appropriate language during development. it makes no sense to discuss who should replace. Apache does not die, php does not fall, it is so simple. Python is powerful in its concise and elegant language and its powerful expression ability. hacker is willing to use python as their way of expressing their thoughts.
As Rio mentioned above, python deployment is a problem, but it is not a problem for commercial websites to handle a vps on their own. the versatility of python ensures various unconventional applications.
To put it simply, if you only need to display the content of web1.0, consider php, web2.0, python, and RoR. how is the iteration speed and forward compatibility of python...
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.