Once you decide what programming paradigm, language, and development tool you are going to use, you are ready to gather requirements and develop a software architecture. At a very high level, a software architecture defines how different parts of the project are going to be mapped to different hardware components . Some of the more common software architecture types are introduced below.
A host-based software architecture, also referred to as a one-tier or single-tier architecture, consists of one or more software processes executing on a single host computer. A one-tier architecture could run on as small a computer as a PC or as large a computer as a mainframe. One-tier architectures can simplify a project as all inter-process communication is limited to a single machine. However, not all host-based software architectures are small simple programs. Some of the largest, most complicated software programs ever written are mainframe applications with one- tier architectures.
PC-based one-tier software architectures are typically single user . Mainframe one-tier software architectures typically have hundreds or even thousands of users. In a one-tier architecture, users would run an application via some sort of terminal. One type of IBM terminal is the well-known 3270 terminal with its green screen. The "3270" designates not only the terminal type but also the communication protocol. One-tier mainframe applications that were once accessed exclusively by 3270 terminals may now be accessed by a variety of devices, including PCs and network computers running 3270 terminal emulators.
As PCs and workstations proliferated in the 1980s, software architects started to develop client-server based software architectures. In a client-server architecture, a software application is broken up into two parts consisting of a client and a server. The "server" part of the application provides services that are utilized by the "client" portion of the application. One common allocation of functionality in client-server architectures is to have the server provide data storage and business logic functionality while the user interface is provided by the client. Of course there are many other possible types of client-server applications. Sun's Network File System (NFS) protocol was an early example of a client-server application implementing a network based file system. In NFS, files are physically stored on a server while the interface provided by the NFS client has all the appearances of a local file system. Even today's common web browser gains much of its functionality from a client-server architecture with the browser being the client to one of the many web servers on the Internet.
Most new software being developed today is based on some sort of client-server or multi-tier architecture. Modern client-server software is often further categorized into one of the architectures described below. A client-server architecture is an example of a two-tier architecture where one tier is the server and one tier is the client. In many two-tier architectures, the relationship between client and server is not always well defined. Both tiers may alternate being both a client and a server to the other. A two-tier architecture where neither tier is purely a client or a server is often referred to as a peer-to-peer architecture. As two-tier architectures evolved, they gave way to three-tier and other multi-tiered software architectures.
A three-tier software architecture is simply one in which the application is broken down into three layers , typically executing on three different computers. A common three tier architecture, illustrated in Figure 3-4, contains the data storage on one tier, the business logic in a second tier, and the user interface in a third. The main advantage of a three-tier architecture is that it becomes simpler to modify the user interface, business logic, or data storage components without affecting the other components. Another advantage is scalability. Since the data storage and business logic are separated, they can each be hosted on their own server. Furthermore, while many systems are architected such that their database cannot be divided among two servers, application logic typically can. For instance, a company's financial system may require a single database server but accounts payable and order entry, two business logic modules that would use the database, could be separated onto separate servers.
If a three-tier software architecture is good, then is a multi-tier (more than three tiers) one better? As useful computing power is available on smaller and smaller devices and as cross-platform interoperability becomes easier, architectures such as the multi-tier shopping example shown in Figure 3-5 will become more common. The top tier is still the database or data storage tier. Business logic is also separated onto a second tier, as in the three-tier example. What changes is that the user interface is now separated into three additional tiers. Tier 3 would be a web server providing product information such as pricing and availability. Tier 4 would be a point-of-sale device for recording the transaction. Tier 5 would be a Java smartcard used to identify the purchaser and perhaps also carry electronic cash. The promise of cross-platform languages such as Java is that they can run on all tiers of a multi-tier architecture. This makes it simple to move functionality from one tier to another as may become necessary for performance or other reasons.
The ultimate refinement of the client-server architecture is the network-centric architecture. Two, three, or multi-tier architectures may all be used to implement a network-centric design. In a pure network centric architecture, data, business logic, and user interfaces travel from many sources on the network and are ultimately presented to the user in a web browser or "webtop" environment. While a web browser sits on top of a traditional window system and desktop environment, a webtop actually uses the web browser as the primary desktop interface. The ultimate goal of network-centric webtop computing is to provide access to information
to anyone (who is authorized)
on any computing device.
Just as today's, "dialtone" is a universal metaphor for availability and accessibility of the phone system, network-centric architectures aim to provide "webtone" for computer users.
One disadvantage of multi-tier architectures is they are often more difficult to debug when problems arise. If a three-tier architecture is performing poorly, is it a result of database, middle-tier, or user interface loading issues? Alternately, it could simply be a bottleneck in the network connecting any two of the tiers. Anyone who has waited patiently for a web page to download knows that network-centric architectures don't necessarily solve all their performance problems.