Architecture models:
1-tier
Monolithic, “all-in-one” model – e.g. clients are “dumb” terminals connected directly to the mainframe.
Problems with the 1-tier model are :
• any change affects the entire system
• vertical scalability only – limited to the physical expansion capabilities of a single server
• single point of failure
• interoperability – limited connectivity
2-tier
Typically composed of multiple clients and a single server; the clients connect to the server over a network :
• client
The client is fat – e.g. implements the GUI, retrieves data from the server(s), performs business logic
based on the data.
• server
Typically a database. Provides a shared data-store for the client.
The server doesn’t typically implement business logic. Later revisions to the model implement some
of the business logic on the server as stored procedures (a.k.a. fat servers).
Problems with the 2-tier model are :
• the business logic may be complex and computationally expensive. Consequently, the client may
require powerful hardware
• client components are tightly coupled, not modular – e.g. a change to the GUI means shipping the
whole application to every client
• data retrieval - each client has to make a direct connection to each server it needs data from. Also,
the results transferred may be large and transferred using an inefficient (and perhaps proprietary)
protocol
• fat servers use stored procedures which aren't very portable.
n-tier
Composed of :
• client tier
Components that execute on the client. The business tier is common to all client types - some client
components talk to components in the business tier directly (e.g. thick clients such as EJB
application clients), others via the presentation tier (e.g. thin clients such as web browsers).
• presentation tier
Provides presentation specific support for the client tier. Acts as a proxy between the client tier and
the business tier. E.g. a servlet accepts HTTP requests from a web browser in the client tier. The
request is translated to a generic business event and passed to the business tier. Responses are
reformatted for presentation purposes (e.g. store result in session, generate HTML redirect for JSP)
and transmitted back over HTTP for display by the web browser.
• business tier
Implemented as business process objects (provide the business logic – e.g. session beans) and
business objects (provide an integrated, objectified view of the data tier with support for automated
synchronization – e.g. entity beans). The application server provides support for security,
transactions, pooling, caching etc. in this tier.
• data tier
Also known as the EIS tier (Enterprise Information System). Typical components include databases,
mainframes, socket servers, etc. Typically components in the business tier access the data tier
abstractly using a DAO (Data Access Object) helper class. The DAO takes care of the specifics of
data retrieval on behalf of the business objects.
Summary:
1-tier : Security and Maintainability?are Good, Availability, Scalability and extensibility are Poor.
2-tier : Mostly Poor, reliability Mixed
n-tier : Mostly Good, serviceability Mixed