Friendster goes PHP

June 29, 2004

As most of you probably know, I’ve spent the last six months working at Friendster. I have not managed to release any code in that entire time. Finally on Friday we launched a platform rearchitecture based on loose-coupling, web standards, and a move from JSP (via Tomcat) to PHP. The website doesn’t look much different, but hopefully we can now stop being a byword for unacceptably poky site performance. I also want to call out our first new user-facing feature in a long time, Friends in Common (upper left corner of your friends’ profiles). Try it out and let me know what you think.

226 Responses to “Friendster goes PHP”

  1. Congratulations! I just logged in and the site is certainly much faster.

  2. TheDude Says:

    Here’s something that always bugs me – when a person has only 2 photos, instead of saying [View All 2 Photos] can it say [View Both Photos]?

  3. andre Says:

    care to comment on why you switched to PHP from Java? Java is *supposed* to be more scalable, faster (because it’s compiled) and simply better — but your recent move sort of contradicts those perceptions 🙂

  4. Goddamn Says:

    What the hell is this? is this a joke?

    comment from the Phillipines.

  5. Rasmus Says:

    Whether something is compiled or not has nothing to do with scalability.

    Scalability is gained by using a shared-nothing architecture where you can scale horizontally infinitely. A typical Java application will make use of the fact that it is running under a JVM in which you can store session and state data very easily and you can effectively write a web application very much the same way you would write a desktop application. This is very convenient, but it doesn’t scale. To scale this you then have to add other mechanisms to do intra-JVM message passing which adds another level of complexity and performance issues. There are of course ways to avoid this, but the typical first Java implementation of something will fall into this trap.

    PHP has no scalability issues of this nature. Each request is completely sandboxed from every other request and there is nothing in the language that leads people towards writing applications that don’t scale. Scalability of a PHP app is pushed down to the shared datastore, whatever that might be. If you are using Oracle then how well your application scales comes down to how big a cheque you write to Oracle every year, or if it is MySQL or PostgreSQL then it comes down to whether you have configured replication correctly and have a nicely architected tree of database machines. Or in other words, scalability is done through systems that have been architected to solve that very problem, not through the programming language.

    Add to this the very simple way to link in native-C or C++ code to PHP and you can do all your heavy lifting in a strongly typed compiled-to-native-bytecode language while leaving just the lighter frontend templating work to userspace PHP scripting. That gives you the best of both worlds. The absolute fastest performance because nothing is going to beat decent C code and the frontend flexibility to quickly modify the user experience and launch new features through PHP’s very easy-to-learn and friendly frontend language.

  6. justin Says:

    i’d like to know why as well – it would help us php advocates!

  7. justin Says:

    oopps – i posted at the same time as Rasmus. Question answered.

  8. Anonymous Says:

    ok, we understand why you may prefer php to java. But how could you choose php instead of Perl/Python/Ruby/Rivet ? 🙂

  9. Martin Hjort Eriksen Says:

    This is a funny result. I am my self a PHP enthusiast, but in the journal “ACM SIGMETRICS Performance Evaluation Review, Volume 31 Issue 3” there was an article called “A performance comparison of dynamic Web technologies” where Perl, Java server technolgy (also tomcat) and Perl was benchmarked in a labratory environment. It was concluded that Serverside Java outpreformed PHP and Perl by a factor 8.

  10. Harry Fuecks Says:

    “But how could you choose php instead of Perl/Python/Ruby/Rivet ? :)”

    Better sandboxing. What happens to globals between requests, for example?

    “It was concluded that Serverside Java outpreformed PHP and Perl by a factor 8.”

    But performance != scalability. For a single request, on a system where’s there’s basically no load, Java will do better. Pump up the load to thousands of requests per second and then watch performance. You’d likely see Java slow down first, having gobbled the available resources (depending on application design) while PHP / Perl leave it to Apache to deal with…

  11. Shakeel Says:

    Well, what specific scalability issues did u have with Java/JSP? as far as I think requests only get heavier when you try to put everything in request scope & there’s no cleanup.. tell me isn’t it your applicartion design that let you down with Java ? as somebody mentioned here also, that language doesn’t define scalability.

  12. Wow! That’s awesomely fast. Great job.

    Although language doesn’t define scalability, Friendster has made it clear that a good PHP architecture is better than a bad JSP architecture.

  13. Anonymous Says:

    Those of you asking why they switched from JSP have obviously never used Friendster, or any other JSP programmed site. They are almost always slow. I can’t stand them. On the other hand, I’ve never been on a well-programmed PHP or Perl site that was unacceptably slow.

    Of course, a lot of it is well-programmed vs. poorly programmed. But if they did a good job and implemented caching, then their new PHP site should be blazing fast for everybody.

  14. David Says:

    I’m curious to know if the new codebase is running on the same hardware/db configuration or is it running on shiny new hardware with a different underlying db architecture. In other words: Is the performance boost only attributable to the change from JSP to PHP?

  15. Will Says:

    The problem obviously isn’t the use of JSP. Look around on the web. There are lots of high-volume sites with page names ending in “.jsp” or “.do” (Struts/JSP). More likely the issue involves an app design that worked well for Friendster when the user base was small, and fell apart after months of exponential growth. It’s not surprising that they’d get a performance boost with a redesign. (Note to Troutgirl: Good work!)

    I can’t comment on whether or not PHP or JSP is a better choice for Friendster – every architect has to make that decision. But it’s just not true that systems using Java don’t scale. In fact, I’d argue that more high-volume sites use Java-based technologies than use PHP.

  16. Scott Andrew sums up the good and bad of the move to PHP and a DIV-based layout. No doubt there…

  17. Shai Says:

    JSP is VERY fast, check out at the bottom of each page they have a number such as 3ms, which means the server took 3ms to build the page. The rest of the time is http trafic and images.

    You can program badly in every language. Java however has some distinct scalability advantages over PHP etc:
    1. Optimizing JIT – most people don’t understand what JIT’s do. Check out some of IBM’s articles on subjects such as virtual method inlining, array loop optimizations, bound check elimination etc…

    2. J2EE has very advanced DB caching, and increadible SQL & O/R mapping support.

    3. J2EE can run in a cluster.

    4. While I don’t use it myself, J2EE runs on Windows (PHP forks which isn’t a good solution performance wise on the Windows platform). However J2EE isn’t as good on BSD (due to their threading support). Both do ok on Linux.

    5. JSP has a huge amount of tools check out the newly released Java Studio Creator.

    6. JSP and PHP are pretty similar but J2EE is roughly 40 times larger than anything offered by PHP. Serious enterprise programmers realize this.

  18. The social networking site Friendster is changing camps on the backend. Scott Andrew:
    “…and a move from JSP (via Tomcat) to PHP. The website doesn’t look much different, but hopefully we can now stop being a byword for unacceptably poky site performance.”What follows in the comment section is an interesting discussion about the technical comparisons between Java and PHP for website development.

  19. Anonymous Says:

    For all of you “Java has an optimizer, PHP is lacking”:
    Or, if you want some serious performance:
    Note that this “serious performance” is already on top of PHP’s already incredibly fast processing times.

    As far as the, well. Something tells me that it’s a static-content site with java that re-generates the cache file every so often. End result: I’m putting bets on that being a static-content site, making 2-3ms just disk I/O, no actual processing. Even that, it should be cached in RAM, so 3ms for RAM access time is kinda sad 😉

    Oh, you want PHP dev?

    PHP offers all that Java does, and to an extent more.

  20. Mark Says:

    Rasmus, your post is the very reason _not_ to use PHP. You’re pushing session state, inter-process messaging, and application state off to a database. For Friendster’s sake, I hope they have a huge clustered Oracle instance, because once they exceed the capabilities of their database, the site will fall apart.

    JSP is far, far more efficient than PHP when it comes to taking load off the database, for the very reasons you mentioned above. Sandboxing every request is inherently a mistake, because to do any sort of OO would require that you load up the user’s profile every single time you hit a page.

    Hearing that Friendster used _Tomcat_ as their application server explains why the site was so slow. Tomcat is the reference implementation, and has never been known for its speed. I would bet that, rather than doing a costly and time-consuming conversion to PHP, had Friendster sprung for some licenses for Resin ( the site would have performed admirably. Inter-JVM messaging in Resin is done extremely quickly, and as a JSP engine Resin is unparalleled.

  21. Mark Says:

    Sorry, I couldn’t resist.

    Anonymous, the “Zend Performance Suite” is nothing more than an in-memory cache of page results, something every JSP application server has had for years now. Of course when you’re serving up pages from memory it’s going to be fast. I’ve seen JSP-generated pages run _faster_ than static HTML when a good caching filter is turned on.

  22. J2EE_GURI Says:

    JSP and J2EE are not for dumb programmers.

  23. William Says:

    > JSP and J2EE are not for dumb programmers.

    Or inexperienced ones. Occasionally on Friendster I would get stack traces showing that they used JSPs which directly called one big file called Obviously, not the work of professionals.

    I don’t think that people can learn much about the merits of either technology from this.

  24. Doug Says:

    In reference to #18, PHP can be compiled to store sessions in memory and even shared amongst a farm of load balanced servers.

    Add in the Zend Optimizer, PHP Caching, DB Query Caching, and some custom C modules for intensive tasks, and there is no reason why it can’t handle unbelievable loads. Heck, you don’t really even need all that to handle unbelievable loads with ease. PHP is really damn fast right out of the box.

    If you do things right, there is absolutely no reason why PHP should not be used for extremely high load sites.

    One of the downsides of JSP is that it does need experienced programmers that know what they are doing. JSP is no different from Java (desktop) in this regard. I’ve only used 1 or 2 desktop java apps that were fast, but I’ve used dozens that were slow and buggy. Most PHP sites will run pretty fast even with some shoddy programming, but JSP sites won’t, from what I have seen.

  25. Doug Says:

    Oops. I think that should have read, in reference to #19. This blog comment system is very hard to read. It wasn’t until I got to the bottom that I realized the name and # come after the text, not before.

  26. Anonymous Says:

    >> JSP and J2EE are not for dumb programmers.

    >Or inexperienced ones.

    It sounds like the site was probably (to steal a phrase from Rafe)
    utilizing J2EE worst practices. Using JSP only is the absolutely
    worst way to go in terms if maintenance, scaling, and extending,
    because one mixes the presentation and business rule layers—and
    it is impossible to untangle them when one wants to add a new
    field or whathaveyou.

    There is a reason why professionals working on enterprize-class
    systems use MVC and the 733t 5cr!9t k!dd!35 use Model 1; switching
    to a new, “733t” language won’t solve the underlying (lack of-)
    design problem.

  27. In reference to #19: that’s not what ZPS does. Go back and read the product description more carefully.

  28. Troutgirl Says:

    1) We had not one but TWO guys here who had written bestselling JSP books. Not that this necessarily means they’re great Java devs, but I actually think our guys were as good as any team.

    2) We tried rewriting the site in Java twice, using MVC and all available best practices. It actually got slower. Anyway, what does MVC have to do with speed or scalability? I thought it was a design cleanliness and maintainability thing.

    3) We tried different app servers, different JVMs, different machines.

    4) Anything that money could do, it did.

    I’ll try to get permission to publish some performance stats soon.

  29. To the poster in #9 – did you actually _read_ the paper you cited? Using PHP/perl/etc., reduced response rates by a factor of 8, but this actually just served to put the overall speeds into a similar large as the Java-based approaches. In some of the dyanmic generation tests, perl and php outperformed Java. In the database tests with 64kb results, Tomcat outperformed PHP by a fair bit. It was definitely not a concrete “php is 8x slower than java” result. php is much slower than Apache serving static pages… but then again, you’d expect that.

  30. Ben Nolan Says:

    My biggest concern with php for highly trafficked sites is the lack of internal threading – so that each request much spawn a seperate php interpreter. I don’t know how much of each interpreter is shared memory and how much is dedicated to the request – but with an average task size of ~5mb – that limits pretty quickly the number of simultaneous requests you can handle.

    So for example – if you have code that hits a DB that takes 200ms to respond – you’re limited to:

    512mb ram @ 5mb / interpreter = 100 simultaneous requests @ 200ms = 500 requests per second on a decent webserver.

    I don’t know – maybe that’s not such an issue – but I do like how j2ee app servers use one instance and lots of threading to handle responses. We use jsp here and it’s pretty damn quick.

    (That said – I use php for my other job – and am chuffed to see it being picked to improve performance on such a high traffic site).

    Also – Troutgirl – you’re sure Friendster’s not just faster because less people are using it? 😉 (jokes)

  31. Johnny Boy Says:

    Saying one scripting language is faster/better than the other without regard to databases, load characteristics, caching layers, content size, etc. is a bit like arguing why your Ferrari doesn’t do 0-60 in 4 seconds, and not caring whether it’s on ice or pavement.

  32. domokun Says:

    News flash: Java sucks, people.

  33. dave Says:

    Yeah! Java suxxxx! PHP R0X0RS d00d!

    Really well developed argument there domokun.

  34. Sean Says:

    in response to #30: sounds like you’re talking about PHP CGI, which does spawn a new process for every request. However, if you use the Apache module, as almost all servers I’ve encountered do, then that is not true. there are only as many PHP interpreters as Apache processes, and each handle many requests with out (un)loading processes.

    And you must have loaded PHP up with alot of extentions for it to be 5MB, mine is only 1.3MB for the CLI binary, and 1.4MB for the apache module.

  35. leonard Says:

    ben, surprisingly Friendster traffic seems to still been inching up:

  36. ed Says:

    I’d argue that more high-volume sites use Java-based technologies than use PHP.

    and how would those high-volume sites compare to Friendster’s userbase?

  37. It was snappy this morning. It’s starting to crawl tonight.

  38. Cyber Says:

    in response to #28. we like to see your performance stat soon…

    the fact that you have tried different app servers, different JVMs, different machines… makes me think why you settled for tomcat as your app server.

  39. That Guy Says:

    Waaa Waaaa Waaaa waaaaaa

  40. Anonymous Says:

    I wonder if you also tried a FastCGI based application.
    Say, Perl, Python or Ruby are all way faster than PHP (talking about standalone apps) and using a FCGI backend you get a multitier-able environment with simple connection pooling, no startup costs and other niceties. And it mixes nicely with apache and mod_fastcgi

    Did you considered this and rejected or never even thought about it?

  41. #17 Shai:

    You live in a fantasy world. If you think PHP offers everything Java does and more, you don’t know anything about Java.

    As for Ace’s Hardware, of course they use a cache.. It’s impossible to serve a page from database in such a short time. Ace’s Hardware wrote an excellent article on their setup back in january 2003:

  42. Clint Ecker Says:

    #36, Ed. Why don’t you go ask Yahoo. They use PHP and mySQL for everything on their site. I’d wager they’ve got a pretty large user base 😛

  43. NM Says:

    In response to #42

    Please show me a java site that is similar in size and performance to

    Also check this out:

  44. Someone Says:

    Just interesting…
    Friendster – did u consult java/jsp experts before decided to move your site to php ?
    What did thay said ?

  45. Doug Says:

    #45 –

    Haha. Is that a serious question? Ask an expert in anything about moving to something that they aren’t an expert in, and they will always tell you not to move. I’m an expert in PHP, but I’m not an expert in JSP. If you asked me, I’d definitely never suggest to anyone to move to JSP. Thats only because I don’t know a lot about JSP.

    I don’t think a single person responding in this comments section is an expert in both JSP and PHP. If someone were, I’m sure they would say that both would work well in high performance sites if done correctly.

    I’d venture to say that the programming language has very little to do with scalability. The coding architecture used has a little to do with it. Good coding practices has little to do with it. Optimizing code has a little to do with it. Caching has a good bit to do with it. The database server software has a lot to do with it. The speed of the machine or the machine farm setup has a lot do with it. My point is that the language really doesn’t matter as much as you guys are making it out to. Most of the people here that are saying that one language is more scalable than the other are just ignorant about the language they are bashing. I know that I’m ignorant about JSP, and if anyone asked me what I thought about JSP I would say that is is slow. But thats why I shouldn’t be commenting on it. Of course, I’ve realized that too late.

  46. Mark Says:

    Another reason not to use PHP:


    Do not use Apache 2.0 and PHP in a production environment neither on Unix nor on Windows.

    The Friendster webservers must all be loaded to the gills with RAM, because Apache 1.3 is a _memory hog_.

  47. Cody Casterline Says:

    In response to #45: “Ask an expert in anything about moving to something that they aren’t an expert in, and they will always tell you not to move.”

    I consider myself an expert in PHP. (I’ve been programming in it for about 4 years now.) I’m *just* starting to work with JSP, so I’m by no means an expert in it. However, I’d easily recommend that other sites use it. Not so much for performance reasons (though my company’s internal testing showed that it blows the socks off our other solutions), but because the *code* is much more scalable.

    PHP encourages bad programming practices and behaves nondeterministically. As your code base grows it’s much easier to maintain in a well-designed Java/JSP framework than a well-designed PHP framework.

  48. Anonymous Says:

    PHP doesn’t encourage bad programming practices. It simply allows them. That has both good and bad consequences, but the bad consequences are easily avoided by just programming with good practices.

    Lets face it, most web programming projects are small. Very few people are writing large, scalable sites with frameworks. So this conversation is moot for most people. But of the sites that DO need that stuff, Yahoo, Google, Friendster, and many others are all running PHP. That should say at least something for the language, I would think.

  49. Anonymous Says:

    Google uses Python, actually. But yeah, you’ll be as hard-pressed to find a Java-based Web site that doesn’t suck as you would be to find a Java-based GUI application that doesn’t suck. They’re like ghosts – some people believe they exist, some people don’t, and I’ve never seen one. 🙂

  50. NM Says:

    In response to 47, you must understand why it says don’t use php with apache2… and that reason is that the TONS of extensions PHP has are not all thread safe yet.

    in reality, most are and tons of people are already running PHP and Apache2. This is not a reason not to use a language because the deployment has one little caveat in it.

    In response to 48, please define “encourages bad programming practices.” Also, I think you contradict yourself when you say it’s hard to maintain “a well designed PHP framework”.. if it’s well designed, it should be easy to maintain.

    When Java people say PHP is hard to maintain, they basically enjoy sloppy file locations/management in Java… who cares where things or kept or how many import statements there are because it all gets compiled. In PHP, you can’t be so sloppy — seems to me that it encourages you to be more organized which is always a good thing 🙂

    Finally, I’m still waiting on a Java site that is comparable in size to

  51. Anonymous Says:

    Dudes who have been complaining that they must have engineered the Jsp version badly:
    – If even bestselling JSP book authors can’t figure out how to do it! I wonder if us, pity PHP programmers (are we the only pity ones?) would ever be able to do it…

  52. EViL3 Says:

    I won’t brag I’m an expert (thats for my peers to judge) but I have significant experience in both Jsp (4 years) and PHP (2 years) development, its my opinion that for straight web development PHP is superior and faster than Jsp’s/Servlets.

    It’s useless arguing about benchmarks since there are claims from both sides. But, you only need to be aware of development aspects and techniques often employed by J2EE project, it places much emphasis on the usage of Pattern, which is great, but more often than not it leads to the usage of bloated and cumbersome libraries. These libraries make the developers life a little easier, but the overall effect is a bloated and slow webapp.

  53. kerb Says:

    what were you guys thinking when you decided to use Apache Tomcat for a massively High Volume site? If you guys at least paid for some Resin or Orion license, you wont be spending a fortune for a rewrite. its all about the architecture and not the underlying language. I believe you can create a scalable website such as friendster with either jsp or php, as long as the guys doing it knows the technology well. apparently, judging just from the stack traces, they arent.

    i also agree with #29.

    #44, yes.. in some way i think they did. They have the Oreilly Tomcat book author with them. But i guess doing all the tuning with tomcat clusters is a futile effort if the implementation is fubar.

  54. Anonymouse Says:

    Here are some stats on, a phpBB site:

    Who is Online – In total there are 9532 users online :: 7550 Registered, 384 Hidden and 1598 Guests

    Gaia has 137509518 articles posted, with 70860414 in storage
    We have 758159 registered users
    Most users ever online was 12598 on Mon Jun 28, 2004 3:32 pm

    The way the “users” online is calculated is only a 5 minute window

    Now that’s what I call scalability, and phpBB doesn’t use some great OO framework or platform, it’s just a set of a few scripts, mostly self contained with some include files that have some functions. Everything is straight forward and it’s easily modified by wheover to suite their needs.

    I await the reply of the omniscient Java people.

  55. Anon Says:

    Dude. Please don’t be using phpBB as some sort of metric for judging PHP’s value. In this conversation, software like that is an argument against PHP, not for it.

    Also, there are much, much larger sites using PHP that are very fast. All of the Community Connect sites get hundreds of millions of requests for PHP resources every day. Of course, Yahoo! is the most visited site on the Web.

    There are other technologies such as mod_perl that use a very similar approach in terms of architecture. Examples of big mod_perl sites include and TicketMaster (imagine the spikes they handle when tickets go on sale for a popular show).

    Now, where are the “enterprise” sites that use JSP and aren’t utter crap? I can’t think of a single one, although I’d be happy to hear of a couple.

    Why do Java sites typically suck? Is it bad developers? I honestly don’t know, but rather than waste my time with such an academic pursuit, I’ll stay away from everything that begins with J, and my Web applications will at least suck less.

  56. pb Says:

    Those are impressive go-gaia numbers!

    The Ace’s Hardware reference is funny. Try a search there. 5,000+ milliseconds!!

    When you come to a sluggish site, more often than not, you’ll see the URL giveaways: .jsp, .do and servlet.

  57. #44 : The sitepoint blog post is written by a person with no clue about Java..

    The Go Gaia site is pretty fast, but there are many reasons for that:

    – server cluster
    – it is just serving simple content as far as I know. Not very hard to serve that fast if you have the needed hardware and bandwidth. I sure Java could do it faster though..
    – for a more complicated application, Java’s advantages would become even more apparent…

    An example site that is both faster and much more complex:

    #57 : If you had a clue, you would know that the search time is not dependent on the language used, but on the SQL queries used.

  58. Anonymous Says:

    How can you say that is more complicated than a forum? The content on changes very infrequently compared to the tens of thousands of posts/day on go-gaia and the # of simultaneous viewers. Most of looks like very simple static pages out of a content management system probably served off a sunfire with a bunch of caching.

    Of note, the forums on look elementary in comparison and very feature-poor.

    Are there any large community sites that run java where we can see a HUGE (millions) of posts with hundreds of thousands of users.

    In response to 56, I think phpBB is an excellent example on how anyone can have a moderately well written PHP script without some design pattern/OO framework and yet get great scalability just by doing some MySQL tweaks and serving images from another web server.

    if we wanted to compare MVC, we could benchmark Struts versus Mojavi ( ), but this whole thread started off of scaling community websites with many users operting on data for a very dynamic site.

  59. First of all, there is a lot of content added to every day. I don’t think you looked too hard. The forums there are also very well visited. accounts for 54% of all traffic to is ranked at 725 at Alexa. Go-Gaia is ranked 12,484. Go-gaia used to be ranked at ~3000.

    If is elementary, what is Go-gaia then? It’s basically a forum with a few other simple scripts.

  60. mullen Says:

    “My SNES is better than your MegaDrive!”

    Grow up people – both PHP and Java are very good technologies. Use whatever is right for the job in hand.

  61. multi-decade veteran Says:

    I’ve heard that any model Chevy can kick a Ford’s ass, readily … so there.

    ~multi-decade veteran of the platform/language wars

  62. EViL3 Says:

    Well my Amiga 500 beats both of them hands down 😛

    Theres always gonna be competition; there ain’t nothing wrong with that as long as its productive..

  63. multi-decade veteran Says:

    And beat this for ‘scalability’ of the monetary kind. I recently finished working on:

    1 intranet web application (~10 users):

    – Java: 10+ developers, 6 months, $1.2 million (actual)
    – PHP: 2-3 developers, 2 months, $100k (estimated)

    What I do know from 6+ years of Java development (and 3+ PHP), if you can find a Java position it will keep you in work as long as there $$’s available…

    The truth is Java and PHP are both good technologies. Their success’s however are always tied to the normal IT compromises: money, time, available people resources, available hardware, staff expertise, legacy albatrosses, politics, customer requirements, business requirements, industry buzz, etc., etc. Adding actual language/platform performance numbers to these other factors is nearly always just ‘noise’ and rarely affects the end decision.


  64. Yahoo Gal Says:

    Traffic Rank for 1

    The site is a poor example of a Web site, even if it is ranked 725 (I’m impressed, really I am). Also, it doesn’t affect any argument for or against JSP, since the vast majority of resources within that domain are static HTML. The only JSP pages seem to simply dispatch the requests, using a protocol-level redirect to instruct the browser which static HTML resource to request next (rather than replying with the requested resource).

    I’ve written plenty of applications in Java. The syntax isn’t too terrible, and it’s easier to write maintainable code in Java than it is with something like Perl. However, anything moderately complex is going to be terribly slow in Java. Java zealots will argue that it’s because I’m not a skilled Java developer, but these same zealots always fail to provide an example of something moderately complex that isn’t slow in Java. Until I see a few major sites successfully using JSP or any other J* technology, my opinion will not change – Java is simply not industrial-strength, no matter how much marketing there is to tell me otherwise, and no matter how many Java developers disagree (well, the Java developers who don’t have the inclination to be well-versed in several languages like the rest of us). Another telling sign is that 99% of Java zealots cannot code proficiently in any other language. Why do people well-versed in other languages not preach about Java’s superiority?

    People can argue that languages don’t matter, and to a certain extent, that is true. But, from my experience (over a decade of developing large-scale Web applications for various industries), Java is chosen by companies with more money than brains, such as Wall Street financial institutions. They’re typically the same companies who think Windows makes a great server OS.

  65. CT Says:

    This conversation sounds like many political conversations. Both sides think about the world in different ways and therefore think theirs is the best to do it.

    I think few would disagree that good programmers implementing a good architecture can produce a good site in either Java or PHP. I think a more pertinent question would be how well do sites built by less than expert programmers perform in Java or PHP.

    PHP programmers react poorly to Java because it is an elite club with steeper learning curve. Java programmers look down on PHP because it is the language of the proletariat.

    Face it, app server vs. shared-nothing just happen to be two good ways to solve the same problem.

  66. what Says:

    Every language out there sucks at something.

    Personally, I write all of my scalable web applications entirely in 64Bit DEC Alpha assembly.The performance gains are totally worth the development time trade off.

  67. Patrick Says:

    One for the ‘Against-MVC’ arguement. I am no means and experienced programmer but have used all language mentioned to some degree. Whilst looking at frameworks for a Cold Fusion project (hey, lets add another language to the pot) we looked at Mach II (which uses the MVC loosely) and couldn’t squeeze everything our project did into the Model or View or Controller hole… so we opted for Fusebox and its simplicity got the projected moving FAST.

    Why mention all this?

    Java frameworks are NOT simply but ARE elegant solutions IF you look at them for a while. They beaty of PHP (especially with version 5) is you can now use all the OO stuff if you want to… but if overloading, polymorphism and containment are still greek to you.. you don’t have to!

    I actually like both languages and simply use whatever I afford to host and has massive online support.

    my 2 cents

  68. Dan O. Says:

    When I went to Ace’s the responce time was 113 ms. =P

    Also, I believe Google used Python in the beginning, but I’m almost certain they’ve moved it all to compiled C/C++ based on what I’ve heard both Guido and others say.


  69. Sal Says:

    How does Friendster in its new PHP configuration handle connection pooling to the shared datastore (presumably Oracle or MySQL), and how is that able to be scaled infinitely? The monitoring tools and autonomic capabilities of nodes in the cluster must play a big part.

    (from a HA Java guy)

  70. the doctor Says:

    PHP vs. Java –

    Ultimately, on any well-written application the bottleneck will become the database. I’ve done large scale stuff in both Java and PHP, and it always boils down to the fact that whatever you do to optimize code in memory never helps very much – memory is always much faster than the db. What matters is how good the database drivers are, and how well the application caches the database, and how good the db schema are.

    The fact is that JDBC drivers written by companies like Oracle have huge amounts of money spent on them. PHP just does not have the same quality of implementation in the drivers. Nor does the sandboxing of requests help – it increases the reliance on the database.

    In all this discussion the Java application server that is mentioned is Tomcat. Well, the fact is that Tomcat is only supports the servlet side of things. It does not implement the full J2EE spec which includes many features important to scalability. If you write to the features that Tomcat supports, moving to a higher end app server like Websphere or Weblogic isn’t going to help much – the app just isn’t written to take advantage of the backend features of these systems that are aimed at large scale systems.

    As far as authors of best selling JSP books, I am not impressed. JSP is the presentation layer and should have little or no impact on the application performance or scalability if you are using best practices.

    Regarding 12,000 users online at once, what does that mean as a benchmark? Tell me what the data rates, bandwidth to the db, etc. before I can draw conclusions.

    Another point people like to make is that Yahoo is running PHP. I was around when Yahoo made the decision to use PHP – and yes, they considered Java, but went with PHP instead. However they actually preferred Java over PHP except that they did not want to move off BSD, and BSD has a crummy threading implementation, which is very important to Java. Since Yahoo is still dependent on a lot of legacy C code they aren’t about to move off BSD. Ultimaately it boiled down to Yahoo having a special situation where Java was just not properly supported by the OS. If they had Linux, especially with the new O(n) process scheduler in Kernel 2.6 they would have gone Java in a heartbeat.

  71. John Carney Says:

    As a Java developer, one who has spent some time in the area of Java Performance, I’d like to add in a few thoughts.

    First, in reference to the JSP Authors, JSPs have as much to do with system performance as a steering wheel does making your car go faster. The work is done in the engine, and not the parts you use everyday.

    Second, Sun’s best practices are not always best practices for performance. For awhile, I flew around the US doing performance profiling on Java applications. I was shocked at how deep misconceptions of Java application performance requirements run. I saw way too many string ops, too much structured exception handling, over abstraction, object caching, O/R layers that create and destory huge number of objects (TopLink comes to mind).

    The reason I mention this is because the “best practices” listed above are often result in “worst performance”.

    PHP is fast. PHP is easy to develop, and with Fast Templates, it’s easy to abstract your HTML away from your view code. It’s easier in fact, than any Java technology. This sometimes give the illusion you’re engaging in a MVC design pattern.

    However, Performance and Scalability in PHP does present some problems. The effective nature of a two teir design puts a lot of pressure on the database. Lacking middleware, once your PHP app peaks the hardware, you’re often left with little choice in solutions. Buy a faster Database server. In addition, if you have complex business requirements, say a heavy transactional enviornment, the tight coupling of the view to the businees logic make it difficult for those processes to move between servers. The tight sandbox model of PHP isn’t always a benefit.

    In Java’s favor, an application server (not necessarily J2EE), where caches can communicate can be a VERY effective way of preventing your database from being the bottleneck. (Who knews there really was a use for multicasting?) In addition it’s much easier to break the view processing away from business logic processing. This lets me setup three seperate teirs, each firewalled from each other, providing an additional level of security. These are things I can do easily in Java, that I can’t do so well in PHP.

    // EvilJohn

  72. Anonymous Says:

    eBay is completely J2EE. They server over a billion pages a day. That looks scalable to me…,2003)&from=technical&fromtopic=By%20Topic&subsysid=2000&topic=technical

    I think it’s more about using the right design patterns both in Java and PHP that will lead to horizontal and vertical scalability.

    This is pretty much a wash issue for me, nothing more than a dumb flamewar.

  73. AlexCV Says:

    eBay is Servlet? That’s weird, I could’ve sworn it was an IIS ISAPI modules written in C++. Maybe it’s the /aw-cgi/eBayISAPI.dll that confused me there…

  74. What the hell Says:

    Haha, this is hilarious. Who cares whether it uses JSP or PHP? As long as it works well.

  75. Anonymous Says:

    Re: #64: You’re on crack. If you think the only purpose Java serves is to build goofy websites for posting forums and trolling for sex, you have no clue.

    Try designing and building an enterprise level application that scales (yes, SCALES) across multiple platforms in multiple physical locations (like LA and NYC) with anything BUT Java and you will quickly find yourself in hell. I know, I’ve tried it, and I wouldn’t let my team or my company use anything but Java to do what we do…there’s simply no other alternative.

    It’s simple: use the right tool for the right job. If PHP excels at building “dynamic websites” then use that tool and make all the money you can. But, there’s more to information technology than building “dynamic websites”.

  76. M.I.Sofware Says:

    A little info,
    eBay uses a mix of Java under Websphere and C++ under a horrific DLL, because they’re migrating from their abysmally designed C++ Windows DLL to somewhat better Java.

    They started on perl, btw. (Note that aw-cgi is from ‘AuctionWeb CGI’.)

    You’ll notice as you browse that the /aw-cgi/ is becoming /ws/, which is the websphere stuff. If you hunt around for ‘ebay v3’, the first hit (from Sun) gives a decent description of what they’re doing.

    It’s not JSP, it’s servlets. However, eBay has the HUGE financial resources to make the back-end database and hardware work at terrifying speeds, and pays a great deal of money to Oracle and Sun. Small startups don’t really have the financial resources to bring to bear on this kind of problem.

    PHP and JSP are solutions for a problem. I imagine the JSP was written poorly, and the PHP is written better, with knowledge of the failures of the past. Each company is unique in their needs, and the value that each platform brings. It sounds like Friendster’s migration to PHP was successful, and met the goals of speed. I’m sure someone will migrate from PHP to a JSP solution, and get equal applause when it improves their site.

    In the end, it’s the engineers, and the knowledge and skills they have that matters, not the platform.

    Congrats, Friendster!

  77. Anonymous Says:


    Check out:

    I’m glad that Java is the alpha and the omega to you.

    I believe #64 was pointing out that the forum was something we could see a large user base (i.e. proof of concept that those sites are possible and we can all see raw numbers).

    Take a look at this as well:

    – Very low cost of ownership to scale (1 box web, 1 box DB, 1 box images web server)

    – Easy to go in and modify the phpBB code to enhance scalability where necessary (usually just DB optimizations)… almost anyone can do it, the same is not true for optimizing a J2EE deployment

    What happens when your a Java application starts to hit a performance threshold? buy resin, websphere? spend a long time re-architecting?

    Java is a fun programming language, and it does have a very broadscope, but that doesn’t mean that it’s the best solution for everything. I think most Java zealots have accepted that Java GUIs aren’t that great.

    Most websites don’t require a big appserver, they have a very concrete set of use cases and their backends are simple databases that will never be a bottleneck if the schema and queries are designed well.

    While a lot of complex enterprise network services should take advantage of an app server architecture, any web interfaces (read: HTML) are probably still fairly contained in scope… heck, you can mix, expose SOAP and build the webpage in PHP.

    These days it’s all about time, time to market, time to develop, time = money. PHP is arguably faster to develop in.

    Telling someone they have to buy Resin, or websphere, or whatever is not a good aspect of a language or an architecture.

    I think we will see the line between Java and PHP blurred. Already the object model in PHP5 is looking closer to Java, and Java is starting to move towards dynamically typed variables (ok, just templates for now)… but hey, who wants to force all those little type manipulation anyway. The PHP model is more efficient… do some type validation/checking where you need to.

    It’s a shame that whenever someone chooses PHP over Java, the Java zealots come out in droves and poop on PHP… I think you guys are still bitter from the Microsoft war.

    There are better tools for certain jobs, and sometimes those tools != Java, only the use cases of your project will dictate what to use. The design and architecture of the system means more than the language it was written in, and you can write a kickass app or a shitty app in Java or PHP.

    If troutgirl comes along and posts the statistics on the various servlet container performances versus PHP, maybe we can have some more insight on how PHP won in this case.

  78. Chad Fennell Says:

    Personally, I belive the “right tool for the right job” idea that has surfaced a couple of times in this thread makes the most sense. Most of you have already read this before, but it speaks to the utility of both PHP and JAVA:

    “There are two kinds of languages: The ones everybody bicker about, and the ones nobody uses.” -Bjarne Stroustrup’s, creator of C++

  79. Julius Says:

    you have a huge screen-width problem

  80. Deane Says:

    Yeah, someone posted a ridiculously long URL from eBay in the comments. Delete it and you should be fine.

  81. Well, i have a couple of things to add to this discussion.

    After some 4 years in J2EE (not JSP, not Servlets. J2EE. The full package.) I’ve seen lots of web components. There’s a big fact in that no application will run fast in Java if programmers don’t know the technology. Even if the buy WebLogic or even worst if they set up a WebSphere cluster. There are lots of things that must be decided before jumping to code like code monkeys. Database accesing code inside JSP pages are the most horrible thing i’ve ever seen. A careful tiered design, data caching, trying to remain stateless, and you’ll have a Industrial strenght web component.

    Even unskillled PHP developers are able to handle a nice bunch of request/second.

    If you meausure that as a PHP feature, then go ahead and choose PHP.

    When it comes to real components with a huge bussiness logic, Java is a no doubt.

    But we are talking about perfomance and SCALABILITY.

    some people argue that no Java site is ever fast enough, and worst, can’t handle several concurrent users.

    Do any of you guys have ever heard about

    It’s the most important J2EE community around, not even Sun forums.

    376053 members, thousands of concurrent users at any time, video downloads (which add significnt traffic bandwidth comsumption), and a blazing speed. Runs on Oracle iAS over linux.

    Performance? If your app is just about a MySQL database with a couple of file tables, PHP is a fast solution, but i won’t choose something like over measuring how fast is page rendering time. JSP compilation is astonishing fast, and JSP compiles to Servlets, which, in-memory are even faster. JSP Taglibs are cached, so a full componentized JSP page is faster than any php. Allways.

    Scalability is a different kind of monster. When it comes to it, horizontal and vertical, you have to take in consideration lots of facts. Database and network is allways the problem. Of course, most of PHP component never take into account that because they run in a single box, but network latency is a huge factor, even bigger that most of SQL query response times. Let alone running the app server in the same box as the databse which for most of j2ee developements never applies. And they shuoldn’t.

    Tomcat is a reference implementation of a servlet container, not designed to be a top-benchmark web server. Apache is the most used web server in history.

    I’ll never choose “PHP” (the whole) over “JSP” (what is that?) for a major web component being scalability the reason.

    eBay will be the-test-that-stumped-them-all when the finally v3 release is complete, a 3 year development still under course.

    Even if not much of us do eBay like applications, not much of PHP applications are as well written as other like phpBB, which i enjoy at my community, PC++

    Speed of development and low cost of ownership for a not-very-complex bussiness model, choose PHP. If you want to run a Mercedes, then you have to pay for it. Choose Java 😉


  82. Don Marti Says:

    Are you using memcached? Just curious.

  83. Anonymous Says:

    this page looks horrible in Mozilla 1.7…. have to scroll right to see 1/2 of the content! Gross!

  84. Anon Says:

    > eBay will be the-test-that-stumped-them-all
    > when the finally v3 release is complete, a 3 year
    > development still under course.

    All other arguments aside, this is Java’s biggest problem. Even with all that money, and all those developers, it really took eBay 3 years to develop a Web application?

    Java zealots remind me of Microsoft zealots. There’s no sense in arguing with them. Just leave them be, and let them waste their time and money trying to achieve what everyone else thinks is easy.

  85. Great job, Troutgirl! Friendster is definitely _much_ faster, with less ‘churning’, than before. Thank you! 🙂

    Almost everyone seems to agree that PHP is great for programming anything from relatively simple (2hps), content-driven blog sites, like phpBBs, to much more robust (20-200hps), n-tiered, multifunctional, multi-database- and transaction-driven communities, such as Friendster, Yahoo, and the Pluginz Network — my baby.

    Additionally, almost everyone else seems to agree that Java is great for the Application layer … when implemented correctly, depending on the workload characteristics and the other technologies used.

    From my experiences architecting and developing and its vertical communities and e-stores, I’ve realized how PHP allows for a vertically and horizontally scalable, 3-tiered architecture, where the users’ connections to the ‘net become the bottleneck, because Java’s Application layer can be facilitated through sub-requests to caching, clustered application servers (or services) that run in any language. Yes, even Java… without even breaking a sweat.

    In addition, session-state can be centrally located, cached and replicated, for vertical scaling, and with NFS or a SAN, file-systems need not be local, allowing for horizontal scaling, too.

    Finally, I know it may be an *eval* thing to say ;-), but without *exception*, Java can’t *catch* PHP in sleek web performance, *try* as it might… (puns intended…)

    Just my 0010 cents. 🙂

    ==_-+- Steve

  86. lampman Says:

    I have seen java over used- using MVC to display table data (read only). The technolgies they had to use: JSP/Servlets/Struts/Tiles/TagLibs/Ant/Hibernate.

    It took some beginners 2 full years to get to that level. I wrote the php version in a couple of weeks and these folks spent months and months. any changes – they would redeploy the war file which would require web server restart.
    the lines of code in the java side were many many times more.

    Now since Java Server Faces was released- they want to rewrite the jsp stuff using that. Go figure
    These folks will rewrite forever as they make excuses of how the new tools/frameworks are better .

  87. acxil c Says:

    Java runs huge e-commerce sites, no sweat. From EBay to Orbitz to Bank of America, they leverage all that Java has to offer. Maybe the woes of Friendster spawned from a lack of proper design and application server consideration. “Occasionally on Friendster I would get stack traces showing that they used JSPs which directly called one big file called Obviously, not the work of professionals” Those types of issues do not occur at well-designed J2EE solutions.
    PHP is a formable technology but can not been seen as better solution to the power Java.

  88. Anthony Says:

    Hey for all you PHP heads, can anyone point me to an automibile, cell phone, mars rover, medical sensor, GPS system, parking meter, robot, financial trading system running PHP? Because in the real world of software all these things have been realized with Java.

  89. phpnjava Says:

    The problem is Java is a OO language. For web pages- JSP/Struts/JSF are all over kill. For a lot of interactive sites- Java is overkill. MVC- for displaying table data using hibernate as a persistence layer? That makes it rocket science and when asked for changes– you folks wade through tons of xmls files/deployment descriptors.

    Only time will tell that companies wasted a ton of money on using java for jsps/servlets and turned their websites into amazingly complicated rocket scientist experiments.

    A project that can be done in PHP should never be done in java- it will be 5-6 times more expensive and harder to manage and requires more skills.

    Check out a site built using php-nuke with anywhere from 400-500 users on at any given time.
    Big companies are outsourcing as the costs are becoming a burden. They do not want to look at the LAMP model as they want a commercially supported vendor and someone to hang when something goes wrong. I can tell you that of the 100+ projects I have come across… only 10-15% really warranted the use of J2EE. They could have been done using ASP/PHP/Cold Fusion at a much lesser cost. But deep pockets justify the lavish spending and most IT managers want to spend their budgets than cut it. Money saved is money taken away for these managers.

  90. Anthony Says:

    >#90 The problem is Java is an OO language

    Hmmm, then why is php 5 trying to play catch up with OO features?

    >”For web pages- JSP/Struts/JSF are all over kill. For a lot of interactive sites- Java is overkill. MVC- for displaying table data using hibernate as a persistence layer? That makes it rocket science and when asked for changes– you folks wade through tons of xml files/deployment descriptors.”

    Do you mean for you its rocket science? Last time I checked my Java web apps where simple and easy.

    Perhaps you fail to see that many of the sites out there that use Java for there web apps are because theres more to just serving a page with content from a db. Many of the Java sites require the J2EE stack because content from legacy systems are being exposed to the web. PHP does not have the ability to solve enterprise integration issues.

    Im still amazed how you think Java is rocket science that truly discloses your expertise.

  91. phpnjava Says:

    Yep its rocket science to me when you look at all the deployment descriptors… restart war files….

    The only thing I know is I have delivered on time at a reduced cost solutions in PHP that have worked.

    Sure you can drive a 747 to the local 7-11 to get a gallon of milk.. but for most of my clients they are happy to drive their 2 wheelers. they get it on time/budget while the java folks are arguing over frameworks… and while they are in the midst of coding.. a new framework comes along and they make the case to switch to that….

    now folks are going to dump JSPs and rewrite to use Java Server Faces?

    Its kind of daylight robbery.

  92. Mark Says:

    “Yep its rocket science to me when you look at all the deployment descriptors… restart war files…. ”

    Seriously, if you think a web.xml file is too difficult to understand, maybe you shouldn’t be in the industry. I understand if anything beyond SELECT * FROM TABLE WHERE ID = BLAH is difficult for you (oh and btw, 99% of php apps fall victim to SQL injection because of PHP’s propensity to allow careless security in the above statement) but honestly, saying JSP is rocket science is like saying changing the oil in your car is rocket science.

  93. safari Says:

    Why didn’t you redirect the old .jsp URLs?

    That’s a billion bookmarks you just broke!

  94. phpnjava Says:

    “99% of php apps fall victim to SQL injection because of PHP’s propensity to allow careless security in the above statement”

    Sql injection is due to the way strings are concatenated to form the sql query. This happens regardless of any programming language used if you do not sanitise user input by removing quotes. Even Java does not have anything to make it immune to this as it is the database that gets the sql query.

    I suggest you read more here ….

    I have seen most books that show examples of login code that suffer from sql injection. I have seen this in asp/jsp/php books.

    Bottomline- check string functions and you need to escape user input to remove quotes which can short circuit your query. Do not blame it on php. Blame it on the uniformed coder. BTW- I have seen many java programs whose code was full of this as well.

  95. There has been a usual public “I am better than you” debate over the fact that Friendster goes PHP. Ian Kallen uses some common sense in his thoughts: The Scalability Holy Grail. Obviously there is never a winner in “language…

  96. Fernny Says:

    Friendster is still slow if you ask me 😦

  97. Chris Miller Says:

    #94 Safari – actually this is not true, JDBC does have a mechanism to prevent this. It’s called a PreparedStatement, and any SQL parameters are escaped automatically and in a RDBMS-independent manner. Please get your facts straight before spreading FUD.

    Sure, it’s possible to bypass this by using a direct Statement object instead. There are many reasons why this isn’t recommended (SQL injection being one of them). There are cases where a Statement is what you need though. Blame the Coder not the tool. Any JDBC programmer worth his salt will be very well aware of the differences between Statement & PreparedStatement, it’s bread and butter stuff.

  98. Chris Miller Says:

    Apologies to Safari, my comment was to be directed at #95 phpnjava. Safari’s got a very good point!

  99. phpnjava Says:

    Chris- any php programmer or any programmer who knows about SQL injection will add a simple function call to sanitise user input before sending it to the database.

    Java programmer worth his salt- I have not seen many who know that arguments passed to prepared statements are escaped..

    My point is you still have to code to avoid sql injection. Its not that java automatically protects you from it..

  100. phpnjava Says:

    I forgot to also mention that
    PHP allows prepared statements… so nothing special about jdbc there…

    But you cannot use prepared statements in all the cases.

  101. Another interesting sentiment that I recently heard is that programming Web sites in Java is hard because it involves threading, and threads are hard. I would love to know more as to what the roots of this argument are; but…

  102. So after all this “PHP Scales” discussion, I decided to register at to see what all the talk was about.

    It seems like complete copy of, where I am also registered, perhaps the main diffirence being that it recently turned to PH

  103. n/a Says:

    still buggy like before.. it seem my page doesn’t works fine. doesn’t refresh,my old messages and testi are still there eventhough i’ve deleted or approved the testi. i don’t think it’s my browser IE who has problems. i lot of people still experiencing the same errors! thanks

  104. Helping hand ... Says:

    Well I’m actually a little surprised … All this talk about which is better PHP or Java, and nobody has come up with a good answer. It seems that none of you have been introduced to the wonders of coldfusion. Honestly the best development solution out there.

  105. dojsys Says:

    for those worrying on slow architecture – you better switch to .aspx for faster, realiable, scalable architecture design and programming code. yeheeyeyeye1

  106. Mark Says:

    Funny how PHP5 looks and feels so much like Java.

  107. plumsauce Says:

    Perhaps the limitation is in the usage pattern?

    On a site that has a *lot* of pages as might be found in a community forum, imagine the overhead of compiling every single page for the few times that a page might be viewed. In other words, many pages and few views limits the compilation advantage that for that site.

    Of course, being completely precompiled, isapi applications or atl servers do not suffer from this problem.

  108. Lloyd Banks Says:

    its still not close to myspace

  109. BEDROCK Says:

    yeah mga tanga kayo!

    I’ve programmed in JSP,PHP,PERL,PyTHON, and ASP.NET.. and JSP SUCKS!.. and PHP-MySQL Great!.. and ASP.NET is far better that JSP!

  110. Eminem Says:

    ASP is going down. Open Source will eventually pass all other scripting languages

  111. Anonymous Says:

    lam nyo ako to pero lam nyo damiko frindster 15 yun

  112. bedrock Says:

    in response to #112

    … how sure are you? have you tried and do you read articles about the upcoming longhorn? are you aware what’s XAML? AVALON? and have read the article about the interview on the creator of GNOME? he said “It’s massive. I’m so scared” (referring to LONGHORN)

  113. Chunhui Says:

    Well, being both a PHP and J2EE Developer before I think both PHP and J2EE have their own merits.

    J2EE in real world implementation I would say is slower, not becos J2EE itself is slower, but becos J2EE itself has too many pitfalls about performance. Yes, a perfect J2EE app probably will run faster, but its really easier to write the perfect PHP than the perfect J2EE.

    Look at it this way. Even SUN Programmers can’t properly write J2EE. Their sample implementations like Pet Store and Adventure Builder are a real shame, full of bad practises and using technology becos its just there.

    When I do PHP, really, there’s really nothing much I could do to really badly affect the performance. Careless and badly thought out implementations won’t have as big an impact as on J2EE.

    It is so much harder to write performance centric J2EE Apps. Becos the most common best practises and sun recommendations aren’t even the real best solutions. look at Entity Beans. They are damn slow. The common solution nowadays is Stateless Beans with DAO. But the best way is still JTA, which is so much more troublesome to write.

    In Friendsters case, I think they made the right choice. Not becos PHP is faster than Java, but it cost less and is much easier to improve the performance than J2EE. It is simply easier to find people who can write better PHP than people who can write better J2EE.

    A note on MVC frameworks. MVC is a concept. It is not platform specific. I’ve written my own MVC framework to make doing PHP and maintenence a breeze. So dun say that you can only do MVC in J2EE. But of course I would say J2EE have nice frameworks like Struts and more recently Spring which do really kick ass.

    So why do we still need J2EE? PHP simply can’t do as complex stuff as J2EE as simply. Friendster has really high traffic, but if you consider the code or design complexity, there is really nothing too hard/outta this world. Which is a compliment by the way, as the best programs are supposed to be as simple as possible and works better. But I’ve come across some really wickedly complex enterprise processing that can kill your system even if theres just a couple of hundred or thousand users, and thats not because the hardware is slow. In such cases, java is simply better. Can you imagine writing PHP that wrap around ERP or SAP systems and interfacing with a couple of dozens of other totally non-compatible, out-dated, problematic systems? There is a reason why I’ve never seen it done before. I tremble at thinking of it. But well, I’m doing such stuff with J2EE now.

    So friendster’s switch to PHP simply doesn’t mean that J2EE is not as good as PHP. It just means that PHP is better than J2EE for friendster. Marketing people and Critics say all the crap they want….but ultimately, the right tools for the right job. Just that J2EE is better for other jobs =D

  114. i like friendster, that’s all! i don’t really care about php or whatever!

  115. klara Says:

    i dont bout dat but i lyk friedster 2

  116. iangreen Says:

    err.. J2ee is a rich set of enterprise oriented framework specifications. php is a web scripting language. comparing the JVM tech. and PHP,
    what a joke.

  117. Jim Says:

    Java is alot faster than PHP if done correctly. Why didn’t you cluster the JVM and put several Apache servers in front of it? A cluster of Apache can definately off-load web requests, why the heavy lifting can be done by the cluster of app. servers (i.e. JBoss). Obviously, friendster didn’t have a good architect nor developers. What a bunch of cheap Hacks!

  118. Tim Says:

    Friendster is a house of cards. PHP is going to clunk out very soon. PHP Nukes had somewhere 20-50 SQL CALLS per PAGE! WTF? LOL! You idiots should look into OR mapping technology if you’re still hacking in JDBC. What a bunch of idiots…

  119. Anonymous Says:

    yes there are improvements like its neater, more organised…
    but technically, its still inefficient in some ways.
    for example, after i delete a testimonial, its still there!!
    Also, i think some of u also encountered the same prob. Someone wrote u a testi, but when u log in to read it, there isnt any…
    and the loading of pics is still taking ages…

    all these small little details are important to keep users’ faith going for the webbie…

    well.. gotta work more on dat!
    keep up the good work anyway!

  120. yummy reyes Says:

    i like friendster!!!!! thats all i can say.

  121. Troutgirl Says:

    So I was terminated from Friendster today. The reason given was blogging.

    The levels of irony on this are pretty deep. For one thing, I wrote a fairly well-known paper last year about the need for

  122. Ein wahre Welle an blogosphrischem Medienecho hat der Blogeintrag “Shitcanned” von “Troutgirl” ausgelst. Im wahren Leben[tm] ist “Troutgirl” Joyce Park, PHP Expertin aus Leid

  123. “This is the end, beautiful friend,” sang Jim Morrison in “The End” long ago. “Every new beginning comes from some other beginning’s end,” sang Semisonic in “Closing Time” a few years ago. These were the lyrics running through my head

  124. It seems Friendster just shot itself in the foot.

    This morning I read on Joyce Park’s blog, that she had been fired for blogging about Friendster switching to PHP from Java, an entry that stormed the net and lead to wide discussion about PHP’s scalabil

  125. Well said #25 Doug.

    I find PHP repelling for a number of reasons not the least of which is that most of the PHP apps I saw lacked organization. Many yet appeard to be the works of inexperienced “l33t c0ders” who frown at well established web development practices such as MVC, for example. I agree that PHP could be a good way to go for a quickie / test web app… As soon as you move into large enterprise space where every bit of reliability, performance, and scalability counts, choosing to stick with PHP is a recipe for disaster. I say Java/Resin with Oracle/MySQL and MVC is the way to go.

    just my 2 cents worth 😉

  126. david Says:

    “byword for unacceptably poky site performance”

    Ouch. Discretion is the better part of valor — while I am not defending your employer’s judgement, necessarily, I can understand why that statement might make the boss a bit…uh…ticked.

  127. Bruce Says:

    They keep saying Java is faster… not in my experience. Congrats on switching from Java to PHP. PHP is faster and more powerful with less programming headaches than Java. The platform for PHP (Apache+PHP) is an industry standard for all high-level sites and has proven itself to be capable of handling mission-critical processes without heavy maintenance. I’m sorry you Java advocates are forced to continue to promote this dying technology, but at least others are learning that it’s more efficient to dump Java and go with PHP. Now if only Puzzle Pirates would do the same – great game, but the Java implementation is killing it.

  128. foobar Says:

    I was going to post a message, but #115 summed up everything i wanted to say. (if this was /., i’d mod him up!)

    Oh, one last thing… I have to comment on this…

    > All other arguments aside, this is Java’s biggest problem. Even with all that money, and all those developers, it really took eBay 3 years to develop a Web application?

    My response: have you ever built a true enterprise app that gets millions and millions of transactions a day? And not just content delivery, we’re talking heavy duty transactions (re: bidding)

  129. Sorry Says:

    Sorry you got fired… that’s a bunch of crap.

  130. GU1LT Says:

    For a website this huge I wouldn’t touch PHP with a 10 foot pole.

    This is definitely an OO mod_perl solution.

    Tight integration w/ Apache, persistent database connections, and cached templates.

    PHP can’t even come close..

    Regardless, Friendster sucks anyway..

  131. dragko Says:

    Sorry about getting canned. It is BullSh1t…. You need to fight. I will support you!

  132. dragko Says:

    BTW consider my Friendster account closed.

  133. Need good php people would like to talk about your joining our team if your interested??? see for a summary of what we are about. The summary should be modified as we’ve changed a bit of our direction but its still substantive to our mission. Anyone else???

  134. willy Says:

    sorry for you for getting fired, imho its a lame decision by them, heh, i guess they’re the poky one, not the site, oh wait, its the CEO, scotts who doesn’t like to be poke….
    lame lame lame

  135. rump l stiltskin Says:

    sorry. lame on their part. you’re good, and will do fine. f*ck ’em, even if you liked ’em. they’re dead to you.

  136. Very sorry to read what happened on Cnet. Poor management decision with far reaching impact. I know you’ll land on your feet and be better for this. Good luck to you.

  137. Anonymous Says:

    Someone asked about slow PHP… Never been a slower site in the world than enterprise sourceforge. This is php / oracle and it is the largest dog ever. 25-45 seconds to load a page. They are done with a complete rewrite to J2EE. It is orders of magnatude faster. Same pages load in 1-2 seconds. This is for one request as well as hundreds of simultaneous requests.

    The folks that think the language is the magic solution haven’t been around for very long. *Any* language can be abused and most languages can be made to perform well.

  138. GeoffB Says:

    I had already pretty much switched to Orkut as my friends are mostly there. So … cancelled my account on Friendster and let them know it was because of your firing and my preference for Orkut.

    Stupid really … you didn’t post anything deserving of firing and even if you had this would still have been a case of all publicity being good publicity.

    Much look going elsewhere. You’ve built the resume’ so here is hoping you land quickly.

  139. Kevin Says:

    Oddly enough, this thread that got her fired, has inspied a LOT of people to sign up to friendster. I know of over 30odd people signing up or have signed up. Doesn’t that mean because of her post, the eyes it drew are giving friendster more bandwidth?

    But, being a JSP/Java guy, I am going to guess they DIDNT want more bandwidth due to their switch to the less scalable PHP solution. That must be why she got fired. They switched, realized they had goofed, and didn’t want anyone noting they have moved to PHP for fear a ton of people might flood the site and crash it. 🙂

  140. I’m not sure it was this thread… but mentioning Orkut might have been Bad:

    Anyway, sorry to hear of the apparently shortsighted actions of Friendster. Hope things work out for you.

  141. Scott Says:

    wow, those friendster guys are dicks. I was about to try out their service until I heard about you getting fired. lol, I suppose one preson doesnt make a difference, but maybe I’m not the only one turned away in disgust. Ah well, atleast I have something to rant about in my own blog now. :/

  142. shawn Says:

    friendster sucks stupid ass ceo what a bitch.. yea my friendster account is pretty much gone too. super lame of them to do that… hope you get a better job.

  143. Friendster during its JSP days was very slooow. The PHP implementation helped it speed-wise, although I can see that the site had to do some go-arounds. Nevertheless, this is where PHP’s strengt lies, so you can’t blame the Friendster team.

  144. Vincent Says:

    Remember that JSP != Java.. so those Java advocates… don’t flame PHP! 😀

  145. hericz Says:

    Your CE0 is sucks… We all support you, if that means something

  146. bobby Says:

    That sux friendster canned you. they should have realized that would be a PR mistake. Sounds like overreaction to me. Off to close my friendster account.

  147. Anonymous Says:

    Friendster didn’t want VCs knowing that their whole site could be developed by one person in six months.

  148. This is big news, and many sites (communities and blogs) are picking this up. We’re hopping on the bus ride. C|Net like many others have picked up the torch to denounce the new CEO Scott Sassa for terminating Joyce Park for blogging and leaving posit…

  149. Diego Zenizo Says:

    Usually I hate people who sue other people or company, BUT I strongly recommend you consider sueing your former company.

    Anyways, with the mastering of programming, java, php, etc you show, I’m pretty sure you’ll find a better job very quickly. Go boldly!

  150. anon Says:


  151. Gary Says:

    JSP and JAVA are slow, slow, slow! PHP and PERL are so much faster because they are lightweight. I’ve recently started using C# and and all I can say is WOW! All those ASP bigots out there (Bedrock #111) take the time to download and try Web Matrix from before you make your comments..

  152. Anonymous Says:

    poor java web application design results in poor performance, not java itself….

  153. sturgeonHead Says:

    I recently suggested an idea to my compadres about a technology that would help you find people (your friends), and one of them, being a smart @$$, said how about making it so you could _avoid_ people.

    In a similar vein it seems friendster has telelgraphed their move to a new business model, probably to be branded something like…


    with a mission “How to avoid a network of jerks” or “How to disconnect from people you really don’t like”

    Friendster should rehire you, perhaps require you vet your blog entries (when about the company) before publishing, and hope they recover from the bad PR.

    There are lots of social networks, and one only wants to belong to the right circles…

    Stupid move on the part of F’s management, no foresight.

    THE GOOD NEWS: this may drive traffic down so that the old JSP code works just fine.

  154. My 2Cents Says:

    I’ve seen plenty of examples of corporate people being total a-holes and screwing employees. I’ve also screwed up at times along the way, and I have tried to learn from my mistakes…

    If Friendster is like virtually every other tech company, you signed a confidentiality agreement. You clearly violated confidentiality and they not only have cause to fire you, but also to sue you for your breach of contract.

    Furthermore, you disparaged the company’s product in a public forum, which seems to me like a valid reason for termination.

    Lemme put this another way. If you found out that a “friend” had been talking trash about you behind your back and you later decided to throw a party, would you invite that “friend” or would you leave her off the list?

    Learn from your mistake and you’ll go on to better things. Blame them, and you’ll never get to wherever you want to be.

  155. fivecentfather Says:

    Well, I guess My2Cents above didn’t READ what you wrote, because there was nothing derogatory about what you said.

    Any idiot could tell the site used to be slow and now it wasn’t. They could also tell that the underlying architecture had changed with a little probing so you weren’t “disclosing” anything. And if people take what you write, and twist it to fit into their own diatribes, how is that YOUR fault? Stupid!

    Anyway, saw your story mentioned on CNet, and shot off an email to Friendster telling them they were idiots for firing you. Also said that I nor anybody else in my family would be using Friendster until you were compensated properly.

    But even if they don’t, as others have said, your skillset, combined with all this publicity, should ensure you get a job at a company that actually STANDS BEHIND it’s own stated reasons for EXISTANCE. LOL

    Good luck in the future.

  156. Joe Foo Says:

    The corporate structure is the closest thing a communistic government there is.

  157. simple Says:

    Gook luck in the future.

  158. jafo Says:

    i hate friendster anyways- it’s just another popularity poll like in high school- whoppee, i’m popular, will i be prom queen- get over it, losers, you will be 30 someday and have kids and won’t waste your time trying to be popular in school or virtually or anywhere. yeah! make those kids happy and make them spend their parents hard earned cash.

  159. Parking meters in PHP LOL! Says:

    regarding #88:
    acxil you fucking assclown! of course no one would write a parking meter in PHP. It’s a purpose built language – the purpose being developing Web applications. And to that extent it’s much more efficient than J2EE or Java w/Struts. I’ve done PHP commercially for 5 years before joining a J2EE/Struts outfit, and I can’t even begin to explain how unRAD Java web frameworks are. Bloatware galore! It takes an average of 5 days to get a single web page implemented from our design specs/UML diagrams/ER-Diagrams, etc. Keep using Java for your h0t parking meter applications, just keep it away from web applications.

  160. jafo Says:

    yes, u are a scapegoat- others have complained about friendster being a SLUGfest. actually, everyone i know complained about it- every damn person on friendster. yes, this is my real email- spam me all you want- i already get 600 spams a day. the MAN just wants to blame someone for his impotent website. have a cookie and a glass of ice cold milk on me.

  161. Parking meters in PHP LOL!!! Says:

    Sorry, I guess post #163 responds to #89, as in Anthony. axcil, you’re OK. Anthony, you’re the assclown.

    Haaaaaaaaaaa. Parking meters! using J2EE. The power of 100% Pure Java harnessed to calculate how much change do I get for my $5 bill.
    How about vending machine software? I wouldn’t write those in PHP either! Can Java figure out how to give me a coke, $3.20 in change, _and_ communicate inventory back to the store?
    Fun job you have there Anthony.

  162. Ranger19DX Says:

    SOme of you anti-PHP users need to understand that because friendster (which I am happy to say I’m a member 🙂 ) was used because of it’s ability to handle a much better load than JS especially when it’s used in applications such as friendster. It needed the change and restructure because of it. I say that it actually performs better and is much more responsive with PHP than it was with the JS structure it started out with. So as for me, as long as my blogs are not the cause of it’s ability to perform on par, I say hello PHP good-bye JS…we loved you so! Parting is such sweet sorrow!

  163. Anonymous Says:

    It’s not a scalability issue.

    I wrote the search engine at, similar to Friendster.

    At its peak, the site had more than double friendsters userbase, and the searches were all done on a dual Pentium II-450MHz.

    There were 2 of these boxes only for redundancy (they never went above about 20% load).

    Particularly when you consider the slow hit rate from the pages taking forever to load, what Friendster is doing fits easily within the capacity of ONE modern desktop PC. Probably should have the web, DB, & search tiers on separate boxes but this is for the purpose of isolating them from each other, not because of capacity.

  164. Anonymous Says:

    Just wanted to let you know that I think what Friendster did was reprehensible. Contrary to the comment from #157 above and the two or three similar comments on, not all corporations act with reckless abandon as Friendster obviously has in this case.

    Any company that is willing to fire an employee for such a minor infraction is bound to have a high turnover rate reflecting what must be a horrible environment to work in.

    I would suggest finding a company that actually cares for and respects their employees.

    The negative PR that Friendster has brought upon themselves is just reward for their transgressions.

    Good luck with whatever you do next.

  165. bjoy Says:

    I’m sorry to hear about what happened to you. That was clearly a dumb move by your boss in my opinion. It contradicts most of what the site stands for.

  166. Anonymous Says:

    It’s irrelevant that Friendster is a social networking site. Publicly disparaging the company that you work for is a no-no. Making the company/CEO look bad is a sure-fire way to derail your career.

  167. ken Says:

    Did the company impose any rules on what you could or could not post on the blog?

    Did the company have a instant dismissal clause in the contract to cover this sort of thing?

    Saying things to make the company look bad, is bound to lead to some trouble, but they should have given a warning instead of dismissal IMO

    Were you warned before about not writing anything not 100% company line in blogs?

  168. ZDNet Reader Says:

    I ran across your story via ZDNet Announcements. I’m a developer too, but not an Internet developer. It sounds like Friendster needs to adopt their own philosophy. When I can’t practice what I preach, I [hopefully] shut up!

    Furthermore, I’ve read the allegedly offensive blogs, and I see nothing that would damage her employer. None of it reeked of any untruth or risk to “Intellectual Property”. In fact, it sounds like this gal was on a team that was trying to improve things and were faced with difficult technical choices. At least the company wasnt making a deal with a known dog of a product just so they could get some kind of kickback. What Ive read is highly technical; too specific for even most technical people to understand as it deals with the finer details. How that would be damaging I do not know.

    I also think Toutgirl handled her dismissal with grace, especially considering that this company, which supposedly supports free expression, terminates an employee for expressing herself. After her termination, with nothing to more to lose, she didn’t badmouth the company, and actually had some nice things to say about some of the people she worked with. No wonder this has become such a hot news item.

    It’s got to be difficult being a CEO of a company, where you’re being hounded for a better profit margin, while knowing fully well that your company IS your people and you have to make them happy. You can’t produce creative development by force or by intimidation. If everyone would realize that org charts are typically drawn upside down, since the execs effectively work for _everybody_, then things like this might not happen. Decisions ripple through the entire company and, unless the leadership is caught fighting _for_their_own_engineers, they create their own mutiny.

    We in the IT business have apparently forgotten that happy employees far exceed their enumerated requirements. This is true value, not to be confused with the buzzword by the same name. It’s the extra effort, the extra *love put into ones work that produces an unshakable product. Not a particular development language or platform, not a carefully devised executive initiative, but good, *customer-centered development; the kind of thing you simply cannot put in a slide show or business case. Have faith in your own abilities to produce what is truly good, and the profit will follow if the demand is there.

    Shareholders/stakeholders need to be reawakened to the fact that this kind of environment might take more than a financial quarter or two to produce. The crash of 2000 has been far more terrifying than 9-11 could have ever hoped to have achieved. A well engineered product, especially one with the complexity of a website such as this, one that will withstand the stress of significant growth, may take a year or more to produce. If someone tells you otherwise then theyre telling you only what they think you want to hear. If you believe it, allow me to recommend bonds over stocks, or at least mutual funds.

    A good, solid company, one that will withstand the constantly changing world of information technology, requires leadership that focuses on and fights for those who develop their product, not those who are going to get rich from their work. Success requires trust in the kinds of things that cannot be shown in a PowerPoint presentation, such as effort, trust, and integrity.

    All this ranting has clearly been about the latter item, integrity. The decision by Friendster, especially considering the very product they produce, makes one question things like the companys commitment to the cause, not to mention the users own privacy. After all, if theyll go against their own charter, what will they do behind the curtain with the data they have?

    For those who dont think these immeasurable elements are significant, just look at the attention this company has received over this one decision. You couldnt buy the level of _focused_ attention this will draw to this company. I personally never heard of them or their product until this article. If what goes around comes around, its as if nature itself has kicked in on this one.

    Lastly, consider the sidebar to the left under the heading of crotchety-looking old man

    *Customer-centered development means the developer considers the level to which the user is required to suffer to complete a given task, and tries to ease the burden by design.
    *Love in this context means the developer is willing to risk getting in trouble at work for the sake of the customers experience. Most likely, this engineer has been forced to use some pretty lousy software in the past.

  169. I certainly appreciate the job you did making Friendster run faster. I also quite liked the addition of the “friends in common” thing.

    Sorry to hear you were fired, but look what it’s done for your website! I know I’ll be picking up your RSS feed…

  170. Oh My. A lot of opinions about code that no one has seen.

    Who cares if some process is 8 times faster than another in “tests”. I care if it’s 8 times faster for what I need to do. Most people seem to think the new version of the site is significantly faster so…

  171. I live in Europe where this dismissal would be very difficult to justify. I did a six country study on why people “should” get fired and found that among all the reasons given (more than forty) no one mentioned mild criticism as a good reason to dismiss an employee. You can see the article on my personal webpages at:
    (Give me a few hours to get the article uploaded please)

    Good Luck Ms. Park


  172. I am surprised that Friendster terminated your employment for this blog entry! I wish you best of luck in your job hunt. Personally I think they over-reacted.

    Interestingly you touched a sensitive issue with this blog – php versus jsp.

    Architecturally we can safely say java/jsp is better suited for high throughput & high performance website. However as with any technology a lot depends on the architecture of the site, the design and supporting tools used.
    The first no-no in this case is using Tomcat for production system. Yes Tomcat 5.x version are faster than before, however for production I would still go for production quality servlet containers like JRun or weblogic etc.

    I would also think that there were other poorer design decision which lead to the slow performance. What was needed was a performance analysis of the system.
    Unfortunately the management’s normal reaction in such cases is to throw the baby with the bathwater.

  173. Gnome-Girl Says:

    If you start an online company that services are all based on cyber communities, social networking, and any thing else…

  174. guess people cant take the heat! Friendster was sooo stupid when you get fogeys like me writing how silly it was to sack you the word is out and you have more friends than you ever had before. Good luck and God Speed. If you get to the Big Island look me up. Check out my site for pics of the island and stuff!

  175. Delphi Dude Says:

    My My, all this fuss. I use sql server, delphi 5 with it’s native webbroker and handle thousands of users every day with sub second response time. Its the result that counts, not how you get there. I dont care if it’s written in Hershey Bar on Toilet paper. If it works fast, go with it. Perhaps all these levels of technology are what get in each others way requiring ever more intricate implimintations to overcome the previous SNAFU ?

  176. It’s dead easy to start a blog these days, and so we see more people doing it. Once they have a blog, people will talk about anything online — it’s almost as if they don’t realise that anyone in the…

  177. David Q Says:

    Didnt really want to post here — too many entries. Got a project in mind that you might be interested in. Shoot me an email and Ill get in touch with you.

  178. marco Says:

    i think its best to shift again to java by using model 2 or the MVC

  179. inachu Says:

    Hi chingu!

  180. technostan Says:

    I finally have some time to catch up on some of the interesting clippings I’ve saved in Bloglines. Some of this stuff might be old news (i.e. a week old). Wikipedia I missed the whole Wikipedia debate last week but via Joi Ito, there’s a summary to the various discussions. I personally use Wikipedia all the time and I think it’s great for looking up knowledge. I’ve never had to questioned the authority of Wikipedia because like any other encyclopedia, I only use it for quick reference material. One thing I’d like to point out about Wikipedia is its place in the world of academia. Last year, I remember a girl in my history class losing some marks in an essay she wrote because she had used Wikipedia as an academic source. Asking for an explaination, the professor blasted the “academic authoritity” of Wikipedia. On some level, I’d have to side with the professor on this one. Although Wikipedia is an awesome starting point to find keywords to fuel additional queries, I don’t think it’s appropriate to use it in the actual content of an academic paper (yet). What I would love to see is a reputation system so people can gain recognition for their articles. After all, isn’t this one of the components of the higher echelon of academics? I’m sure I’m not the first to think of this and sure enough, a Goggle search reveals this article on ways to improve the Wiki. Numbering System Robin Debreuil wrote…

  181. Hans Uy Says:

    I think both of them have their strengths and weaknesses and it all depends on the kind of site you want…

    but the fact is, there are more pitfalls in architecting java than php…

  182. Pamela Javier Says:

    This is a funny result. I am my self a PHP enthusiast, but in the journal “ACM SIGMETRICS Performance Evaluation Review, Volume 31 Issue 3” there was an article called “A performance comparison of dynamic Web technologies” where Perl, Java server technolgy (also tomcat) and Perl was benchmarked in a labratory environment. It was concluded that Serverside Java outpreformed PHP and Perl by a factor 8.

  183. Romano Says:

    is ASP dying? i don’t see any comment about ASP here.

  184. rose marie Capuyan Says:

    i joy surfing in friendster always

  185. Anon. Says:

    Sorry you were fired. I’m closing my account with Friendster. Who needs ’em?

  186. LOL Says:

    You know what is so funny is that I *just* posted the above #190 message saying “Sorry you were fired…” and it puts it under the “karen”!! Now how much you want to bet that my Name will actually be listed as “Anon.” when I am filling out the form using “LOL.” Am I just a fortune teller or does this site *really* suck? LOL!

  187. Mark Says:

    Fired because of blogging :s
    Thats why I prefer to join sides like linux instead of windows, instead of

  188. Mr. Smith Says:

    Im sorry to hear about you fired. Friendster gone PHP – well its been suffering for a long time. I personally chose – its built with PHP, and whats more is they offer BLOGS for all their members and employees. Its full of features, very clever i must say. Who knows, maybe they’ll employ you? Life works in mysterious ways, so you never know.

  189. Oscar Sierra Says:

    It’s a pity you were fired! I also have a personal blog -who doesn’t in these times?- but signed a NDA agreement when I joined my current employer. They specifically prohibited writing about anything related to work on my website 😦

  190. ren Says:

    PHP are faster and Good and it is an open source and FREE!!! =)

  191. green Says:

    guys, PHP is faster “sometimes”. but are not you people who could think before doing something? don’t you think that “sometimes” plain HTML is an option, “sometimes” – just PHP, and “sometimes” – Java is the only way out?

    why should you necessary scream “PHP is faster”, “PHP rulezzz”, etc.? isn’t that sounds like kids talks?

    once you have situation, you need to have a tool. which one it should be — PHP, ASP, Java, HTML, JavaScript, … (add whatever you want) .. — is only up to you. it doesn’t means that one thing worser than another.

    they are just different.

    and to crown it all — before saying what is faster, you need to compare also PC’s, and web container’s on which all your stuff is running!

    otherway, all such screams are just stupid bullshit. sorry, it’s my opinion.

  192. Roel Says:

    PHP is much much much better than any web programming language, period…..

    The J2EE guy still doesn’t get PHP…

  193. boiboi Says:

    I’ve always find jsp sites to be slow, Take for example, the fact that Friendster is now much faster because of php destroys any pro java argument. yes there are more java sites, but that’s because php is still in its infantile stage. stay tuned for php5

  194. Charles Says:

    Thank you all for discussing in such a rational fashion. The info are extremely useful for me. I am building an online community myself using JSP/MVC/Tomcat. The site is up, but it is still undergoing testing. Without further ado, I’m going to throw in my 2 cents:

    (1) There are many dimensions to scalability: development effort, features addition and modification effort, run speed, run space, operation cost, and complexity growth. And different business needs will determine which dimension is more important. Scenario analysis, business modelling, and so forth will be called for.

    (2) To be rigorous, big O analysis should be performed at each logical module(be it machine, database, database connection, interpreter, application program code, server, OS).

    (3) With graduate level computer architecture education, and real life microprocessor development experience(the good old aplha), performance tuning and measurement for a CPU alone is already tough enough. To measure web application performance using two implementations correctly is a huge project, which I’ll be more than happy to take on if compensated enough (^_^)

    CONCLUSION: Given the fast pace of web technology advancement, I doubt there will be any resources available to do a just job to decide which technology scores the best under different scenarios(like suite of bench marks). The winner will most likely be determined by use/hype/marketing than by true merits.

  195. *^^* Says:

    java is rich dad, php is poor dad…ok?

  196. Anonymous Says:

    too much jargons… hi-tech words…sheeeshhhh… as long as it works…. why bicker over it…

  197. Johnny Says:

    ASP.NET 2.0 will take out all web technologies. So stop arguing about JSP and PHP, use ASP.NET.

  198. ewan Says:

    Friendster… a text file pretending to be a website… hehehehehe..

  199. RobH Says:

    Comments entropy…

  200. Chris Shiflett summarized some discussion about whether PHP Scales (better than JSP). The discourse resulted from a recent switch by Friendster. In his essay, Shifflet included a quote by George Schlossnagle explaining Why PHP Scales – A Cranky, Snarky…

  201. yuriy krylov Says:

    The most important thing to understand is “your problem space”. Both PHP4/5 and Java/JSP may be used for “webapps”. This is a prety vast space. An experienced development team will choose the technologies that will maximize the value/cost ratio in solving the problem.

    A small commerce site is not the same as a trading server that will allow you to trade stocks etc. So even though programatically you “could” do both in PHP or Java it doesn’t mean you “should”.

    Also, scalability is NOT the same thing as how quickly or easily you can hack something up nor how quickly you process the request/response cycle in webapps– although they are all related in sometimes intangible ways.

    Scalability is a measure of performance as your user base grows from 1 to N users. Saying that PHP is “faster” because it is a scripting language as opposed to a compiled language like java is not the same thing as saying that PHP scales better.

    All the java-fiends have to admit that Java is much more complex and software-engineering-know-how specific than PHP is. It doesn’t take much to sit down and hack up an ActivationScript-patterned page that pulls and pushes from a MySQL server. Learning Java/JSP/Struts/Ant/Hibernate etc etc etc is no simple feat. Java deveopment has been an ART form for many years. PHP was intended originally for quick and dirty. This does not mean that both were intended to fill the same niche.

    PHP5 is looking alot like java with a Zend appserver, optimization and lots of open source packages being ported right from java: phing, phrame, etc. Why? Because between the
    -how-to-refactor and php-sit-down-and-hack-something-up-don’t-even
    -defined-but-im-quick-so-pay-me and java is something in the middle. Too complex and business-logic intensive to warrant a structural php implementation that disregards best-practices and “useful” patterns and just not complex enough to warrant the full onslought of java (i.e. super-duper-complex-messaging-hard-on trading software-spanning-multiple-dbs-blah-
    -blah-blah. (But who knows, let’s see how far PHP5 and the Zend engine push it).

    Deciding where your particular problem domain lies takes experience (trial and error or Mr. Ask-me-i-know-more-than-you guy in the next cubicle). I’m not one of those people in most cases but I do know that everything boils down to RISK. How much time=money are you putting in to take money out? Will the business rules change in the near future? Will the features change in the future? How big/experienced is your team? Do you even have a team? Who is the audience of your project? How big is that audience? All of this boils down to risk and investment. Sorry Java-rocket-scientists sometimes java does not justify the risk. Sorry PHP-cultists Java has had much much much more time and resources to get its act together, although props to Zenders nonetheless. It’s not that Java sucks, its just that you don’t know how to use it. It’s not that PHP sucks its just that you don’t know how to evaluate risk and choose a tech best suited for your project.

    On a final note (and this is IMHO). For any project that has the potetial of seeing a lifespan of more than 1 month, or more than 1 developer, or more than 1 release, there is nothing more important than well-organized code that maximizes readability, and minimizes coupling. Use patterns with care (patterns should be applied while refactoring, they are not sprinkles for your ice-cream, add to taste). Oh and MVC is absolutely crucial for web-apps (mind you not webpages) and if you understand the pattern you can choose the implementation that best suits your needs we’re in the middle section again! Also remember that Jakarta’s Struts is a framework implementation of the MVC pattern (among other things) and the two words are not interchangeable. JSF is simply the View component of the MVC and believe you me, it is much easier to port a well structured web-app based on Strus framework to JSF (you just change your View and Controller descriptors, Model stays the same) then it is to sift through and refactor the perl-looking-I-went-to-junior-college-where-i
    -i-contribute-to-open-source-projects code that runs oh so fast. There is no worse torture but again that’s just my opinion 🙂

  202. Forrest Says:

    PHP 0wn3rz Java

  203. I want to know, was it more efficient for a site as big as Friendster to archive dynamic webpages. For example, I see you do it. I’m guess to save processing time correct?

    I’m working on my own site ( and wanted to know from someone who has worked with big and smaller sites.

  204. adrian Says:

    LOLX….frienster is still bascially very slow……very laggy……sometimes all my friendster disappeared for no reason and then the next day all come back…..this is not the first time i experence this……

  205. please fix this page and close the thread. those spammers must pay. i think this is a “really” informative page if we can only delete some awful posts. Ms. Park i wish you good luck too. Drop us a word about your next job. I am sure a hell lot of companies will be scrambling to get you.

  206. donna magsino Says:

    Help! please unblocked friendster site in United Arab Emirates. It’s very unfair why they site blocked it here in Dubai. I have a lot of friends here & around the world & its our 1 way of communication.
    Please do something! =(

  207. mike Says:

    just wanted to inform that friendster here in dubai is the only pass time that im doin, so pls help us not to block this site here in U.A.E especially here in dubai…ciao…

  208. Inna Marie Says:

    Hi, I’m from Dubai. As our kababayan said, this is one of our favorite hobby to browse “”. Can you give me a special link or access to the website that can view the site freely….PLEASE!!!

  209. Karen Says:

    Yea please help us friendster users here in UAE. I just wanna gain access again cos our ISP blocked it!! Friendster is my only means of communication to all my friends abroad. PLEASE DO SOMETHING. 😦

  210. Howdy all:

    Just wanted to throw my 2c in here.

    I’ve done some Java, and worked with Weblogic and some other leading application servers. I’ve also done a fair bit of OO PHP4, and am learning to work with php5.

    A friend of mine, who works for a large Internet tracking company, came over for dinner a few weeks back and we had it out about the advantages of PHP VS the current Java space.

    It was interesting, but in the end I reached these conclusions:

    1) Java is currently more mature than php
    2) Java technologies seemingly “have what it takes” to build scalable systems with less overall hacking and effort
    3) Most PHP implementations for Open Source applications currently do not make good use of the new features of PHP5. It’ll be a while.
    4) The different roots of PHP and Java technologies (sorry, I am lumping a LOT of technologies here) really have lead to vastly different evolutionary paths for the languages.
    5) The Jury is out. It’s too early to be arguing about the merits, as PHP is still very young (and progressing rapidly), and Java technologies are having a crisis of complexity at the moment. Acronimitosis. Ech.

    I believe in PHP. It’s:

    – easy to learn to write

    – cheap to find programmers for

    – easy to throw away if projects fail

    – heading in the right direction

    – is still in the first 1/3 of it’s life cycle as a language

    It’s going to pop even more than it has, and work it’s way into the Enterprise space.

    I personally think Java tech:

    – is overloaded with jargon and projects

    – has some insanely cool technolgies

    – can be slow to implement

    – is probably a little less than 1/2 the way through it’s natural life cycle as a language

    Java (and C/C++) makes for some really kick ass Business Logic Layers after all, but JSP/JHTML/Java Frontend Technologies (IMHO) do leave something to be desired in terms of their ability to rapidly express UI without having to have a Ph.D. The future of the web isn’t in the 1% of high-end applications like Freindster (again, IMHO), it’s in that top 5-10% of sites that include the truly innovative ones.

    Let’s look towards the long term. I’m really excited about putting these technologies together, and I hope that everyone will consider putting down the stick and work together to see what we can build. If this year has shown me anything, we ain’t see nothing yet, and I’ve been at this a while…

    — J

  211. OneZero Says:

    You know, I have been working with PHP for about 2 years, ColdFusion for 4, and JSP/J2SE for the last 1.5. What I have found is that yes, pound for pound PHP is faster in a lot of things, DB accesses are not one of them. In fact, it was faster for me to work with an XML file than hit the database in PHP.

    For scalability, rapid development, OO type features, and code reusability nothing beats ColdFusion. In other words, all Java’s benefits with an even easier syntax and implementation than PHP. With more separation, using CFCs, of the presentation layer from the business logic. Even Microsoft realizes that XML/tag based languages are the future, check out XAML. Use CF and Java, and your projects will be done faster and scale.

  212. kced Says:

    please help us friendster users here in UAE. I just wanna gain access again Friendster is my only means of communication to all my friends abroad. PLEASE help us 😦

  213. Eric Says:

    To get back on j2ee is better than php, the only reply was that the zend engine offer really good php optimisation; yeah, but don’t forget about this :

    j2ee sdk + app server (from Sun microsystem) is FREEEEEEEEE, free like 0$

    Zend cost a few thousands bucks per years.

    J2EE supports netbeans which is again, FREE.
    Zend Studio cost an arm

    And beside, J2EE Runs on OpenSolaris, the most advanced Operating System (zones, dtrace), and it’s opensource, and it does really good.

    Beside, I’m an enterprise programmer. I already did a few projects with php and you will never realise how buggy it is until you got stuck with things such as :

    $var = “bob”;
    echo $var;
    if($var != “bob”) {
    echo “hey”;

    and the result is “bobhey”

    In certain context, php can be really buggy.

  214. […] what other people thought about it, so I did a little searching online. About a year and half ago, Friendster switched to PHP from Java. While developing in Java 6 months go by and no release of any code in that entire time. After the […]

  215. […] blogging. For another thing, by all accounts the particular posts that led to my termination were this one and this one (although feel free to check my archives for any other incriminating information). I […]

  216. […] Um problema parecido ocorreu o e que foi muito polemico. O friendster praticamente inspirou as comunidades on-line como o orkut. Ele foi desenvolvido no inicio em java, mas os servidores não conseguiam aguentar a carga. Depois de tentar de tudo com o java, partiram para reescrever-lo em PHP. […]

  217. […] of it on the initial development decision to use Java as the platform to build Friendster upon and decided to switch to PHP, but it was way too late by […]

  218. Quora Says:

    Are there any examples of companies rewriting their codebases in another language?…

    Although it’s impossible to know all the modules, components, and middleware language stacks of most companies website, a few of them have been public about core language switches: * MySpace went from Coldfusion/PHP to ASP.NET [1] * Friendster went fr…

  219. Quora Says:

    Are there any popular web sites (e.g.Google, Twitter, Facebook, Guardian) using plain Java Servlet/JSP?…

    Today: I can’t think of consumer sites that servlet/JSP for their main technology, since it is not suited for the task. Some sub-sites that typically use Java are the more enterprise or commerce-focused functions, such as online stores and checkout. S…

Comments are closed.

%d bloggers like this: