K
K
klinnov2016-08-19 10:37:54
PHP
klinnov, 2016-08-19 10:37:54

How does Python work (on the example of php and nodeJS)?

Hello!
Question: Does Python work like php or like nodeJS?
That is, the request went - the process opened - processing the request - gave the result - the process is closed.
Or how in nodeJS - the process is kept?
Why am I asking. Interested in whether it is more convenient to work with Python with real-time web applications than with php.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
shot131, 2016-08-19
@shot131

It all depends on how you plan to use it, maybe both as php and as nodejs, each of these tools has its pros and cons, use the one that you know best.

D
Dmitry, 2016-08-19
@dmtrrr

In python3, asyncio is included in the standard library, a library that allows you to write asynchronous applications, in addition, async and await keywords have been added to python3.5.
For python2.7 there are Twisted, Tornado, gevent.

A
Alexey Cheremisin, 2016-08-19
@leahch

Usually works like nodejs. The process is constantly in memory. But maybe like php, but no one has been using it for a long time.
But php can also work like nodejs :-) php-fpm is an example of this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question