the application architecture

Primary tabs

introduction

It's theory time. Customers demand Internet services such as e-commerce marketplaces. An LIC provides web sites to meet that demand. The architecture of a typical web site in the LIC (Larg's Internet Cluster) is based on the three tier model. In the future typical web site architecture may be based on SOA (Service Oriented Architecture). The network architecture is a different kettle of fish: it describes the platform that applications use.

The three tier model is a simple abstract picture of how applications are arranged, such as the services found in these web sites. Each type of application available in the LIC, such as a web server, is described later in this chapter. Each application product, such as Apache, are described in a later chapter.

what it is

One way of simplifying problems in computerland is to define levels of abstraction, adding a layer of semi-human language over an unforgiving computer language. Another way is to split an unweildy monolith into manageable chunks using a model to show you how the chunks should be arranged. Someone came up with the idea of viewing application architecture as abstract chunks and created a tiered model. A useful approach for a distributed computer architecture like the LIC is to think of it as seperated into a number of tiers.

LIC topology: three tier architecture
client tier
business data tier
business logic tier

N-tier models have limited practical value because they are great for technical staff but have a limited view of business logic. Business logic is a term that relates to the components and events in a company. It describes

  • How we model real world business objects in our application - such as accounts, loans, travel itineraries etc
  • How these objects are stored
  • How these objects interact with each other - e.g. a bank account must have an owner and a bank holders portfolio is the sum of his accounts
  • Who can access and update these objects

The problem with a tiered model is that it is an abstract idea and details are lost. For instance, business logic is not really kept in one place. Bits of it are spread about everywhere. The business logic of a web application is found in all tiers. It creeps into areas like databases, web clients and web pages. This does not show up in the tiered model and it does not matter: this muddy compromise is easy for a human to handle.

Because of the technical complexity of some areas where business logic is needed, the technical staff must add the logic rather than the business staff. The people who make the business run and understand the business logic can't do the work: they must trust the technical staff to implement the logic properly. The idea of an SOA (Service Oriented Architecture) has been invented to avoid this problem.

tiered architecture models

LIC topology: two tier architecture
web browser
Java application
WAP phone
web server
application server
database server
client tier
server tier

The first idea was a two tier model.

  • client tier
  • server tier

Once upon a time, interaction of the WWW could be represented using a two tier model. There is a client tier which contains user interfaces. There is also a server tier which provides processing management and database management. Applications in the server tier provide the business logic and the storage. A simple example in the WWW of two tier architecture in action is a web browser in the client tier asking for a page and a web server in the server tier delivering that page.

Interfaces in the client tier provide the presentation logic. Presentation logic describes how we display these objects to a user. Do we use a drop down list or a popup screen? Do we display accounts in a list format and have the user pick which one to edit?

This did not have much to do with businesses but it was better than nothing for programmers. The two tier model allowed people to create applications such as shopping, financial account management, and management information services on the Internet. Two tier architectures work well where management and operations of the system are not complex and processing rules do not change very often. The more complex the database server, the greater the problems with scalability and interoperability. These limitations led to the addition of an extra tier to seperate business logic from data and to link applications to other enterprise systems.

LIC topology: applications
arranged in 3 tiers
web browser
Java application
WAP phone
web server
application server
database server
e-mail server
client tier
business data tier
business logic tier
legacy application
ERP

After the two tier model came the three tier model.

  • client tier
  • business logic tier
  • business data tier

This was much better but had a few practical shortcomings. The three tier model contains a client tier, a middle tier (which is similar to the server tier in the two tier model), and a back-end tier. The client tier supports a variety of client types, both outside and inside of corporate firewalls. The middle tier consists of one or more subtiers such as a web tier and an application tier. On the back end are the enterprise information systems.

One benefit of removing data from the middle tier is that the middle tier components can be replicated and load balanced, to allow greater resilience and scalability. The greater complexity is a drawback of this type of architecture: it is more expensive to maintain. For developers, the separation between client, logic and data is not always clear.

Finally there were n-tier models. The idea behind this type of model is that you can break down your particular architecture into a number of chunks that suit it, rather than being forced to use three. A typical n-tier architecture is like this.

  • presentation GUI
  • presentation logic
  • business logic
  • data access
  • data

If you have a small computer system then one program can do all this work. The programming is done in chunks using this model. The program code can then be reused and changed by the programmer. If you have big computer systems then the application has to be made from lots of programs that are somehow tied together. One application may even be made from lots of independant applications that work together using standard protocols. This is how the LIC works and how a lot of the Internet works.

Each tier contains one or more applications. Each application is kept simple. It does one job and presents its work in an easy-to-digest form such as an XML file, ready for another application to pick up and work on. This means that one part can be changed without messing up another. For instance, if you have a set of rules for making decisions, they are kept seperate from the programs that take the rules and make decisions. The rules can be kept up to date by an administrative team and the programs by a technical team.

SOA (Service Oriented Architecture)

SOA is a load of automated gubbins for turning business data into SO (Service Oriented) resources, business processes into SO processes, SO processes into network services, and for using network services in other SO processes. The SO programs contain no business logic. The idea is that business people do business work and the SO tools do the hard technical bits. A business person uses SO tools to turn his business logic into a form a computer can use, then he creates and controls the SOA.

Thrashing out how an SOA works has led to a whole new alphabet soup of acronyms. Application servers offer SOA tools. The LIC contains application servers and can host SOAs.

what it isn't

A guide to how many computers to use. Each tier may involve one computer or a thousand. All the tiers could be found on one computer.

LIC topology: distributed
applications in a web site
web applications
legacy applications
intranet applications
servers
business processes
mainframes
integration
front-end applications
back-end applications
middleware
databases
legacy systems

A distributed application model. A distributed application model is meant to show the components of one application. A tiered model shows the areas associated with an application, including the clients. There is no client tier in the distributed application model.

Big applications made up of several smaller applications, such as a web site, can be illustrated in a diagram that looks remarkably like the 3 tier model.

The distributed components making up an enterprise platform can be grouped into front-end applications, middleware and back-end applications. These three sections look similar to the three sections in the three tier architecture diagram because they are different ways of solving the problem of complexity. These models are maps showing the landmarks in an e-commerce system. One is a fun tourist map with colourful pictures of things to see and the other is an Ordinance Survey map accurate to within a nanometer.

The 3 tier model and the distributed application model do overlap. The front end applications and the middleware applications of the distributed diagram make up the logic tier of the three tier diagram and the back-end applications make up the data tier.

where it is

The LIC fits within two of the three tiers.

history