Published on

Published in: Education, Technology
1 Comment
1 Like
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. Client Server Architecture
  2. 2. Syllabus <ul><li>Two tiered client/server architecture </li></ul><ul><li>Three tiered client/server architecture </li></ul><ul><li>Stored Procedure architecture </li></ul>
  3. 3. Two tiered client/server architecture Purpose <ul><li>Two tier software architectures were developed in the year 1980. </li></ul><ul><li>The two tier architecture is intended to improve usability by supporting a forms-based, user-friendly interface. </li></ul><ul><li>The two tier architecture improves scalability by accommodating up to 100 users, and improves flexibility by allowing data to be shared, usually within a homogeneous environment. </li></ul>
  4. 4. Technical Detail <ul><li>Two tier architectures consist of three components distributed in two layers: client and server. The three components are </li></ul><ul><ul><li>User System Interface (such as text input, dialog, and display management services) </li></ul></ul><ul><ul><li>Processing Management (such as process development, process enactment, process monitoring, and process resource services) </li></ul></ul><ul><ul><li>Database Management (such as data and file services) </li></ul></ul><ul><li>The two tier design allocates the user system interface exclusively to the client. </li></ul><ul><li>It places database management on the server and splits the processing management between client and server, creating two layers. </li></ul>
  5. 5. Two Tier Architecture
  6. 6. <ul><li>In general, the user system interface client invokes services from the database management server. </li></ul><ul><li>In many two tier designs, most of the application portion of processing is in the client environment. </li></ul><ul><li>The database management server usually provides the portion of the processing related to accessing data (often implemented in store procedures). </li></ul><ul><li>Clients commonly communicate with the server through SQL statements or a call-level interface. </li></ul>Two Tier Architecture
  7. 7. <ul><li>It should be noted that connectivity between tiers can be dynamically changed depending upon the user's request for data and services. </li></ul><ul><li>As compared to the file server software architecture (that also supports distributed systems), the two tier architecture improves flexibility and scalability by allocating the two tiers over the computer network. </li></ul><ul><li>The two tier improves usability (compared to the file sever software architecture) because it makes it easier to provide a customized user system interface. </li></ul><ul><li>It is possible for a server to function as a client to a different server- in a hierarchical client/server architecture. This is known as a chained two tier architecture design. </li></ul>Two Tier Architecture
  8. 8. Two Tier Architecture Usage Considerations <ul><li>Two tier software architectures are used extensively in non-critical information processing where management and operations of the system are not complex. </li></ul><ul><li>Two tier software architectures require minimal operator involvement. </li></ul><ul><li>The two tier architecture works well in relatively homogeneous environments with processing rules (business rules) that do not change very often and when workgroup size is expected to be fewer than 100 users, such as in small businesses. </li></ul>
  9. 9. Two Tier Architecture Maturity <ul><li>Two tier client/server architectures have been built and fielded since the middle to late 1980s. </li></ul><ul><li>The design is well known and used throughout industry. </li></ul><ul><li>Two tier architecture development was enhanced by fourth generation languages. </li></ul>
  10. 10. Two Tier Architecture Costs and Limitations <ul><li>Scalability. The two tier design will scale-up to service 100 users on a network. </li></ul><ul><li>It appears that beyond this number of users, the performance capacity is exceeded. </li></ul><ul><li>This is because the client and server exchange &quot;keep alive&quot; messages continuously, even when no work is being done, thereby saturating the network. </li></ul>
  11. 11. <ul><li>Interoperability. </li></ul><ul><li>The two tier architecture limits interoperability by using stored procedures to implement complex processing logic. </li></ul><ul><li>This means that to change or interoperate with more than one type of database management system, applications may need to be rewritten. </li></ul>Two Tier Architecture Costs and Limitations
  12. 12. <ul><li>System administration and configuration . </li></ul><ul><li>Two tier architectures can be difficult to administer and maintain because when applications reside on the client, every upgrade must be delivered, installed, and tested on each client. </li></ul><ul><li>The typical lack of uniformity in the client configurations and lack of control over configuration changes increase administrative workload. </li></ul>Two Tier Architecture Costs and Limitations
  13. 13. Three Tier Architecture <ul><li>The three tier architecture emerged to overcome the limitations of the two tier architecture. </li></ul><ul><li>In the three tier architecture, a middle tier was added between the user system interface client environment and the database management server environment. </li></ul><ul><li>There are a variety of ways of implementing this middle tier, such as transaction processing monitors, message servers, or application servers. </li></ul>
  14. 14. Three Tier Architecture <ul><li>The middle tier can perform queuing, application execution. For example, if the middle tier provides queuing, the client can deliver its request to the middle layer and disengage because the middle tier will access the data and return the answer to the client. </li></ul><ul><li>In addition the middle layer adds scheduling and prioritization for work in progress. </li></ul><ul><li>The three tier client/server architecture has been shown to improve performance for groups with a large number of users (in the thousands) and improves flexibility when compared to the two tier approach. </li></ul>
  15. 15. Limitation <ul><li>A limitation with three tier architectures is that the development environment is reportedly more difficult to use than the visually-oriented development of two tier applications </li></ul>
  16. 16. Three tier architecture with transaction processing monitor technology. <ul><li>The most basic type of three tier architecture has a middle layer consisting of Transaction Processing (TP) monitor technology </li></ul><ul><li>The TP monitor technology is a type of message queuing, transaction scheduling, and prioritization service where the client connects to the TP monitor (middle tier) instead of the database server. </li></ul><ul><li>The transaction is accepted by the monitor, which queues it and then takes responsibility for managing it to completion, thus freeing up the client. </li></ul>
  17. 17. <ul><li>When the capability is provided by third party middleware vendors it is referred to as &quot;TP Heavy&quot; because it can service thousands of users. When it is embedded in the DBMS (and could be considered a two tier architecture), it is referred to as &quot;TP Lite&quot; because experience has shown performance degradation when over 100 clients are connected . </li></ul>Three tier architecture with transaction processing monitor technology.
  18. 18. <ul><li>TP monitor technology also provides the ability to update multiple different DBMSs in a single transaction. </li></ul><ul><li>Provides connectivity to a variety of data sources including flat files, non-relational DBMS, and the mainframe </li></ul><ul><li>Provides the ability to attach priorities to transactions </li></ul><ul><li>robust security </li></ul>Three tier architecture with transaction processing monitor technology.
  19. 19. <ul><li>Using a three tier client/server architecture with TP monitor technology results in an environment that is considerably more scalable than a two tier architecture with direct client to server connection. </li></ul><ul><li>For systems with thousands of users, TP monitor technology (not embedded in the DBMS) has been reported as one of the most effective solutions. </li></ul><ul><li>A limitation to TP monitor technology is that the implementation code is usually written in a lower level language (such as COBOL), and not yet widely available in the popular visual toolsets. </li></ul>Three tier architecture with transaction processing monitor technology.
  20. 20. Three tier with message server <ul><li>Messaging is another way to implement three tier architectures. </li></ul><ul><li>Messages are prioritized and processed asynchronously. </li></ul><ul><li>Messages consist of headers that contain priority information, and the address and identification number. </li></ul><ul><li>The message server connects to the relational DBMS and other data sources. </li></ul><ul><li>The difference between TP monitor technology and message server is that the message server architecture focuses on intelligent messages, whereas the TP Monitor environment has the intelligence in the monitor, and treats transactions as dumb data packets. </li></ul>
  21. 21. Three tier with an application server <ul><li>The three tier application server architecture allocates the main body of an application to run on a shared host rather than in the user system interface client environment. </li></ul><ul><li>The application server does not drive the GUIs; rather it shares business logic, computations, and a data retrieval engine. </li></ul><ul><li>Advantages are that with less software on the client there is less security to worry about, applications are more scalable, and support and installation costs are less on a single server than maintaining each on a desktop client. </li></ul><ul><li>The application server design should be used when security, scalability, and cost are major consideration. </li></ul>
  22. 22. Three tier with an ORB architecture <ul><li>Currently industry is working on developing standards to improve interoperability </li></ul><ul><li>Developing client/server systems using technologies that support distributed objects holds great promise, as these technologies support interoperability across languages and platforms, as well as enhancing maintainability and adaptability of the system. </li></ul><ul><li>There are currently two prominent distributed object technologies: </li></ul><ul><li>Common Object Request Broker Architecture (CORBA) </li></ul><ul><li>COM/DCOM (Component Object Model (COM), DCOM, and Related Capabilities) . </li></ul><ul><li>Industry is working on standards to improve interoperability between CORBA and COM/DCOM. The Object Management Group (OMG) has developed a mapping between CORBA and COM/DCOM that is supported by several products. </li></ul>
  23. 23. Three tier architecture… <ul><li>Three-tier applications are much more difficult to build than two-tier apps. </li></ul><ul><li>The biggest obstacle is that the software tools’ integrated development environments are not aware of the three-tier model. </li></ul><ul><li>As a result, much more hand-coding is required to write a three-tier application. </li></ul><ul><li>Three-tier apps are also harder to design, because they are somewhat abstract compared with their more direct two-tier counterparts. </li></ul><ul><li>Software tool vendors are starting to release new versions for three-tier or n-tier development support, but it's not mature development technology just yet. </li></ul>
  24. 24. Stored Procedure Concept <ul><li>Stored procedures are user-written structured query language (SQL) programs that are stored at the data base server and can be invoked by client applications. </li></ul><ul><li>A stored procedure can contain most statements that an application program usually contains. </li></ul><ul><li>Stored procedures can execute SQL statements at the server as well as application logic for a specific function. </li></ul>
  25. 25. Stored Procedure Concept <ul><li>A stored procedure can be written in many different languages, such as COBOL, OOCOBOL, C, C++, FORTRAN etc. </li></ul><ul><li>The language in which stored procedures are written depends on the platform where the data base server is installed. </li></ul>
  26. 26. Stored Procedure Concept <ul><li>Local client applications, remote Distributed Relational Database Architecture (DRDA), or remote data services can invoke the stored procedure by issuing the SQL CALL statement </li></ul><ul><li>The client program can pass parameters to the stored procedure and receive parameters from the stored procedure. </li></ul><ul><li>The client program and the stored procedure do not have to be written in the same programming language. For example, a C client program can invoke a COBOL stored procedure . </li></ul>
  27. 27. why use Stored Procedure? <ul><li>In previous releases of DRDA, the client system performed all application logic. The server was responsible only for SQL processing on behalf of the client. </li></ul><ul><li>In such an environment, all database accesses must go across the network, resulting in poor performance in some cases. </li></ul>
  28. 28. <ul><li>This is a relatively simple model, which makes the application program easy to design and implement. </li></ul><ul><li>Because all application code resides at the client, a single application programmer can take responsibility for the entire application. </li></ul><ul><li>However, there are some disadvantages to using this approach. </li></ul>why use Stored Procedure?
  29. 29. why use Stored Procedure? <ul><li>Because the application logic runs only on the client workstations, additional network input/output (I/O) operations are required for most SQL requests. </li></ul><ul><li>These additional operations can result in poor performance. </li></ul><ul><li>This approach also requires the client program to have detailed knowledge of the server's database design. </li></ul><ul><li>Thus, every change in the database design at the server requires a corresponding change in all client programs accessing the database. </li></ul><ul><li>Also, because the programs run at the client workstations, it is often complicated to manage and maintain the copies there. </li></ul>
  30. 30. why use Stored Procedure? <ul><li>Stored procedures enable you to encapsulate many of your application's SQL statements into a program that is stored at the data base server. </li></ul><ul><li>The client can invoke the stored procedure by using only one SQL statement, thus reducing the network traffic to a single send and receive operation for a series of SQL statements. </li></ul><ul><li>It is also easier to manage and maintain programs that run at the server than it is to manage and maintain many copies at the client machines. </li></ul>
  31. 31. why use Stored Procedure? <ul><li>Stored procedures enable you to split the application logic between the client and the server. You can use this technique to prevent the client application from manipulating the contents of sensitive server data </li></ul>
  32. 32. Processing with Stored Procedures
  33. 33. Stored Procedure Concept <ul><li>The stored procedure can issue static or dynamic SQL statements. </li></ul><ul><li>Data definition language (DDL), most data manipulation language (DML), and data control language (DCL) statements can be coded in a stored procedure. </li></ul>