ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  The PHP Scalability Myth
Subject:   Two-tier vs. three-tier
Date:   2003-10-17 12:12:03
From:   anonymous2
To begin with, the author apparently doesn't understand the reasons behind three-tiered architecture. It has nothing to do with "code factoring". It has to do with scalability. Not performance. Scalability. They are completely different issues, especially in the context of complex business applications.


In enterprise applications, it's not good enough that your end-to-end performance be good, it's also important that those machines service requests quickly, which is where a two-tiered architecture fails (and which is why people came up with the idea of a three-tiered architecture in the first place). This is the difference between performance and scalability.


For instance, suppose you get a sudden flood of requests coming in. Your webserver might be able to handle the number of incoming connections, but now, since all of the non-DB processing is happening on the same machine, you become CPU-bound, so that, even though the web server can accept more connections, it can't get enough of the CPU to service all of the requests it has.


Now, instead, think of a three-tier system. The web server handles the request, and passes off to another server (load balanced on the back end) to do the business processing (we're assuming here that the business processing is substantial compared to the display processing, which is usually the case in an enterprise context). Now, the web server can continue accepting requests up to its networking capacity, but it can offload its business processing onto *multiple* other machines if needs be, so that each request can happen faster, which is what the end user perceives as "better performance".


*That's* scalability. And that's what you won't achieve with PHP, or any two-tier based language. Now, if you want to talk about adding hooks to do remote procedure calls to PHP, or some other scripting language so you *can* do three-tier architecture, then we can talk about scalability (at least, scalability for an application that has non-trivial business logic). Otherwise, they are, and will continue to be, inadequate for complex business applications, because they aren't scalable. Period.


--
Jack Lund
STA Group, LLC


1 to 3 of 3
  1. Two-tier vs. three-tier
    2003-12-12 09:11:13  anonymous2 [View]

  2. Two-tier vs. three-tier
    2003-10-17 12:39:26  anonymous2 [View]

    • Two-tier vs. three-tier
      2003-10-17 12:53:13  anonymous2 [View]

      • Two-tier vs. three-tier
        2003-10-17 20:09:46  tarrant [View]

      • Two-tier vs. three-tier
        2003-10-17 17:28:59  anonymous2 [View]

  3. Two-tier vs. three-tier
    2003-10-17 12:18:50  anonymous2 [View]

1 to 3 of 3