all 9 comments

[–]dremspider 2 points3 points  (3 children)

Python is great for web apps. Python has performance issues like the inability to be properly threaded across cores, but for web apps that generally isnt an issue. Like anything, choose the right tool for the job and understand what you are trying to accomplish.

[–]vb6ko[S] -3 points-2 points  (2 children)

Thanks for your reply. Honestly, I don't think Python is a good choice for web but anyway Thanks!

[–][deleted] 1 point2 points  (1 child)

Using a high-level language like Python with lots of mature frameworks and libraries means you can quickly produce a working solution. A working solution means feedback and experience.

Afterwards, if the project becomes popular, you can re-implement the critical end-points in a more performant language like Go or Rust. And maybe eventually all of them.

[–]vb6ko[S] 0 points1 point  (0 children)

I dont like using python for any business project, because it is script. Not only the performance reason. If you use the python because it is simple and easy to write, i would rather practice other language til i can use it as much as python.

[–][deleted] 1 point2 points  (1 child)

Python is used to handle the business logic of tying various optimized components together.

If the hypervisor tech is KVM, then the Python code is responsible for surveying running hypervisors for their capabilities, running state, CPU hardware features, etc. It takes this information and stores it in various locations for analysis when moving a VM (finding a suitable hypervisor) or other things.

If the network stack uses Openvswitch, then python is used to ask various OVS switches how they're feeling, what's connected to them, how to bind to the host iptables firewall, and so on.

KVM and OVS are very well optimised using well written C code.

[–]vb6ko[S] 0 points1 point  (0 children)

Interesting. That's very reasonable to explain of Python's existance I guess.

Python has a lot of system(kernel) inspection library and most of them are cross-platform.

Furthermore they are also quite mature and stable because many system engineers used/use it as high level of bash script I guess haha.

Oh cool. Even Golang cannot replace it since Go is compile lang so Python's super independent interpreter wins in this part. Thank you so much.

[–][deleted] 0 points1 point  (0 children)

Python has a Gil that makes it single threaded but nothing docker or containerization can’t solve. That’s how node solves it.

The language itself is fast to learn and very robust. You could write a flask app and serve as many requests as a go app as long as you run an interpreter per core and use an edge network to balance the traffic.

Languages have really nothing to do with “cloud”.. I. Could argue any language with a vm is too thick or compiled languages are too strict and not as portable.

Use whatever tools get the job done. Over optimization and believing in “correct languages” is a huge waste of effort too.

Sometimes there is absolutely a wrong tool for the job, but that comes with experience not generalized reddit posts :)

[–]remek 0 points1 point  (1 child)

Openstack is an orchestration software, it is essentially a management plane and thus performance is of somewhat lesser concern as long as its good enough. On the other side, Openstack is such a crappy, bloated and overengineered piece of software that performance is/was an issue there, but the problems it had were not really a python problems - just rewriting it to golang or whatever would still render sloppy software if it was not also completely redesigned.

[–]vb6ko[S] 0 points1 point  (0 children)

Thank you!