Thursday, March 28, 2013

3-tier Client/Server Architecture


The 3-tier software model was introduced in 1990’s as a remedy for the limitations in 2-tier architecture. In this model a third tier/layer is engaged, known as the middle tier server (Application tier/business logic tier), located between the Data Management (server) and the User Interface (client) constituents, mainly to perform corporate business logic and regulations through Process Management by accommodating hundreds of users (comparatively 2-tier model has user base of 100) to offer functionalities as queuing, application execution, and database staging (Client/Server Architectures,2011).


Usually a three tier architecture is implemented if there’s a necessitate for an efficient distributed client/server devise to offer ” increased performance, flexibility, maintainability, reusability, and scalability, while hiding the complexity of distributed processing from the user” (Client/Server Architectures,2011).

This offers trouble-free deployment over the network and can be managed well due to the centralized behavior of servers. The protocol of communication between client/server is as follows;

The client calls for the business logic on the server, the business logic on the behalf of the client accesses the database (Client/Server Architectures,2011). 
Basic functionalities of the layers are;

  • Presentation Tier - Uses a business tier driven interface with classes and objects, e.g- in ASP.NET comprises of objects like ASPX pages, user and server controls etc.(Yang 2004)

  • Middle Tier (Business Logic tier) -  This basically acts as an intermediate in the communication between presentation and data tier by retrieving modifying data from the database according to business logic and forwarding it to the presentation layer to display results to the user. Often the client request balancing is done via tools as ORB and Transaction processing-TP. In the case of ADO.NET it uses SqlClient or OleDb objects to retrieve and modify data from SQL server or Access, by forwarding the information to the presentation layer with DataReader or Dataset object, or a custom collection object (Yang, 2004).

  • Data Tier-Represents the database with data access procedures e.g-Oracle, mySQL or even XML. .(Yang 2004)


The 3-tier architecture endorses a user system where a whole set of user services are offered (session, text and dialog input, display management) and it also substitutes several server calls for multiple SQL queries and updates, enhancing its performance compared to the 2-tier model (slideshare, 2011).

Employment of middle tier provisions Process Management services as process development and performance, process monitoring and resourcing of services which are shared by many applications and also it offers database management via data and file services which can be developed without the usage of proprietary DBMS languages (Client/Server Architectures,2011).

Usually 3-tier thin client model is represented in some web applications, comprising a client application which connects to web servers as Apache or IIS, CGI based technology through web-requests using a web browser. Then the web browser communicates with the data tier/database servers like MySQL, Oracle etc, also thick client applications use technologies as CORBA and DCOM (ASKESIS, 2010).

Bibliography

o   slideshare. (2011). Client Server Architecture. [Online]. Available from: http://www.slideshare.net/suks_87/client-server-architecture-presentation. [Accessed: 20th January 2011]


o   Yang. (2004). What is n-Tier Architecture?. [Online].Available from: http://www.developerfusion.com/article/3058/boosting-your-net-application-performance/2/. [Accessed: 25th January 2011]

o   ASKESIS. (2004). Client server computing. [Online].Available from: http://www.askesis.nl/en/tutorial/docs/J2EE/body.html. [Accessed: 25th January 2011]

3-tier to N-tier Client/Server Architecture


As mentioned in the previous posts, middle tier in 3-tier applications is not a monolithic program but a set of components driven by client-initiated business logic. The components work in a union to respond to a client request whereby calling each component based functions accordingly. Also some may operate as gateways to encapsulate legacy applications processing on mainframes. Basically n-tier methodology can be considered as a further expansion of the 3-tier model (Client/Server Architectures,2011).

Below are some advantages of component-based applications over monolithic applications.

1.      Applications can be built in a procedural manner/step by step implementation. Projects based on mission-critical applications are often implemented in a procedural manner dividing into small-scale projects which undergoes an incremental development. 

2.     Reuse of components. 

3.     Clients are eligible of accessing functions simply and securely.The client is unaware of the database, application or the particular component, by which the request being executed as the components work in union on behalf of the client. The server then encapsulates the data provided by the application logic thus raising the abstraction level.

4.      In-corporation between custom applications and off-the-shelf components.


Nowadays there’s a higher demand for ready-made components that are packaged as applications consisting the ability to “Mix-and-Match” with different software models even though it necessitates semantic glue. .

Communication among the functional components as storage, management of clients and the gathering of data is achieved by protocols as HTTP, RMI, and XML (Client/Server Architectures,2011). 

Moreover the componentization of the tiers is considered as the key aspect for increased efficiency.(Sun MicroSystems Inc, 2011) Accordingly the business tier can be further elaborated in two sub layers referred as BLL-business Logic Layer and DAL-Data Access Layer. The BLL is placed on top of DAL, enabling it to use the classes and objects of DAL which is responsible of retrieving data and passing it to the top level.e.g- ASP.NET’s DAL uses SqlClient or OleDb to retrieve data and passing it forward as Dataset or DataReader. Then BLL processes the data and forward it to the presentation tier. (ASKESIS 2010)
In the scenario of Visual Studio based applications, following are the components used in each level.

Usually n-tier architectural platforms have distributed the workload to different servers in order to separate the components into scalable aspects referred to as horizontal, vertical, diagonal scaling.

  • Horizontal Scaling- known as simplified change management with multiple servers in the horizontal tier where the changes can be deployed incrementally by adding more nodes to the system. Hardware/Software error reductions can be gained through the horizontal set of servers as it provides service even if a particular server breakdowns thereby providing a predictable performance. Also the workload is distributed among the servers with the use of load.( Sun Microsystems, Inc, 2011)

  • Vertical Scaling- in order to improve scalability, services are added within the system to a single node e.g-CPU’s, memory. Suitable for slowly changing/data-intensive applications as mail stores and directories etc. this also paves the way to use virtualization technology due to enhanced resource sharing ( Sun Microsystems, Inc, 2011). 

  • Diagonal Scaling- this is basically a combination of horizontal and vertical scaling enabling the horizontally set servers to develop within the system considered as a flexible approach ( Sun Microsystems, Inc, 2011). 


When can you use n-tier?

In relevant to Gartner Group’s specification for smaller projects, 2-tier architecture is easier to implement than 3-tier, avoiding the complex situations where even 2-tier is exponentially harder to develop. Following are the circumstances driving an organization for the implementation of 3-tier model (Client/Server Architectures,2011). 

1.     Numerous applications services/classes. 
2.     Ongoing application developed in multiple languages or entitled to different organizations. 
3.     Usage of an application more than 3 years.
4.     Higher demand for accessing the database; more than 50,000 transactions per day or more than 300 concurrent users. 
5.     Multiple heterogeneous data sources; DBMS and a file system. 

Shopping cart web applications can be considered as a good example for n-tier client/server paradigm. Clients communicate with the application server through GUI’s, basically the web browser which initiates the web-requests thereby displaying the code in dynamic HTML (Hypertext Markup Language). Thus the presentation tier is responsible for displaying information on the products browsed, purchase details and the contents of the shopping cart. This communicates with other tiers as the browser/client tier via the display of products with the help of database stored procedures and web services. This allows different nodes to communicate (Exforsys Inc, 2011). 

The business tier performs detailed processing of all business transactions involved. e.g- credit card authorization and calculation of shipping costs and sales tax. Web services, custom tags, and stored procedures are used as tools used to encapsulate the business logic (Exforsys Inc, 2011).

Intergalactic Client/Server

The client/server applications stand at a new threshold brought on by the exponential increase of low-cost bandwidth on Wide Area Network for example, the Internet and AOL.

The client/server paradigm undergoes a new facet brought on by the effective increase of low-cost bandwidth on Wide Area Networks, e.g- Internet and AOL. The use of web-enabled machines and devices marks a transition from 2-tier Ethernet client/server to N-tier intergalactic client/server.

Moreover the client/server does not necessarily reside on the same location enabling for remote access referred to as the “Irrelevance of proximity”. 

Bibliography

·         slideshare. (2011). Client Server Architecture. [Online]. Available from: http://www.slideshare.net/suks_87/client-server-architecture-presentation. [Accessed: 20th January 2011]


·         ASKESIS. (2004). Client server computing. [Online].Available from: http://www.askesis.nl/en/tutorial/docs/J2EE/body.html. [Accessed: 25th January 2011]


·         Sun Microsystems, Inc. (2000).Scaling the N-Tier Archirecture. [Online]. September 2000. Available from: w.sun.com/software/whitepapers/wp-ntier/wp-ntier.pdf. [Accessed: 25th January 2011]


·         Exforsys Inc. (2011). N-Tier Client-Server Architecture. [Online].Available from: http://www.exforsys.com/tutorials/client-server/n-tier-client-server-architecture.html. [Accessed: 28th January 2011]

Advantages and Disadvantages of the architectures


1-teir Architecture

Advantages
Disadvantages
Easy to implement and optimize performance. 
Do not support remote/       distributed access for data resources. 
Do not have compatibility or Context switching issues. 
The cost of deployment is less.eg-development and management cost. 
The cost of deployment is less.eg-development and management cost. 
Monolithic manner of the code causes higher maintenance. 

The cost of the central mainframe is high.

2-tier Architecture

Advantages
Disadvantages
Applications can be easily developed due to simplicity. (www.unmedu.com)
Heterogeneous environments/Business environments with rapidly changing rules and regulations are not suitable since the database server has to handle the business logic which slows down database performance. (www.unmedu.com)
Maximum user satisfaction is gained with accurate and fast prototyping of applications through robust tools. (www.unmedu.com)
Since client beholds most of the application logic, problems arise in controlling the software version and re-distributing of new versions. (www.unmedu.com)
Since this contains static business rules it’s more applicable for homogenous environments. (www.unmedu.com)
Security wise this is complicated as users need to have separate login information for every SQL server. (www.unmedu.com)
Database server and business logic is physically close, which offers higher performance. (www.unmedu.com)
Client tools and SQL middleware implemented in 2-tier environment is proprietary which remains cautious on long term feasibility. (www.unmedu.com)
Scalability: The 2-tier model lacks scalability as it   supports only a limited number of users. When simultaneous client requests increases application performance degrades rapidly due to the fact that clients necessitate separate connections and CPU memory to proceed. (Thota   2010)
Minimal Logic Sharing: Since the application logic is coupled with the client it’s difficult to re-use logic dispersed among applications and tools. (Thota 2010)
Dispersion of Applications: Any change in an application should reflect all clients. If higher number of users exists in the system, it entails substantial administrative overhead. (Thota 2010)

Change of Database Structure: Most applications used for interaction is dependent on the database structure creating an issue when re-designing, as they are intimate with the prevailing structure. (Thota 2010)


3-tier Architecture

Advantages
Disadvantages
Improved Scalability: Due to the distributed deployment of application servers, scalability of the system is enhanced since a separate connection from each client is not required whereas connections from few application servers are sufficient. Moreover TP monitors or ORBs is used for load balancing and in synchronizing severs.(Sarma 2010)
Complexity of Communication:  Usually more effort should be enforced when creating 3-tier applications as the communication points are increased (client to middle tier to server, instead of directly client to server) and the performance increased by tools like Visual Basic, PowerBuilder, Delphi will be reduced. (Sarma 2010)
Enhanced Re-usage: A similar logic can be sustained in many clients or applications. In appliance of object standards like COM/DCOM or CORBA, the language in the business-logic tier can be made transparent. .(Sarma 2010)
Fewer Tools: Additional effort is required due to increase of performance whereas the 2-tier model can handle the particular function using an automated tool. It also has productive tools like reporting tools. Sarma 2010)
Improved Data Integrity: Data corruption through client applications   can be eliminated as the data passed in the middle tier for database updations ensures its validity. .(Woodger Computing Inc 2010)
Enhanced Security: Through the implementation of several layers, enhances the data security on a service-by-service basis. As clients do not interact with the database directly, it provides less risk and confliction with unauthorized data. The placement of the business logic on a centralized server makes the data more secure. .(Woodger Computing Inc 2010)
Reduced Distribution: The layered architecture enables to update only the application servers, not all distributed clients in case of a modification in the business logic. .(Woodger Computing Inc 2010)
Redundant Sever Availability: mission-critical applications seek the   use of superfluous application servers and database servers as its possible to create an application which will recover the system from network or server failures, with redundant servers. .(Woodger Computing Inc 2010)
Hidden Database Structure: The actual structure of the database often remains hidden from requesters enabling any change of the database to be transparent. Thus a process in the middle tier which exchanges data with other applications can sustain its current interface while a modification of the underlying database structure.(Woodger Computing Inc 2010)


n-tier Architecture

Advantages
Disadvantages

n tier architecture includes all advantages of the 3-teir model since its an expansion of the 3-teir methodology. Mainly the performance is increased due to off-load from the   database tier and the client tier, enabling it to suit medium to high volume industries (Kambalyal 2010).

Due to the componentization of the tiers, the complex structure is difficult to implement or maintain. (Kambalyal 2010)


Bibliography

·         www.unmedu.com. (2011). 2-Tier Architecture’s Disadvantages. [Online]. Available from: http://www.unm.edu/~network/presentations/course/appendix/appendix_k/tsld052.htm. [Accessed: 29th January 2011]

·         Thota. (2010). Advantages and disadvantages of 2-Tier Architecture. [Online]. Available from: http://www.dotnetspider.com/forum/32148-advantages-disadvantages-two-tier-architec.aspx. [Accessed: 29th January 2011]

·         Woodger Computing Inc. (2010). Multi-Tier Architectures. [Online]. Available from: http://www.woodger.ca/archmult.htm. [Accessed: 29th January 2011]

·         Sarma. (2010). 3-Tier Architecture. [Online]. Available from: http://www.dotnetspider.com/forum/32148-advantages-disadvantages-two-tier-architec.aspx. [Accessed: 29th January 2011]


Client/Server Model


Suitable Servers and Software

 File Server

File Server Example
  • File Servers are important for information sharing across networks.

  • Client’s requests for file records, in a manner that it is considered a primitive type of data service used for intercommunication via messages over the network to find relevant data.

  • In a usual implementation remote server processers can be accessed through file server and also the software, corporate data, databases and backups are stored on primary (hard drive) or secondary(magnetic tape, optical storage) devices, are managed by the file server.

2. Database Server

  • The communication with the database server is gained through the SQL requests of clients and the appropriate response by the server (Client/Server Architecture,2011). 

  • The server is capable of using its own processing power to search the relevant data, instead of passing all records to the client as the SQL code responsible of querying the requested data resides on the server itself resulting an efficient use of distributed processing. Due to the fact that the application code resides on the client machine its possible either to write a code or to purchase a shrink-wrap query tool (Client/Server Architecture,2011). 

  • Database servers contribute towards the implementation of Decision Support Systems and acts as a key role in data warehousing (Client/Server Architecture,2011). 


Client/ Server with Database Servers

3. Transaction Servers


Clients can appeal to distant procedures and services offered by servers with SQL database engine using the transaction server.
  • The network exchange resides on a single request/ reply basis. A transaction is a set of SQL statements which work as a unit (Client/Server Architecture,2011). 

  • For the client/server application in a transaction server, it’s necessary to implement codes in both components (Client/Server Architecture,2011). 

  • User Interface (GUI) is used for client components and the server components comprises of a set of transactions related to a database. These applications are known as Online Transaction Processing or OLTP, considered as mission critical applications with fewer throughputs (1-3 sec) (Client/Server Architecture,2011). 

  • OLTP applications necessitate adequate security measurements along with database integrity. The two components of OLTP are, 

    • TP-Lite: comprises of stored procedures provide by database-vendors.
    • TP-Heavy:  comprises of TP Monitors offered by OLTP-vendors.

Client/ Server with Transaction Servers

4. Groupware Servers

  • Groupware servers are used to handle semi-structured information such text and images, mail, bulletin boards etc (Client/Server Architecture,2011)

  • The usage of these servers in a client/server system enables direct communication between people, e.g. - software-Lotus Notes, Microsoft Exchange.(Client/Server Architecture,2011)

  • Usually dedicated groupware software is built on top of a vendor’s canned set of client/server API’s since entitled applications are created with the help of scripting language and form-based interfaces deployed by the vendor.(Client/Server Architecture,2011) 

  • Today Internet has become the frequent middleware platform for groupware where communication is attained through emails. 


5. Object Application Servers.


  • Here the application interface of client/server is created as a bundle of inter-communicating objects.(Client/Server Architecture,2011)

  • The client-side object seeks the help of Object Request Broker (ORB) to communicate with server objects which responses to the relevant method, locating an instance of the appropriate server class.( slideshare 2011)

  • Server objects should conclude concurrency and sharing support which are fulfilled by new generation applications such as COBRA and ORB.(Client/Server Architecture,2011)

  • The commercial ORB’s act in accordance with Object Management Group’s CORBA comprises of,
    • Iona’s Orbix
    • Inprise’s VisiBroker
    • ICL’s DAIS
    • JavaSoft’s Java IDL
    • BEA’s ObjectBroker
    • IBM’s SOM
    • Expersoft’s PowerBroker (www.slideshare.net)

  • CORBA is also the basic foundation technology for the Enterprise JavaBeans component model. The new generation CORBA application servers are also called as the Object Transaction Monitors (OMTs) provide      server-side component coordination services.

  • COBRA acts as the key basis for the Enterprise JavaBeans constituent model and new generation COBRA application models are known as Object Transaction Monitors (OMTs) dedicated to offer synchronization services.
  • Currently the main competitor identified for COBRA is Microsoft hat Distributed Component Object Model (DCOM)- key basis for Microsoft’s enterprise software and its ActiveX constituent, derives the service of Microsoft Transaction Server (MTS) as the application server, also known as COM+.

6. Web Application Server

Considered as new category of Internet software these are responsible in connecting standard HTTP servers with server-side constituent frameworks also being operationally similar to object servers.

  • Client/server architectures that engage web servers comprise of thin, portable, universal clients entitled to communicate with fat servers- handles the bulk of data processing. The inter-communication is gained through a protocol similar to RPC, called as HTTP which interprets set of parameters to be passed as strings, without provisioning typed data.(Client/Server Architecture,2011)

  • Overlook of products include parallel operation of Microsoft’s MTS object server as a Web Server and an Application Server and also CORBA/Java; Enterprise JavaBeans being the demand. Some servers capable of offering the COM/CORBA bridges.(Client/Server Architecture,2011)

  • The CORBA/Java Web application servers,

    • Netscape /Kiva’s Application Server
    • BEA’s WebLogic
    • Bluestone’s Sapphire Web
    • IBM’s WebSphere
    • SilverStream’s SilverStream Application Server 2.0
    • Novera’s jBusiness Application Server

Bibliography



·         slideshare. (2011). Client Server Architecture. [Online]. Available from: http://www.slideshare.net/suks_87/client-server-architecture-presentation. [Accessed: 20th January 2011]

·         bhuvana. (2006). Two-Tier Architecture. [Online].Available from: http://bhuvans.wordpress.com/2006/08/22/two-tier-architecture/. [Accessed: 27th January 2011]

·         Chapple. (2011). Two-Tier or n-Teir. [Online].Available from: http://databases.about.com/od/specificproducts/a/architectures.htm. [Accessed: 27th January 2011]


Suitability of Client/Server to implementation in different environments


As an emerging technology, the client/server methodology has effectively contributed for implementations in different environments/industries. 

Client/server in LAN/Intranet

Most client/servers today are PC LAN implementations since its capable of providing personalized benefits for groups of users. Often called as Basic Client/server comprising of PC’s for personal usage (personal platforms) as well as shared usage (server platforms). The shared local server platform typically acts as a gateway for enterprise external networks enabling enhanced communication (Articlesbase, 2011).

Above scenario applies to automated Library Systems where PC-based client inter-communicates with multiple servers, or automated system of a different library or a distant online reference service provider. Apart from the usual scenario the same machine can act as client as well as the server in a case where two library systems request each other’s functionalities, enforcing them to act as clients, for the purpose of resource sharing. Therefore we can define two environments for client/server in a library system,

  • ·         As a model for the automated library system.
  • ·         As a model to connect heterogeneous systems.

The initial approach for automating a library system is the ability to access multiple servers, bringing together product lines in order to increase productivity. In the second application the vendor should undergoes a mechanism to provide servers a transparent access to other systems. Therefore vendors have a potential opportunity to design a client/server system according to its requirements not forgetting to meet the standards of underlying principles.

Distributed WAN systems

Implementation of client/server paradigm in Wide Area Networks enables organizations to establish a secure single network intended to connect its remote departments and branches. Large multinational organizations as banks obtain the advantage of WAN systems since it contributes towards the development and the sustainability of the organizations’ business procedures. In a bank ATM scenario customers use the ATM client machines to communicate with the central server with business functions as withdrawing funds, querying an account, transferring credit to other accounts etc. This can be considered as a 3-tier paradigm of client/server (Seina 2010)

ATM
Moreover a most popular example for WAN based environment of client/server is the usage of web applications where a client application connects to web servers as Apache or IIS, CGI based technology through web-requests using a web browser. Then the web browser communicates with the data tier/database in order to extract or to manipulate the data requested. This was considered a major transition phase in the global market as it gave rise to e-commerce aspects where companies gained revenue through the increase of customer base by launching corporate websites.

Suitable hardware and software devices for implementation

Devices needed for implementation

Personal platforms:- Personal platforms are perhaps the most distinctive area of client-server technology. We define a personal platform as: 
This is basically a computer platform which enables users to communicate over a network providing a consistent user interface to perform tasks relevant to an organization. In client/server perspective this usually enrolls in the client aspect of the architecture whereby providing interface for the communication with the servers. Different kinds of personal platforms include MS/DOS PC, Windows PC, OS/2 PC, UNIX workstation, Apple Macintosh, and various hand-held devices. (Articlesbase 2011)

In a client/server implemented Wide Area Network obtains the service from devices such as WAN switches, access servers, CSU/DSU, modems, ISDN terminal adapters, routers,firewall hardware ,multiplexers, repeaters, load balancers, ATM switches and other networking devices to supplement a distributed access for the system. (Networking Tutorials 2010)


Bibliography

Articlesbase. (2011). Client-server : Computer Industries Newest and Hottest Buzzwords. [Online]. Available from: http://www.articlesbase.com/networking-articles/clientserver-computer-industries-newest-and-hottest-buzzwords-58332.html#ixzz1CpeV1DW4. [Accessed: 31st January 2011]

Networking Tutorials. (2011). What is WAN Networking. [Online]. Available from: http://www.articlesbase.com/networking-articles/clientserver-computer-industries-newest-and-hottest-buzzwords-58332.html#ixzz1CpeV1DW4. [Accessed: 31st January 2011]