Why not PHP for Google’s App Engine?

TechCrunch is announcing Google’s new “App Engine” service being launched this evening.  The basic service is a full app stack hosted and managed by Google, providing a web framework (maybe I’m misreading this?) and the Google ‘big table’ database service.  The web stack is Python, but there’s no word I’m seeing on whether it’s plain Python or if it’s based on an existing Python framework (like Zope or Django or something).  This is seen as a strike against Amazon’s hosted services (EC2, SimpleDB and others) which may make it more attractive for developers to write hosted apps using a ‘single stack’ approach rather than the ‘pick and choose’ method of integrating Amazon services in to other systems as needed.

My question is “why was Python was chosen instead of PHP?”  Yes Guido works at Google, which was probably a big factor.  However, from an adoption standpoint, there are still more PHP developers out there.  There’s likely an argument to be made for ‘quality’ over ‘quantity’, and perhaps Python is easier to manage in virtual hosted environments (PHP’s under FastCGI might be the best choice, but isn’t as fast as mod_php).

These are just some initial thoughts.  It’ll be interesting to see if this approach sparks some competing services from other companies (Yahoo!?  IBM?).  I could see IBM offering hosted services for its Project Zero project, though I have no clue whether they’d actually do it or not.

I'm currently working on a book for web freelancers, covering everything you need to know to get started or just get better. Want to stay updated? Sign up for my mailing list to get updates when the book is ready to be released!

Web Developer Freelancing Handbook

Share and Enjoy:
  • del.icio.us
  • DZone
  • Facebook
  • Reddit
  • StumbleUpon
  • Digg
  • Simpy
  • Technorati

{ 49 comments to read ... please submit one more! }

  1. The answer is simple, the people who designed the system were not familiar enough with PHP to implement it, or they’re python zealots, which would explain the first situation. People who use Python seem to develop a superiority complex, which makes them unable to view anything non python as relevant or useful.

  2. Google loves Python. All of their applications are Python. So it would seem logical from an initial launch standpoint that they would choose their favorite language. I’m hoping they add support for other languages later though as I think only allowing Python will limit uptake, since like you said, Python doesn’t have the throngs of developers a language like PHP has.

  3. Python is one of the four “blessed” languages in the Google ecosystem — anything developed inside their walls must be based on Java, C++, Javascript or Python. See http://steve-yegge.blogspot.com/2007/06/rhino-on-rails.html for the details on that.

    So this is no big surprise. I wouldn’t call them “zealots” so much, though I do get annoyed by how weirdly happy Python and Ruby fans get, even when they hit the exact same number of annoyances as us cranky old PHPers.

  4. Also, I wouldn’t imagine for a second that this is going to look anything like a typical VPS system, and probably not even something like AWS or Joyent. The name alone is a clue — AppSpot, like BlogSpot. Expect some strict, but generous, constraints, and Google’s spin on deployment and management tools. When they do open this up to additional languages, we’ll all have something to learn, I’m sure.

  5. I’m not a Python zealot, but it seems obvious to me: PHP really isn’t up to any serious usage. Definitions are tricky, but I think PHP really emphasises the “scripting” in “scripting language”, whereas Python is much closer to being a real language. The disaster of PHP namespaces comes to mind, as well as a million other flaws.

    I should mention that I do a lot more programming in PHP than in Python, and I prefer it for the sort of work I do — that is, I’m in no hurry to convert my existing PHP projects over. So I Know Of What I Speak, and any decision to avoid PHP doesn’t surprise me at all.

  6. I could argue, why not Perl? There’s probably still more deployed Perl code out there than any other language.

  7. Um, cuz PHP sucks (yeah, Perl does too Randal) – I mean don’t you want to use a real programming language to write your apps? PHPers are much more zealots than Python uers. The only real choices were Java and Python (Javascript and Ruby would be nice, but their implementations are quite up to snuff yet).

  8. Vidyut is right, Python zealots hate PHP.

    I know that from experience because I attended two events about programming languages on which PHP was excluded.

    In the beginning I thought it was a distraction of the events organization. I the end I figured that both events were being organized by a Python zealot that was just using the event to push Python. Python evangelism is ok, but banning PHP on purpose sounds like a stupid strategy.

    I don’t know exactly why Python zealots hate PHP so much. Maybe they have a certain envy because Python is older but never had anything near as the PHP success on the Web, despite PHP is not exactly a polish. I can imagine many Python developers loosing job opportunities because the market asks for PHP, not for Python.

    I also was told that is pointless that any PHP developers apply to Google jobs because Python developers make sure that no PHP developer gets in. I don’t know if any of this is true, but the fact is that I really don’t know of any PHP developer working for Google.

  9. Aaron Heimlich

    According to the TechCrunch article, “Google says that Python is just the first supported language, and that the entire infrastructure is designed to be language neutral”. Given this, it is entirely possible that AppEngine will eventually support PHP…it’s just a matter of when.

  10. Not that hard to understand why they chose Python. Python is Google’s language of choice, similar to where PHP is Yahoo!’s language of choice. It’s simply what they know all about, what they have all the experts for in house.

    Once we see a few PHP Community bigshots join the Google ranks, is when you can start waiting for a similar service from Google based on PHP. I don’t think that will happen any time soon though.

  11. Maybe because php is just a script language, and python is a real programmation language…
    It’s not the first projet at Google who uses python, and not the last…

  12. The assumptions you have made in your post are not completely correct. AppEngine is currently in beta, and currently supports only Python. But, if you read the documentation, you read
    “Although Python is currently the only language supported by Google App Engine, we look forward to supporting more languages in the future.”

    So, it is very well possible (and I think it is also very likely) that they will support PHP in the feature (I doubt they will support Perl, though…).

    With regard to your question if they support ‘plain’ Python, or some framework like Zope or Django, you can read also in the documentation that they support Python with a large part of the standard Python standard library.

  13. Why not JavaScript? :-D

  14. About a year ago I read that Google had a policy limiting languages used to Java, Javascript and Python. If they still have that policy then it probably played a big role in deciding the platform offered.

  15. Re: Perl.

    Not at Google, there’s not. They picked their own low-hanging fruit to get the service off the ground. I think that’s a mixed metaphor, but whatever.

  16. The ‘language neutral’ and ‘see the docs’ comments – yeah, more of that came out after midnight my time. The site wasn’t fully launched when I wrote what I wrote. I do see that now, and am interested in to see *if* they support PHP. Ning.com is the one of the few moderately large companies that allows end users to run their own PHP inside their app framework. It’ll be neat to see Google do the same. Given that Yahoo uses PHP for many projects, might they offer a similar service allowing PHP? Maybe Amazon will preconfigure PHP app hosting for EC2?

  17. Randal: more code perhaps, but not more active developers.

  18. Michael, Amazon EC2 is a Linux system. There are ready Linux images for EC2 based on most Linux distributions, so you can use any language that comes with such distributions. EC2 is not biased towards any languages. That is a disadvantage of Google App, which seems even more limited than using PHP on shared hosting with safe mode restrictions. For instance, you cannot use MySQL databases nor write to files with Google App Engine. Google seems to have a lot of grass to eat before Google App Engine grows to a serious level of acceptance.

    Stefan, AFAIK Google does not use Python for any heavy duty application. The only application I know they use Python is the help system, which is a very simple content management. For all the rest they use Java and C++.

    It seems to me that Google App Engine is the last hope for Python zealots (including Python author that works for Google) to make Python useful in a visible Web application. If they fail to gain any traction, I am afraid Python zealots should give up any hopes of getting any popular on the Web.

  19. If Google had started off with PHP support, they would have been swamped. Google wanted to start off slow then build up, so they chose to go with Python first then add PHP and others later on.

  20. @Manuel: the YouTube back end is written in python, and it’s used heavily @ ILM.

  21. Interesting podcast somewhat related to this:


    …features interview with Google’s Greg Stein, a longtime Python developer and open-source champion (see http://www.webdav.org)…Toward the last 30% of the interview, he talks about Google’s commitment to Python.

    Greg is kind to other languages, unlike some (most) of the comments I’ve seen from “Pythonistas” who make just gratuitously mean, hateful comments about PHP. The PHP crowd generally seems like such a nicer group. Maybe as a new leaner (less than a year), I’ve still got on rose-colored glasses.

  22. Michael, make that “new learner”…alas, I wish I was leaner…thanks.

  23. @Dave_A – I too, wish I was a bit leaner :)

    I’ll check out the podcast – thanks for the tip.

    Yeah, in general, I’ve found the PHP crowd *on the whole* to be a bit less derogatory about other languages. However, I think that’s because, on the whole, PHP is the first and only dev language for many people. As such, they’re not really aware of what they’re missing. People from other camps often look at PHP and see missing functionality, and pick on PHP for those missing features. In some cases they’re right that the missing functionality is a drawback to the language, and in other cases, they don’t realize that you can develop apps without those features.

    What’s funny is that many PHP developers used the same behaviour with PHP4, publicly disparaging it (I can’t tell you how many times I’ve heard “PHP4 can’t doesn’t support objects!” since PHP5 came out), which simply gave other language camps more fodder. FWIW, I’ve not come across any day to day work where PHP5 makes something possible that was 100% impossible in PHP4. I *do* come across things in other languages that are nice to have, and can make your code more readable or make you more productive, yet are impossible in PHP4 or PHP5.

  24. The reason you don’t see PHP developer’s having an air of superirority about PHP because PHP isn’t superior to Perl/Python/Ruby. Claiming that “PHP gives you register_globals” isn’t a game winning argument.

    On the flipside, PHP’s one edge, that it is actually used far more than any of these other technologies, certainly creates some angst in the other scripting communities, but thats not a locallized phenominom. BSD communities tend to have a level of angst against Linux, and Linux communities have a level of angst against Windows. Same is true for many PostgreSQL users wrt MySQL. Same is true of many Firefox users and IE users.

    In all of these cases, it is generally possible to accomplish most of the tasks needed with either tool, but there is certainly a level of perception of a superior tool, and an acceptance of an inferior tool by folks who “just don’t know better”.

  25. Why not C#/ASP.NET… oh wait.

  26. I don’t know if this was mentioned already but during the announcement they said the system is completely language neutral and it _will_ support other languages in the future.

    As others have said, Python was part of the initial roll out for many many reasons.

  27. *sigh*

    If have to read one more “PHP is a scripting language” comment I’m gonna vomit. I haven’t published a scripted PHP application for a number of years. Its only as “script” as you make it.

    I’ve got several projects that are every bit as “real” and “OO” as anything you’d write in Java, Python, etc. Granted PHP didn’t start out that way, but its there now. Those who think its still a “toy” language or a “scripting” language are just showing their unwillingness to learn anything new. Those of us that ARE willing to learn new things and drop pre-conceived notions etc will be the ones that are actually marketable. I feel sorry for some of these folks that are so close-minded.

  28. Sign this petition to get php support on app engine:


  29. I had a CS professor say, if you’re not willing to use the technology that will get the job done fastest, then others will eat you alive. He remembered when C came out, and all the assembly programmers were bashing on C because it wasn’t a ‘real programming language’. Now, look at it. So, be careful in what you say about PHP or any other high level language.

    The fact of the matter is, if you can produce a quality product faster than your competitor, you will win out. Obviously, Google can dump tons of money into any of their products, and can choose what language they use. Most businesses don’t have that kind of cash to play with, and need products put out fast. PHP is the way to go with a lot of these companies.

  30. If you really want PHP, add a star to the PHP issue on Google’s issue tracker.


    The reason that they started with Python is obvious. They needed some changes to the language to run in AppEngine. The BDFL of Python works for Google. Instant changes!!!

    No worrying about hidden bugs. No worrying if future changes will work.

  31. Rumor has it that PHP will be added soon. Besides, Python is just as nice. IMHO, it always comes down to using the right tool for the job.

  32. By supporting only Python, Google is limiting the platform to a very small number of programmers. They should seriously consider integrating more popular languages, such as PHP and Ruby.

    Yes, we all know that Pythonistas don’t like PHP and Ruby, but hey, this is not about programming languages, this is about Google making money. Yes money.

    Also, based on my experience, people that start a sentence with “Ruby is better that Python”, or “PHP is not a programming language”, are not programmers, they are usually sys admins, web developers or designers that have absolute no idea of software engineering.

  33. The widely-used quote by Bjarne Stroustrup, inventor of C++:

    “There are just two kinds of languages: the ones everybody complains about and the ones nobody uses.”

  34. Stop this unusefull flame on PHP – Python – *language, Google give -that’s the right point of view – and like for others application , i’m sure, every programmer will have support .

    I’m waiting for PASCAL APIs :)

  35. Yes,

    Actually I am confused on this well, why go with python?

    Is it me or does it seem that the whole google app engine stack is meant for individual developers/designers and not say a team?

    As a developer its alot easier to get designers to work around tags than it is to get designers to work within “response.out.write.print( ‘<h1 id…\n\n’ );” code calls.

    Why are these framework communities always trying ‘fix’ or outdo PHP? Sorry, but I just don’t see the advantage of Rails or App Engine or the most of the others.

    Their biggest down fall is that they break or seriously hinder the web project pipeline. With the use of including or templates there is no reason why a team of web professionals should try to shortcut their way by using a boxed, constricting, framework. Especially when that framework doesn’t run natively in the highly supported, very available, LAMP stack.

  36. cuz PHP has Zend Framework B-)

  37. There are many, many reasons why this discussion is silly. First of all, Google App Engine (like Amazon’s AWS) is not a platform you can drop in an pre-existing webapp. Google wants you to develop your app using their architecture and API, so you will be more likely to stay with them. Google loves simplicity and the Google App Engine is simple. Their purely Python-based SDK is surprisingly easy to set up and to start testing/debugging your apps, and Python has exceptional interactive debugging. PHP would require them to include a large, native executable within the SDK, why should Google inconvenience all their customers because a small minority demand PHP? Last time I worked on a big PHP project, there were no freeware available tools for interactively debugging your PHP code.

    A large majority of PHP ‘modules’ must be natively compiled into the interpreter, where most modules for Python are implemented in Python code. There’s no way Google will be able to cater to the needs of all PHP users, but Python users can integrate any module that doesn’t rely on native extensions into their Google App Engine projects.

    And yes, PHP is a fully interpreted language while Python caches a compiled version of the code. Additionally, there are several projects for Python like Psyco or Psycotic that perform JIT-compilation into native code resulting in speed increases of up to 100x of Python’s already pretty fast speed. This is I’m sure a big reason Google likes Python, and the very reason they can offer a service like Google App Engine, and by standardizing on Python, they can continue to tweak it’s performance on their servers behind the scenes.

    All language syntax issues aside, the problem chiefly is that PHP *just does not apply here* here. Have any of you who are arguing for PHP even *looked* at how App Engine operates? Just download the free SDK. App Engine is a framework, like Ruby On Rails, that closely ties maps URL requests to classes/methods/functions and spits out data within templates. PHP was designed to embed small bits of code into static HTML. Yes, you can build an MVC framework on PHP (or Perl or Javascript or whatever) but the issue is PHP’s architecture was not designed for that, and it just isn’t suited to what Google is doing here.

  38. Michael J Caboose

    Google App Engine isn’t limited to do other languages in the future.

    I would say you got the question back words, though, why PHP?

  39. Python is an underrated language and Googles choice to push it is excellent. As a developer with a computer science background I find it easy to pick up and use any language. I often see intence arguements in blog comments along the lines of “my language is better than your language” and really feel that (as another commenter put it above) a langauge is just a tool and a good programmer uses the right tool for the job.

    I encourage any developers out there, who only develop in one language to give another language a try. Download and try App Engine, with Python you can achieve a lot with little code. I recommend looking at Django too in my personal opinion superior to Rails with a more programatic orm and better performance, with easier deployment.

    I for one am a (in no particluar order) PHP, Java, C#, Flex/Air (Actionscript), Javascript, Python, Ruby on Rails, Objective-C (to name a few) developer and really believe the more languages you learn the easier it is to pick up new ones and switch between languages. Not only will you add another string to your bow, you take away new ideas and practices that you can apply to your favorite languages.

  40. well,guido is really the big fator,
    because the python way is “simple is better,” and it has a words says like this
    “There should be one– and preferably only one –obvious way to do it.”
    they are python user,so they think python as THE “preferably only one”
    BTH,if not guido but Larry works at google
    then i think google’s appengine will support perl and many other language at first
    cause THE “TMTOWTDI”

  41. god knows..
    i wanted to use google apps with as php is not supported it cant use it also..

  42. Python has very simple way of making multithreaded applications. Python engine itself is single threaded ( it has a GIL – Global Interpreter Lock ), but from time to time developer of C software can decide to leave interpreter and do some work outside Python, which allows some other thread to acquire the GIL and continue executing Python code. It’s a very nice way of having single threaded scripting language to behave as if it’s like C++. Most of the socket, file and other I/O is made non-blocking.

  43. No Need to Compare.Just matter of requirement matches with the Product.
    No Delay,When Google adopt PHP to develop any application.

  44. Few possible reasons:
    1. Google has a python supporting webserver for very fast response time (wsgi python beats php by a huge margin, so if google is able to create an even faster engine why not use it)
    2. python integrates very well with many languages including c/c++ and also with google platform, providing support to many more apps and their data.
    3. python is simple and better in the general purpose domain not limited to web-based apps but as integrator and powerful scripting language.
    4. Python enjoys a great support of open source community, a plethora of linux utilities, in the language (next only to perl and c) should convince you about it. Google ecosystem has a great relationship with the community and hence python
    5. Its a matter of convinience for them since they usually work in the language they are more likely to support it. A case in example is the author – he works in php and feels irritated by the fact that a third party doesn’t support it yet, if its so difficult for a single individual to adjust to a change of language, how can he expect a whole ecosystem to adjust to his needs.

    Note: On behalf of python programmers I’d like to say – Yes, we love python, its a great general purpose language with lots of support and wrappers to interact with a lot of utilities, which might be found wanting in another great language like Ruby. We like that over the years the language has found usage on the web, in desktop apps, as servers and as integrators helping us to move seamlessly across the application domain jungle armed with this Swiss-army knife, but we do not bear a grudge against any language. We find Ruby stimulating and PHP as a very effective web application language. The inline HTML structure of both the languages are very easy for a person new to programming to pick up, as opposed to the CGI/WSGI structure of python, but as any programmer would defend his choice of language so do we. Every language has a purpose to be. Python’s is to be general purpose, simple, uncluttered and disambiguous. C/C++ are powerful system languages, similarly Jave,PHP, Ruby, Perl, even Prolog and erlang have a purpose. Their co-existence is proof enough that there is a need for them otherwise they’d be extinct.
    If you do observe the advancement of a language you will find that we do have a few things to learn from each other and with every iteration we adopt those good parts. Hence the existence of multiple languages is actually a good thing.
    So let’s respect each others preferences and not expect the world to change as per ours. In fact its better to learn a few more languages and travel with a few more tools than what we have – it will be unwise to use an axe for opening a screw as it’ll be unwise to use a screw driver to cut a branch for wood.

{ 5 Pingbacks/Trackbacks }

  1. Google App Engine « Julio Vedovatto
  1. Juixe TechKnow » Google App Engine Analysis
  1. Google App Engine - When will programmers learn that a language is just a tool? at Urubatan’s Weblog
  1. DiegoPires.net » O PHP precisa da nossa ajuda
  1. PHP Weekly Reader - April 13th 2008 : phpaddiction

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">