CLIENT SERVER ARCHITECTURE IN DATABASE

Add to Favourites
Post to:

Description
Describe client server model in database.topics from DBMS

Comments
Presentation Transcript Presentation Transcript

CLIENT SERVER TECHNOLOGY : CLIENT SERVER TECHNOLOGY Introduction to Database Management Systems

Slide 2 :

Client Server Definition : Client Server Definition “ server software accepts requests for data from client software and returns the results to the client”

Elements of C-S Computing : Network Request Result a client, a server, and network Client Server Client machine Server machine Elements of C-S Computing

CONCEPTS : CONCEPTS “Client/server systems operate in a networked environment, splitting the processing of an application between a front-end client and a back-end processor.” Database functionality can be divided into: Back-end: manages access structures, query evaluation and optimization, concurrency control and recovery. Front-end: consists of tools such as forms, report-writers, and graphical user interface facilities.

Slide 6 : The interface between the front-end and the back-end is through SQL or through an application program interface. client and server may reside on same computer both are intelligent and programmable

Slide 7 : FOR EXAMPLE

Slide 8 : flexibility in locating resources and expanding facilities better functionality for the cost better user interfaces easier maintenance Advantages

Where Operations are Done : Where Operations are Done In CS Relationship “most of the application processing is done on a computer (client side), which obtains application services (such as database services) from another computer (server side) in a master slave configuration.

Slide 10 : Application Tasks User Interface Presentation Logic Application Logic Data Requests & Results Physical Data Management

Application Logic Components : Application Logic Components Presentation logic input output Processing logic I/O processing business rules data management Storage logic data storage and retrieval DBMS functions

Server System Architecture : Server System Architecture Server systems can be broadly categorized into two kinds: TRANSACTION SERVERS which are widely used in relational database systems. DATA SERVERS, used in object-oriented database systems

Transaction Servers : Transaction Servers Also called query server systems or SQL server systems Clients send requests to the server Transactions are executed at the server Results are shipped back to the client. Requests are specified in SQL, and communicated to the server through a remote procedure call (RPC) mechanism. Transactional RPC allows many RPC calls to form a transaction. Open Database Connectivity (ODBC) is a C language application program interface standard from Microsoft for connecting to a server, sending SQL requests, and receiving results. JDBC standard is similar to ODBC, for Java

Slide 14 : RPC – Remote Procedure Calls (RPC) client makes calls to procedures running on remote computers SQL-oriented Data Access Middleware between applications and database servers JDBC – Java Database Connectivity Special Java classes that allow Java applications/applets to connect to databases ODBC – Open Database Connectivity Most DB vendors support this

Slide 15 : Client Program Client Waiting RPC Call with Request return ( ) reply Request Completed return() answer Service Call Invoke Service Service Daemon Listening Network Client Machine Server Machine Service Executes May be the same machine Flow Control in a Sychronous RPC

Transaction System Structure : Transaction System Structure

Transaction Server Process Structure : Transaction Server Process Structure A typical transaction server consists of multiple processes accessing data in shared memory. Server processes These receive user queries (transactions), execute them and send results back Processes may be multithreaded, allowing a single process to execute several user queries concurrently Typically multiple multithreaded server processes Lock manager process Lock management is needed to synchronize concurrent access to objects from multiple transactions (possibly in clustered environments).

Transaction Server Processes (Cont.) : Transaction Server Processes (Cont.) Log writer process Server processes simply add log records to log record buffer Log writer process outputs log records to stable storage. Checkpoint process Performs periodic checkpoints Process monitor process Monitors other processes, and takes recovery actions if any of the other processes fail E.g. aborting any transactions being executed by a server process and restarting it. Database writer process Output modified buffer blocks to disks continually

Transaction System Processes (Cont.) : Transaction System Processes (Cont.) Shared memory contains shared data Buffer pool Lock table Log buffer Cached query plans (reused if same query submitted again) All database processes can access shared memory To ensure that no two processes are accessing the same data structure at the same time, databases systems implement mutual exclusion using either Operating system semaphores Atomic instructions such as test-and-set To avoid overhead of interprocess communication for lock request/grant, each database process operates directly on the lock table instead of sending requests to lock manager process Lock manager process still used for deadlock detection

Data Server : Data Server Data-oriented; used only for data storage and management Since a data server can serve more than one compute server, compute-intensive applications can be spread among multiple severs Does not prefer any application logic processing Performs processes such as data validation, required as part of the data management function. Requires fast processor, large amount of memory and substantial Hard disk capacity.

Data Servers : Data Servers Used in high-speed LANs, in cases where The clients are comparable in processing power to the server The tasks to be executed are compute intensive. Data are shipped to clients where processing is performed, and then shipped results back to the server. This architecture requires full back-end functionality at the clients. Used in many object-oriented database systems Issues: Page-Shipping versus Item-Shipping Locking Data Caching Lock Caching

Data Servers (Cont.) : Data Servers (Cont.) Page-shipping versus item-shipping Smaller unit of shipping  more messages Worth prefetching related items along with requested item Page shipping can be thought of as a form of prefetching Locking Overhead of requesting and getting locks from server is high due to message delays Can grant locks on requested and prefetched items; with page shipping, transaction is granted lock on whole page. Locks on a prefetched item can be P{called back} by the server, and returned by client transaction if the prefetched item has not been used. Locks on the page can be deescalated to locks on items in the page when there are lock conflicts. Locks on unused items can then be returned to server.

Data Servers (Cont.) : Data Servers (Cont.) Data Caching Data can be cached at client even in between transactions But check that data is up-to-date before it is used (cache coherency) Check can be done when requesting lock on data item Lock Caching Locks can be retained by client system even in between transactions Transactions can acquire cached locks locally, without contacting server Server calls back locks from clients when it receives conflicting lock request. Client returns lock once no local transaction is using it. Similar to deescalation, but across transactions.

Client/Server Security : Client/Server Security Network environment  complex security issues Security levels: System-level password security for allowing access to the system Database-level password security for determining access privileges to tables; read/update/insert/delete privileges Secure client/server communication via encryption 24

The Client/Server Infrastructure : Client Middleware Server GUI/OOUI Objects Groupware TP monitor DBMS DSM Operating System SQL/IDAPI TxRPC Mail ORB NetBIOS TCP/IP IPX/SPX SNA Messaging Peer-to-peer Directory Security Distributed file SNMP CMIP DME RPC Service Specific DSM NOS Transport Stack Operating System DSM The Client/Server Infrastructure

THANK YOU : THANK YOU 26

Want to learn?

Sign up and browse through relevant courses.

Name:
Your Email:
Password:
Country:
Contact no:


Area code Number
Subjects you are interested in:
Word verification: (Enter the text as in image)


Sign Up Already a member? Sign In
I agree to WizIQ's User Agreement & Privacy Policy
R.Shanthi victoria
Lecturer-Computer Science
User
31 Followers

Your Facebook Friends on WizIQ

Explore Similar Courses

Give live classes, create & sell online courses

Try it free Plans & Pricing

Connect