The Three Tier Architecture

Chapter: Databases
...Section: The Three Tier Architecture

Now it's time for some honesty. In this course, we're not going to deal with any huge databases.

A faculty member in Physics or Biology might use a standalone DBMS on a personal computer to store and help analyze expermental data. Everything is nice and self-contained on a single processor with a single storage system.

That's not good enough for amazon.com.

A very common architecture for large database installations is called three-tier or three-layer. It distinguishes three interacting, but different, functions.

  1. Web Servers: Processes that listen for client processes, usually over the internet, but possibly a local connection.
  2. Application Servers: These processes implement the business logic of the enterprise -- whatever it is that the system is intended to do.
  3. Database Servers: These processes run the DBMS and perform queries and updates at the request of the Application Servers.

It is possible that all the processes run on a single computer. But in practice, a slew of processors will be assigned to each of the tiers.

The picture (taken from Jeffrey Ullman and Jennifer Widom: A First Course in Database Systems shows how a large database installation might be organized.

A customer might connect to Netflix by typing the URL netflix.com in their browser. Netlix's web-servers then send a page to the customer including forms, menus and buttons, so the customer can explain what they want to do.

The client web browser sends this information to Netflix's web-server and now that web-server has to negotiate with the application servers in the customer's behalf.

Now the application layer implements the business logic of the company. Its main job is to prepare a response to the customer's request as received from the web-server. The web-server process may actually invoke several application-server processes. In our case, the appropriate response to a customer request may be to list information about movies that match the request. Title, actors, price, duration -- that sort of thing. Maybe links to reviews...

In a small system, the application layer may issue database queries directly to the database tier. In the case of large enterprises, like Netflix, there will be several sublevels in the application level. And each sublevel may have its own processes.

The database tier may have several processes, and like the other tiers, these processes can be distributed over many machines. Or it may be just one process on one machine. In any case, the database tier executes queries received from the application tier.


Exercise 3

solo This is an exercise that asks you to identify a problem that a large corporation might have, and to suggest in which tier we need to address and fix the problem. No code please. Just write up your solution in your lab notebook.

Universal Widgets Inc has been a US based corporation for decades and, until recently, has done all its business with customers in the US. The database contains information on inventory, quantities of individual items, price in dollars of individual items, shipping costs etc.

Now they are on the Web. Customers elsewhere in the world discover Universal Widgets Inc and want to order.

Can you anticipate any difficulties that arise because of this new international clientele? Which layers of your architecture are you expecting to have to modify? Which layers would you prefer not to have to modify? What are the associated costs?

Think through the problems and write a brief report to the CEO of Universal Widgets detailing your analysis and suggesting solutions.



rpricejones@wooster.edu