RSS feed

Linkedin Profile

Tags:
economy
programming
seattle
things that bug me
wall art

Posts by month: 12/08 (2)
10/08 (2)
08/08 (1)
06/08 (2)
05/08 (1)
03/08 (3)
02/08 (1)
01/08 (2)
12/07 (2)
11/07 (1)
07/07 (1)
05/07 (2)
02/07 (1)
01/07 (1)
12/06 (1)
11/06 (1)
10/06 (1)
08/06 (1)
07/06 (1)
06/06 (2)
05/06 (1)
04/06 (2)
02/06 (1)
01/06 (2)
12/05 (3)
11/05 (2)
09/05 (5)
08/05 (5)
07/05 (7)
06/05 (3)
05/05 (6)
04/05 (8)
03/05 (7)
02/05 (7)
01/05 (6)
12/04 (2)
11/04 (3)
10/04 (5)
09/04 (3)
08/04 (5)
07/04 (5)
06/04 (4)
05/04 (4)
04/04 (9)
03/04 (4)
02/04 (3)
01/04 (5)
12/03 (1)
11/03 (14)
10/03 (8)


Confused about 3-tier architecture?
2004-03-21

Fact: All web site architecture can be sketched as three blobs labelled “presentation”, “business logic” and “data access”. Functionality is strictly partitioned between these blobs, and they are deployed across distinct machine tiers.

OK, so this might not be true of every system, but it is a pretty common approach.

The problem is that this high-level view isn't very good at answering some very sensible questions:

Do we have to implement ALL business logic on the middle tier? Surely it is more efficient to stick it close to the presentation process? Why are we taking a performance hit to go through the middle tier to access the database? What about putting business logic in stored procedures?

Rather than sticking with the (admittedly short) description above, I like to think of 3-tier as a collision of a few patterns:

Scale out - So why don’t we use one big machine? Scaling out allows us to increase our non-database processing linearly with cost. We offload as much processing as possible to this cheap processing resource, and try to minimise the usage of our expensive scale-up database resource. This also gives us cheap fault tolerance across our scale-out machines.

N-layer logical architecture – Layering is a fundamental organising principle of software. In this case, the crucial distinction is that logical separation doesn’t imply physical separation.

Remote application tier – Lastly, a security pattern. If we are already scaling out our non-database functionality, why partition our processing again between web and application servers? The web is a hostile place, and the remote application tier is an attempt to put as much distance as possible between our sensitive data and the web. So by partitioning a web application into several physical tiers, we can put multiple firewalls in place to protect that sensitive data.

Back to weblog