Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. ×

Building Scalable Web Sites 124

briandon writes "It's not a step-by-step guide (and doesn't claim to be one), but Building Scalable Web Sites is the closest thing available to a nuts-and-bolts look at managing the technical aspects of doing a Web-based startup. There's lots of code inside, but the book isn't built around a single, extremely contrived, case study like an online wine store. Instead, most of the chapters follow a general pattern: a topic (like bottlenecks in your application and platform, scaling, or monitoring) is addressed and some rules of thumb that describe the way that the author feels things should be done are set forth and explained, with lots of very specific hints and factoids mixed in along the way. Tools for other languages (in most cases, Perl) are mentioned in passing, nearly all of the code snippets are in PHP. MySQL 4.1 is the basis for most of the database-centered material." Read the rest of Brian's review.
Building Scalable Web Sites : Building, Scaling, and Optimizing the Next Generation of Web Applications
author Cal Henderson
pages 330
publisher O'Reilly Media, Inc.
rating 9/10
reviewer Brian Donovan
ISBN 0596102356
summary If you've been kicking around the idea of doing a Web startup, then you should definitely give this book a read.


Henderson's resume, which can be found on his personal website, indicates that he joined Ludicorp about a year before they shut down GNE, their Web-based roleplaying game, to focus on Flickr (which had originally begun as an ofshoot of the game) and it's his role as web development lead at Ludicorp that led to the inclusion of the "The Flickr Way" sub-subtitle that runs diagonally across the upper right corner of the book's front cover.

The five-page-long first chapter sets the stage for the rest of the book with section headings that are all questions: "What is a Web application?", "How do you build Web applications?", "What is architecture?", and "How do I get started?".

Chapter two, "Web Application Architecture", begins with Henderson drawing an analogy between a web app and a type of multi-tiered dessert known as a trifle - the sponge cake at the bottom of the dish is the database, the next layer up, jell-o, is the business logic, and so on. The black and white image in the text is identical to the color image included in a slide from an eight-hour workshop that the author gave in San Francisco titled "How We Built Flickr". Having read the book and some reviews of his workshops and looked at the list of talks on Henderson's site (some with Powerpoint decks for download), it seems likely that a lot of the ideas expressed in the book were developed over an extended period of time through repeated presentations.

Next up are the considerations around development environments, beginning with a 3-point list of guidelines for building small-scale web apps up into big ones: use source control, have a one-step build process (literally, if possible, a single button), and track bugs (as well as non-bug items like features and support requests). Readers get to feast their eyes on a cropped screenshot of Flickr's build control panel (two buttons, "perform staging" and "perform deployment", to match the last two steps in the release sequence in an HTML form). For small teams, the author is in favor of allowing multiple developers to trigger releases and he suggests several ways of trying to keep that workable. In version control, Subversion gets the nod and, though no bugtracking tool is singled out as the best, FogBugz garners the highest praise ("extremely effective") and has the shortest list of "cons". The author never comes out and says what the Flickr / Flickr-Yahoo team uses in either area, however.

Chapter four is the most readable introduction to internationalization, localization, and Unicode that I've seen up to this point. MySQL's currently incomplete implementation of UTF-8, sarcastically referred to by some as "UTF-7½" (Google for it), is mentioned in enough detail that a reader can decide whether or not it's likely to be an issue for their app. The book as a whole is packed with little nuggets of information like that - things you might not have otherwise been even peripherally aware of until they bit you.

Input filtering and strategies for avoiding building cross-site-scripting and SQL injection vulnerabilities into your app are addressed in a chapter on data integrity and security that shows the same attention to detail as the rest of the book. The section on UTF-8 filtering, for example, features a three-way benchmark of UTF-8 validation techniques (using regular expressions, iconv, and ord()) and the merits of each approach are considered.

The coverage of handling emails programmatically in chapter six is also quite good. Henderson does the basics and then delves into a number of possible pitfalls in considerable detail. The salient aspects of the TNEF (media type application/ms-tnef) format, used by MS Outlook for attachments and metadata, for instance, are explained and pointers are given to open source TNEF parser implementations. I also got a lot out of the section on dealing with email from wireless devices like mobile phones, titled "Wireless Carriers Hate You" (there's that dry British wit again).

The second half of the book (chapters seven through eleven) focuses more on scalability. It's also where you'll find the most material on using MySQL, including but not limited to query profiling and optimization, a discussion of the merits of denormalizing once you begin to reach a certain scale, and a comparison of the different MySQL backends. There's an entire chapter devoted to finding and dealing with bottlenecks - how to determine whether your app is CPU-bound, I/O-bound, or context-switching-bound and what to do about it. The chapter on scaling begins by debunking the "scaling myth" (but he actually tackles several misconceptions at once - namely that scalability is synonymous with speed, that scalability is a byproduct of having written your app in Java, etc.) before getting into vertical vs. horizontal scaling (buying more powerful and expensive servers vs. adding more cheap cheap servers), load balancing, and more. Monitoring (both of web stats and your application itself) and APIs (RSS/RDF/Atom feeds, mobile content delivery formats like WAP and XHTML mobile, and REST/XML-RPC, and SOAP Web services) both get chapters of their own.

Henderson's sense of humor is evident throughout the book, but not in the annoying overly cutesey way that made me want to toss "Extreme Programming Installed" into the circular filing drawer. In the section on software interface design (where he means the interfaces between the layers of the trifle), for example, there's a "Web Application Scale of Stupidity" that places "sanity" in the center and OGF (one giant function) and OOP at the extremes. The process of separating web app logic from presentation is broken down into 3 steps: separating logic code from markup, splitting the markup into per-page files, and moving to a templating system. He closes out the chapter with a breakdown of the hosting, hardware, and networking issues involved in serving up web apps.

Technically, I think that Building Scalable Web Sites is 100%. There were just a few niggling flaws. Two dates given (both on page 155), 1990 for the creation of libxml and 1995 for the design of XML-RPC, are incorrect and I spotted a handful of grammatical mistakes (probably proportionately fewer than in this review) that I've already submitted, along with the date mistakes, as errata through the form linked from the O'Reilly catalog page for the book.

Additionally, though the cover does say "The Flickr Way", you won't find many sentences that begin "At Flickr, we [...]". Aside from the "Rolling Your Own" section in chapter seven describing some custom middleware and a protocol that they whipped up for moving files around within their system, there aren't a lot of explicit details about the way that Flickr operates in the book. You'll actually get more insider info from Tim O'Reilly's "Database War Stories" entry regarding Flickr, which is based on Henderson's answers to questions posed by O'Reilly, than from this book.

If you'd like to get a feel for Henderson's style, chapter five ("Data Integrity and Security") is available as a PDF on the O'Reilly catalog page for the book and Henderson has also put some articles online (all PDFs, not much overlap with the material in BSWS) at his website.


You can purchase Building Scalable Web Sites : Building, Scaling, and Optimizing the Next Generation of Web Applications from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
This discussion has been archived. No new comments can be posted.

Building Scalable Web Sites

Comments Filter:
  • by _PimpDaddy7_ ( 415866 ) on Wednesday July 26, 2006 @03:29PM (#15786335)
    It's not a real book on "Building Scalable Web Sites" unless there's a chapter titled :
    "Preparing for Slashdotting: Burn, Baby, Burn" ;)
  • PHP and Industry (Score:4, Insightful)

    by crnbrdeater ( 861451 ) on Wednesday July 26, 2006 @03:44PM (#15786435)
    All my personal sites plus all my side contracting sites run on LAMP.

    I really enjoy working with PHP but...do a search on any tech job board and you will find all two job openings for people with LAMP experience. Embarrassed to say it but I went out and learned ASP.Net/C# so I could make a living.

    I realize there are VERY large PHP/MySQL site out there but I haven't had that many opportunities to scale a PHP app in a commercial environment. I wonder how many full time PHP developers there are out there and how many of those work on enterprise level websites. Can't be that many can it?

    (Perhaps we never see these types of openings(LAMP) because developers are so happy with their job that new positions rarely open - heh)
    • by suggsjc ( 726146 ) on Wednesday July 26, 2006 @03:55PM (#15786509) Homepage
      Or...could it be because the LAMP sites don't need to continually add new developers?

      One of the reasons that you don't find openings specifically looking LAMP experience is probably because of "the right tool for the right job" and large scale sites aren't going to use strictly LAMP or any specific architecture, instead a mix of tools. Also, large scale sites will probably want people for specific tasks (each aspect of LAMP indivudually) instead of a jack of all trades.
      • Ok. forget LAMP. Do the same search for jobs that require PHP as the primary language. Again just a handful. Normally when you see PHP is at the end of a long list of random technologies. You know,"Must be an expert in Java, C++, ASP.Net, COBOL, COM. Also useful to have experience with PHP and PERL."
        • I may be flaming here...but IMHO ASP/C# (i.e., Microsoft) is not the way to go for developing web sites - same thing with JSP. Object-oriented is just not necessary for most things on the web. Especially when you use a front-end to develop your HTML/XHTML...that produces some real crappy HTML - and it relies on Javascript/JScript for functionality, which is BAD.

          And the Microsoft stuff is not made to be portable. Of course you have things like Mono, but PHP, Perl, and Python are designed with portability.
          • by drinkypoo ( 153816 ) <martin.espinoza@gmail.com> on Wednesday July 26, 2006 @04:59PM (#15786863) Homepage Journal
            Object-oriented is just not necessary for most things on the web.

            you do realize that for most people, non-OO vs. OO largely boils down to replace(mystring, "foo", "bar") vs. mystring.replace("foo", "bar"). (Whether that's actually correct syntax in any language is another discussion.) You don't have to program in an OO manner just because you're using an OO-capable language.

            With that said, why wouldn't you want to do OO? It's highly useful in a web environment, especially since we tend to think in terms of objects on pages anyway, even if we mean something slightly different by "object".

            • by cartel ( 845256 )

              you do realize that for most people, non-OO vs. OO largely boils down to replace(mystring, "foo", "bar") vs. mystring.replace("foo", "bar"). (Whether that's actually correct syntax in any language is another discussion.) You don't have to program in an OO manner just because you're using an OO-capable language.

              I forgot about that. Maybe it's good for small things like that, but with web sites (unless you decide to use Javascript and make it interactive) you generally don't have the need for objects (i.e.,

              • well in my website engine I have the Core object, that does the work of parsing the request, the Page object, that is used as a parent for most of the other objects. Database is another object (so that I can use same code for pages that are based on differend DBs with only small changes in SQL). Template is an object. Then there are the objects that inherit from page - eg. a Poll object handles everything poll related, a news object handles posting/displaying of news (and comments). A gallery object, a For
                • I guess I should look into that. What language do you use when you do OO?
                  • This model has been implemented in Java (using servlets) and PHP5
                  • Just FYI all this is quite normal... For instance Microsoft's ASP (which supports any language you can plug in as ISAPI, but I'm using Jscript/ECMAscript) provides you with session, database connection, response, and other objects. When I got here, the website was already running on IIS, and getting anything changed would likely have been a nightmare, so I just went ahead and started learning ASP and Jscript, neither one is that hard except that the ASP documentation is poop (especially for ADO, which you n
              • I'm curious though. Besides working with strings, can you give me example of some objects (OO objects, that is) you might have in a normal web page?

                session objects for example. used to store things across pages. request objects, used to retrieve properties from the client (ie user agent) and for retrieving parameters. it all boils down to: what is your preferred kind of abstraction? for only dynamic pages, the paradigm does not really matter, but when it comes to real server applications where the html s
              • Maybe it's good for small things like that, but with web sites (unless you decide to use Javascript and make it interactive) you generally don't have the need for objects

                This is oposite of the truth. OO gains more and more value for larger sites because you benefit from resusable code more and more. All "business logic" is best encased in objects.
                • Point taken.

                  What about using plain-old functions for the business logic and putting those functions in their appropriate library files? How is OO on a web site any better than this, besides possible naming conflicts?

                  For example: security-specific functions could go into a "security" library file, generic functions could go into a "general" library file, page-specific functions could go into a "pages" library file. Then you could do the same with business logic functions that do all your calculations.

                  Do you
                  • No, this is not the same. First thing's first, objects are based on classes. What this means is that you can have several objects running in your program, sharing the same code. Second, the internal state of the objects can be very complex, however, you do not need to worry about it when using the object, since you are presented with a simple interface. Third, since having an internal state means it is completely isolated from the rest of the program, management and maintenance of complicated abstraction is

                    • First thing's first, objects are based on classes.

                      Not necessarily. Object-oriented languages do not necessarily have any concept of "class". For example, you can use JScript for server-side scripting with ASP. JScript is an ECMAScript (JavaScript) implementation, and as such, is a prototype-based object-oriented language not a class-based object-oriented language.

              • In the page, I can't think of much, unless you're doing some AJAX-y stuff and want to keep the DOM in memory so you can manipulate/transform it. If you're trying to be scalable, though, you're probably not doing much client-side, the bulk of your work is going to be done on the server, and that's where OOP really helps out. I think Java actually suffers from a surfeit of web frameworks (I've seen "analysis paralysis" set in when teams try to evaluate a few to figure out which is "the best one"), but they'
                • Well that's some good info. I will keep those things in mind. I bought a JSP book a couple months ago thta I haven't looked at too much yet, so I'll look at that.

                  How long, might I ask, does it take on average for you - using JSP in the way you said - to develop a basic web site, say one like this one [advancedairnow.com] where, in addition to the normal company content, it lets you fill out an order form or send emails via a form (it has about 10 - 12 pages)?

                  • If you're up to speed with a basic web framework (e.g. Struts), doing the basic development for a site like that would take a day or so (less if you have a previous project you can cannibalize). That's all the programming; fighting with the designer to lock down the design and codify the CSS and make it all look pretty will take another week (at least!). Seriously, though, if you have a good designer who can mock stuff up in HTML and write the CSS, a couple of weeks should be plenty of time. That doesn't
              • This may be the greatest troll of all times. Here's an object you have in most sites: User.
                • But even there (I assume this stores either permissions or preferences) you could have session variables that are associative arrays rather than objects.
            • you do realize that for most people, non-OO vs. OO largely boils down to replace(mystring, "foo", "bar") vs. mystring.replace("foo", "bar").

              If that is the case, it is a depressing statement about the current quality of developers.

              The advantages of OOP have been very well researched and understood for nearly 30 years. It is unquestionably a major advance in software development, with relevance to all areas, including websites, allowing re-use, encapsulation, isolation and testing of code (such as, for exam
              • The advantages of OOP have been very well researched and understood for nearly 30 years.

                Well, the so-called "advantages" of OOP have at least been well propagandised for at least some of the last 30 years. :)

                It is unquestionably a major advance in software development, with relevance to all areas, including websites, allowing re-use, encapsulation, isolation and testing of code [...]

                None of those concepts you mention have anything in particular to do with OOP. And you shouldn't really be terribly surp

          • Depends. Code behind files really help seperate the logic from the display. If you use the built in data readers and such you do rely on the ASP.Nets built in javaScript functions but that is no way to build high demand sites. We end up not using many of ASP.Net's built-in front-end features because of performance reasons.

            While your comment about OO for front-end stuff is true most of our business is back-end processing. The website itself is just a pretty front for all the work that is being done behin
            • One of the things I really don't like about Microsoft is that they're way of doing things is not following standards (i.e., not ones set by them). What Microsoft likes to do is corrupt good things by permeating them with their own extensions, then people get used to them and it corrupts the original way of doing things. For example, I heard that Microsoft is going to be providing MySQL functionality in the future (in Office or Visual Studio).
            • Right or not most large companies prefere MS over OSS.


              huh?!
              flickr, slashdot, google, myspace, amazon, delicious, youtube, ebay... all unix.
              who uses MS? microsoft.com?
              • Every airline, every bank, every govenrment agency, every healthcare org, every big company you can think of uses proprietary software and languages instead of OSS.

                (yes, it is a generalization, just like the one in the parent assuming 8 web companies comprise "most large companies")

                • Every airline, every bank, every govenrment agency, every healthcare org, every big company you can think of uses proprietary software and languages instead of OSS.

                  (yes, it is a generalization, just like the one in the parent assuming 8 web companies comprise "most large companies")

                  Well, most large corps do indeed use Windows in some areas. Usually on Desktops.
                  But "every big company you can think of uses proprietary software and languages instead of OSS." is just wrong.
                  Hardly anyone uses windows for critica

              • Not to nitpick, but MySpace very famously runs Windows [netcraft.com]. It was developed in Cold Fusion and was later ported to some sort of CF/.Net hybrid.
    • Re:PHP and Industry (Score:5, Informative)

      by truthsearch ( 249536 ) on Wednesday July 26, 2006 @04:36PM (#15786737) Homepage Journal
      *raises hand*

      My company creates very large sites with LAMP. We also do Python, Flash, etc. so it's not because we only know PHP. If you don't see the job postings it's for one of 2 reasons: you're looking in the wrong places; or the jobs are largely found by networking and other methods.

      Large financial companies will find developers through job posting sites and head hunters. These companies usually develop on commercial platforms (.NET, websphere, etc.). But large web sites are usually owned by relatively small companies who use more networking and direct contact with open source developers.

      PHP and MySQL are quite capable of running large web sites. They were not created with large scale in mind, however, so there are special considerations you need to keep in mind. I don't recommend it for every lage site, but in the right situations it works.
      • Re:PHP and Industry (Score:3, Interesting)

        by ukpyr ( 53793 )
        To add emphasis to the "best for the job" approach

        We are about to move from a LAMP environment (which we are happy with, I made it!) to a Java enviroment. Why? Because we are about to start developing a VERY complex product that would be unpleasant to manage in PHP. There is nothing wrong with PHP, there is nothing wrong with perl. Heck, there is nothing wrong with running BASIC programs and naming them with a .cgi extension. If all that's happening is your serving up some vacation photos randomly.

        That's ki
    • Heh. Funny that you should say that, given that my last two jobs involved (among other things) building Really Big web apps using LAMP for places like Dell (internal but vast amounts of data and traffic) and Dun and Bradstreet (publically facing information service that was frequently in the top 500 busiest sites according to alexa, for what their stats are worth). I know we weren't alone in those projects, either. It really depends on where you are looking, different cities have vastly different charact

    • The problem of scalability is language independent. You end up finding that your bottleneck is your database where most of the complex logic is happening. The main things that make sites scalable is caching whats on a disk to memory and having lots of disks for when you do hit them. These are the real bottlenecks and will always be because the slowest part of a of a PC, is hard drives.
  • by confusednoise ( 596236 ) on Wednesday July 26, 2006 @03:44PM (#15786436)
    ...but I really can't take any book seriously titled "Building Scalable Web Sites" that explains itself using PHP and mySQL. I know PHP/mySQL have their place but I just don't think of them as industrial strength.

    No doubt there will be multiple posts following to tell me how wrong I am, but that's how I see it.
    • Another thing to note: If you are in charge of "building a scalable website", and you do not know how to "build a scalable website" and thus resort to reading a book entitled "building scalable websites", then you should probably not be "building a scalable website."
      • by Anonymous Coward
        ...clearly an ignorant statement. There are a LOT of people, myself included, who are the sole web developer (or a member of a small team) for a company or organization that all of a sudden find themselves having prepare a scalable site. In my case it's a university lab and we now have more hardware to serve our data analyses applications that are being developed in-house. One server works fine as long as you only have a small number of people accessing data, but once the project begins to grow there needs
    • Your opinion is shared by many... but see this other post on Slashdot [slashdot.org] for my response.

    • ...but I really can't take any book seriously titled "Building Scalable Web Sites" that explains itself using PHP and mySQL. I know PHP/mySQL have their place but I just don't think of them as industrial strength.

      Look, you're either going to use PHP or you're not. If you are going to use it then this book probably will come in handy. Hey, it's not like the author is talking out of his ass on this one. Flickr is bigger than probably anything you or I will ever work on. My biggest problem with PHP is the

      • Beyond that, I consider the language a little watered down

        My problem with it is that it has no reason to exist. It's basically a fucked over version of perl, down to some of the syntax, but since it's an exceptionally pathetic replacement for perl, I have to wonder what they were thinking. Instead of writing the Zend script engine, they could have been using perl.

        It's not that perl is the ultimate language or anything, but websites are text, and perl is good at mangling text. Plus, CPAN makes PEAR lo

        • And perl is even faster [debian.org] than PHP in most situations - if only by a small margin.

          I guess the main reason everybody uses PHP is because, well, everybody else uses PHP.

          Perl just doesn't have the ease of "just drop your .php file into docroot" nor an established, ready to go
          "build a website in 3h" framework like ruby-on-rails.
          To get decent results with perl you need not only some intimate knowledge of the perl-language itself
          but also a pretty good idea of how a webapp (or even "servlet engine") smells from
          the i
          • 1) Mod_perl
            2) FastCGI
            3) FastCGI or a daemon process using Apache2::* to integrate with Apache as a in-any-capacity servlet engine.

            You use these to create idioms for how your cgis handle requests.

            Then you move on to your Object persistance, Session handling... (may I suggest memcached?)
            And you have choices there.

            I guess that's what makes Perl nice in this sense... you can pick and choose from all different parts and put it together how you feel comfortable.
            You can use HTML::Inline or Mason or SimpleTemplates
    • by PornMaster ( 749461 ) on Wednesday July 26, 2006 @04:23PM (#15786651) Homepage
      Having read (and enjoyed) the book... despite using PHP for the examples, there's relatively little dependent on PHP in the text. This isn't a "write really fast PHP code" book. It's about designing systems and process instead of just a web site. It's about setting things up in a way that they'll be maintainable, and you won't have hogtied yourself by putting the logic and the HTML together. It mentions the importance of defining a coding style, whatever that is, so when you have a bunch of developers, there will be consistency... and that the choice of style isn't as important as defining one.

      There's lots missing still... and the long focus on unicode, localization, etc is a bit tedious to get through... but overall, it's a book that I wish that people at $WORK were forced to read.
    • If what you are really after is an iron-clad, explosion proof, enterprise scaled, industrial strength web application where any down time result in horrendous lose of revenue; your not going to grab PHP/MySQL of the shelf and run with it any more than you are going to grab anything off the shelf and run with it. The bottom line will always be a well designed and coded application connecting to a mid-level database on commodity hardware will out preform the best database running on the best hardware when the
    • but I really can't take any book seriously titled "Building Scalable Web Sites" that explains itself using PHP and mySQL. I know PHP/mySQL have their place but I just don't think of them as industrial strength.

      Flickr is the 41st most used website [alexa.com] in the world, so scoff at your peril. And I say that as a heavy OO guy who does a lot of Java work.

      I've seen Cal's day-long presentation that appears to have been turned into this book. He's very smart, and has done great work making the technologies suit their ne
  • This was mentioned in Rich Bowen's excellent lightning talk [drbacchus.com] and is listed as "experimental" in the Apache 2.0 docs but as an "extension" in the Apache 2.2 docs [apache.org]. Anyone have experience with this? Seems very tweakable...
  • by zigamorph ( 991245 ) on Wednesday July 26, 2006 @04:04PM (#15786560) Homepage
    Without any caching the M in LAMP quickly becomes a bottleneck.
    • Without any caching the M in LAMP quickly becomes a bottleneck.

      Don't be silly. Everyone knows LAMP stands for "Linux, Apache, Machine code, and PostgreSQL". You aren't going to tell me my hand-assembled Apache module is a bottleneck, are you?
      • Don't be silly. Everyone knows LAMP stands for "Linux, Apache, Machine code, and PostgreSQL". You aren't going to tell me my hand-assembled Apache module is a bottleneck, are you?

        In all likelihood, yes it is. Doing assembly by hand means that you're forced to use your time for dealing with low-level optimizations, and therefore don't as much time to perform high-level ones than you would if you'd use a higher level language.

        Apart from this, a hand-assembled module myst be re-optimized for a new proces

  • by Anonymous Coward
    http://www.aceshardware.com/read.jsp?id=50000347 [aceshardware.com]

    PHP just can't cut it.
    • by warith ( 121181 ) on Wednesday July 26, 2006 @05:18PM (#15786943)
      "PHP just can't cut it"?

      Um, care to explain just what in the hell that statement is based on, since the article you linked doesn't even mention PHP? It compares different webservers and cache settings. Differences in programming languages don't even enter into it.

      Here's an article on scalability that's actually relevant to PHP, a case study about Digg [oreillynet.com].

      Conclusion:

      "It turns out that it really is fast and cheap to develop applications in PHP. Most scaling and performance challenges are almost always related to the data layer, and are common across all language platforms. [...] There is simply no truth to the idea that Java is better than scripting languages at writing scalable web applications. [...] it just isn't true to say that PHP doesn't scale, and with the rise of Web 2.0, sites like Digg, Flickr, and even Jobby are proving that large scale applications can be rapidly built and maintained on-the-cheap, by one or two developers."
      • by Anonymous Coward
        So, if PHP is scalable, why is Digg so painfully slow? Seriously, if I open Slashdot (Perl) and Digg (PHP) side by side, I can read about five Slashdot stories and all the 5-rated comments in the time it takes Digg just to start displaying the first page.

        You can't blame the hardware. Scalability is about not needing to keep throwing hardware at the problem...
        • "So, if PHP is scalable, why is Digg so painfully slow?"

          Well, as clearly identified in both the article and the quote I provided, all the scalability issues they encountered were related to their DATABASE LAYER. So my first guess (based on this case study) would be that Digg's database architecture is still inferior to Slashdot's, instead of a knee-jerk condemnation of PHP. YMMV.

          "Scalability is about not needing to keep throwing hardware at the problem..."

          Wrong... scalability is precisely about the abilit
        • There are so many factors that determine the scalability of any given
          platform. Making a roundhouse remark like that is, well, painful.

          I've had no trouble at all tweaking an Apache/PHP install so that 450 requests
          per second, including a db handle to mysql for each, doesn't even pop top over
          20% overhead.

          I've seen tons of LAMP installs where PHP was compile with every bloody extension
          under the sun when only a handful were needed. Slow 7200 rpm ide disks. Lack of
          ram. Poorly tweaked apache installs. Literally, a
          • There are so many factors that determine the scalability of any given
            platform. [...] I've seen tons of LAMP installs where PHP was compile with every bloody extension
            under the sun when only a handful were needed. Slow 7200 rpm ide disks. Lack of
            ram. Poorly tweaked apache installs. Literally, all kinds of reasons.

            PHP scales quite well, as does MySQL and Apache.

            Exactly... PHP itself is rarely, if ever, any sort of bottleneck. I've never really seen a webapp that wasn't I/O bound in some form or another, unl

        • Slashdot was slow when it was launched back in the day. I remember when the first story or two got over 100 comments and all hell broke loose on the site.

          kashani
    • Did you happen to notice the year that was published? Is this going to be relevant 3.5 years later?
  • by Qbertino ( 265505 ) <moiraNO@SPAMmodparlor.com> on Wednesday July 26, 2006 @05:23PM (#15786969)
    Knock it off allready.
    I've had enough of the eternal Dimwits constantly bashing this or that with "MySQL not scalable" "PHP not scalable", blablabla.
    PHP has arrived in the enterprise market. That's a fact. Yes, I know, Java has been there for 8 years, PHP is messy and quirky (so is Perl), MySQL isn't a DB, we've heard it all before.
    In case you haven't noticed: PHP 5 is out. It's a full blown, mature PL and arguably the 400 pound gorilla of SSI solutions with a long history. MySQL 5 is out aswell. It's a full blown DB and comes with tons of free x-platform admin and design tools that make building the outline of a large webapp a walk in the park and thus scares the living daylights out of Oracle and IBM. You may have noticed IBM virtually giving their DB2 away for free (beer) since just a few months ago. Guess how that happend.
    Imagine someone would come along and tell you that large-scale webapps in Perl are a pipedream. Not to far-fetched in this context, no? And what about slashdot and kuro5hin?

    PHP is as good a technology as any other in use when it comes to building large webapps (point in case: www.rubyonrails.org/index.php/ ). Industry strength PHP Frameworks are poping up left [symfony-project.com], right [cakephp.org] and center [zend.com] and other places [binarycloud.com] like mushrooms after the rain. And as for MySQL "not being ready for large, scalable apps" - you're being silly [mysql.com].
  • It's not the best in the world but I still enjoy tinkering with http://wsframework.sf.net./ [wsframework.sf.net] The theme is BAD but I'm working on it!
  • I'm a noob at this, but isn't the only factor in website speed the speed of the websites internet connection? I'm sure dinkySQL, mySQL, and MS SQL can all handle 10 simultaneous DSL clients connecting at 768k...and 768k * 10 is 7Mbits...those above programs can probably handle 100 or 1000 users, although this increases the bandwith usage to 70Mbits and 700Mbits/second...for the price of those connections, can the website be written in any language with any database, and the speed difference could simply be
    • I'm a noob at this, but isn't the only factor in website speed the speed of the websites internet connection?

      No, it isn't. From personal experience, many commercial websites require pretty complex queries for each customer, which may require significant calculations and searching of many thousands (or hundreds of thousands) of records (all within a single transaction). If this is the case, and you have many thousand active users, the database is the slowest factor. Really high-load websites often use com
  • I see all these people bash PHP claiming this that and the other.

    Security: PHP isn't the problem, poor implementation is the problem (the coder) PHP's only hand in that is easily giving you the ability to do it. All languages are dangerous to the security ignorant.

    Slow: PHP can be slow. So can straight C. If you know what your doing, PHP can be blazing fast. There is a reason that so many large companies are picking it up. IBM, Oracle, Yahoo, etc...

    MySQL gets the same treatment sometimes.

    Both of these
  • "Tools for other languages (in most cases, Perl) are mentioned in passing, nearly all of the code snippets are in PHP. MySQL 4.1 is the basis for most of the database-centered material."

    I somehow thought that this was about building serious webapps for serious companies (i.e. the ones with the money to create scalable infrastructure). The semi-last sentence in the write-up killed all that. I have a title for other editions in the same series: 'Using legos to build skyscrapers', or 'Building scalable rocke

RADIO SHACK LEVEL II BASIC READY >_

Working...