3 ms·
>>A better model already exists - thread per connection > For that you will need a language with good support for threads, which Python definitely isn't (at le
by Something1234 6y ago
>>A better model already exists - thread per connection
> For that you will need a language with good support for threads, which Python definitely isn't (at least not CPython), so Django doesn't have any other option here
The thread per connection is managed by your application server. Why does the language need to have good thread primitives then? In fact I would argue you spawning and managing your own threads make your service less robust.
- fiedzia 6y ago> Why does the language need to have good thread primitives then? Because: a) we want application server to be written in the language we are using, so that we can control every aspect of how it works, instead of having some silo that developer will avoid because its so different b) those threads will share cache, connections, some preloaded data you may need and so on, you want a language that allows this to be done reliablyl c) those threads may need to create more threads (make parallel requests to 3 services and resize an image at the same time)
- empthought 6y agoAs if Apache/nginx and wsgi isn’t still the norm...
- fiedzia 6y agoUwagi is used for performance reasons only, once you have a language where its not a problem, it immediately goes away. I haven't seen anyone using it with Go for example.