DISTRIBUTED MULTI-TIERED APPLICATION

Multi-tiered distributed application model is mainly used for enterprise application in J2EE.In this model, application logic is divided  into components based on functions. Various application components make up a J2EE application and this application is installed on different machines depending on the tier it belongs. The tiers of distributed multi-tiered model are as follows

  • Client tier components run on the client machine
  • Web tier components run on the J2EE server
  • Business tier components run on the J2EE server
  • Enterprise information system ( EIS ) tier software runs on the EIS server

 

Figure 1 Multi-tiered Applications

 


 

J2EE application is divided into three or four tiers as shown in figure 1.In three tier application the components are distributed in three different locations- client machines, J2EE sever machines and the database. Three tiered model is the extended version of two tier that is client and server model.

 

Client Tier Components

We divide J2EE application as web-based and non web-based. In non web-based application, application client executes on client machine. Application client uses user interface using GUI components such as Swing and AWT (Abstract Window Toolkit) and directly access the business tier. An application client can open an HTTP connection to establish communication with a servlet running in the web tier.

But in case of web based J2EE application a web browser downloads web pages and applets to the client machine. Web client consist of

  • dynamic web pages containing various types of markup language (HTML, XML), which are generated by web components running in the web tier, and
  •  a web browser, which renders the pages received from the server.

Web Tier Components

J2EE web components can be either JSP pages or servlets.   Java programming language classes that dynamically process requests and construct responses are servlets.  JSP pages are text-based documents that execute as servlets. Client communicates with business tier directly or through jsp or servlets in the web tier. Static HTML pages and applets, Server-side utility classes are bundled with web components during application assembly but are not considered web component.

Business Tier Components

This is defined by the logic that pertains to the (business) application that is being

developed.  Enterprise Java Beans (EJB) can be used to implement this tier. This tier receives the data from the web-tier and processes the data and sends it to the EIS-tier and takes the data from the EIS and sends it to the web-tier Logic that solves or meets the needs of a particular business domain such as banking, retail, or finance, running in the business tier. There are three kinds of enterprise beans: session beans, entity beans, and message-driven beans.

A session bean represents a transient conversation with a client. When the client finishes executing, the session bean and its data are gone. An entity bean represents persistent data stored in one row of a database table. If the client terminates or if the server shuts down, the underlying services ensure the entity bean data is saved. A message-driven bean is a combination of a session bean and a Java Message Service (JMS) message listener, allowing a business component to receive JMS messages asynchronously

               Business and EIS Tiers

 

Enterprise information system Tier Components

            The enterprise information system tier handles database (relational database) and other information management system.The other information management systems may include Enterprise Resource Planning (ERP) and legacy system connected through open database connectivity