Home Help Center

Python in real applications

BiTBiT Member Přemysl ČermákOrganization: Logos a.s.Project: "Simple" web-shop (Apache, mod_python or PHP, Ice)
What about python as server-side ice interfaces. Is it usable in real applications (like bigger web-shop) or only for application design and testing?
I mean that pyhon GIL is actualy biggest problem from my point of view.
It seems, that i have to use any other language like C++, Java, etc. ;)
Isn't it? Any suggestion or recommendation? ;)

Thanks :)

Comments

  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    Ice based python applications are no different from any other python application with respect to the GIL. Given that python is used in many real world applications, I don't see why you would think that it isn't really suitable. Why do you think the GIL represents a problem?
  • BiTBiT Member Přemysl ČermákOrganization: Logos a.s.Project: "Simple" web-shop (Apache, mod_python or PHP, Ice)
    matthew wrote: »
    Ice based python applications are no different from any other python application with respect to the GIL. Given that python is used in many real world applications, I don't see why you would think that it isn't really suitable. Why do you think the GIL represents a problem?

    Ok. I want to hear this, because i wish to use python in my python (demo - for now) aplication. (Apache, mod_python and python with Ice as backend, Postgres). Thorefore i have to make little investigation about it. :)

    There is sentence from issue26, but i didnt translate it correctly. :D
    "Ice for Python is an excellent tool for prototyping and writing interface level tests, not to mention “real” applications."

    And about GIL... i heard about it somewhere on this forum. Someone told, that it may "block" requests on Ice interface because only one thread can be active (GIL). But i dont know where is truth in association with Ice. :rolleyes:

    Thanks
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    Please see http://www.zeroc.com/faq/pythonMultiThreading.html for full details about the GIL and what it means to you as an Ice developer.

    The important thing to understand is that the GIL does not mean that all operations will be serialized inside your servant implementation. If your server is suitably configured, there can be multiple threads of execution inside your server at any time. However, due to the GIL, only one of them will be executing at any time.

    An Ice for Python application, due to increased concurrency, can be better performing than any pure python application. Once control is handled to the Ice runtime (calling on a proxy, or marshaling the return values of an operation invocation) the GIL is released and other python threads can be run. To put it another way: An Ice for python application will never be less concurrent than any pure python application and so, in general, will perform no worse.

    So getting back to my original point -- python is used for real world applications. Ice for python can be expected to perform no worse than any pure python application. Therefore, Ice for python can also be used for real world applications :)
Sign In or Register to comment.