Cairo University

16
Cairo University Cairo University Faculty of Science-Computer Science Department Faculty of Science-Computer Science Department Distributed CS (308) Distributed CS (308) ------------------------------------------------------------ ------------------------------------------------------------ ---------------------------------------- ---------------------------------------- Group 2 Group 2 1-Heba EzZ 1-Heba EzZ 2-Dina Mostafa 2-Dina Mostafa 3-Rehab Abdel-Fatah 3-Rehab Abdel-Fatah 4-Asmaa Youssry 4-Asmaa Youssry 5-Somaya Abdel-Kereem 5-Somaya Abdel-Kereem 6-Ahmed Awad 6-Ahmed Awad 7-Mohamed Hamdy 7-Mohamed Hamdy Under supervisor: Dr. Hatam . Under supervisor: Dr. Hatam . Welcome

description

Cairo University Faculty of Science-Computer Science Department Distributed CS ( 308) ---------------------------------------------------------------------------------------------------- Group 2 - PowerPoint PPT Presentation

Transcript of Cairo University

Page 1: Cairo University

Cairo UniversityCairo University

Faculty of Science-Computer Science Department Faculty of Science-Computer Science Department

Distributed CS (308) Distributed CS (308)

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Group 2 Group 2

1-Heba EzZ 1-Heba EzZ 2-Dina Mostafa2-Dina Mostafa

3-Rehab Abdel-Fatah3-Rehab Abdel-Fatah4-Asmaa Youssry4-Asmaa Youssry

5-Somaya Abdel-Kereem5-Somaya Abdel-Kereem6-Ahmed Awad6-Ahmed Awad

7-Mohamed Hamdy7-Mohamed Hamdy

Under supervisor: Dr. Hatam .Under supervisor: Dr. Hatam .

Welcome ☺

Page 2: Cairo University

Chapter One Chapter One

1.5.2-Application Layering1.5.2-Application Layering

The client-server model has been subject to many debates and The client-server model has been subject to many debates and controversies.controversies.

One of the main issues was how to draw a clear distinction One of the main issues was how to draw a clear distinction between a client and a server. Not surprisingly, there is often no between a client and a server. Not surprisingly, there is often no clear distinction. clear distinction.

For example, a server for a distributed database may For example, a server for a distributed database may continuously act as a client because it is forwarding requests to continuously act as a client because it is forwarding requests to different file servers responsible for implementing the database different file servers responsible for implementing the database tables.tables.

In such a case, the database server itself essentially does no In such a case, the database server itself essentially does no more than process queries .more than process queries .

Page 3: Cairo University

However, considering that many client-server applications are However, considering that many client-server applications are targeted toward supporting user access to databases, many targeted toward supporting user access to databases, many people have advocated a distinction between the following three people have advocated a distinction between the following three levels:levels:

1. The user-interface level1. The user-interface level

2. The processing level2. The processing level

3. The data level3. The data level

The user-interface level :The user-interface level :

contains all that is necessary to directly interface contains all that is necessary to directly interface with with the the user, such as display management. user, such as display management. The processing level :The processing level :

typically contains the applications.typically contains the applications.The Data level:The Data level:

contains the actual data that is being acted on.contains the actual data that is being acted on.

In the following sections, we discuss each of these levels.In the following sections, we discuss each of these levels.

Page 4: Cairo University

1-User-Interface Level1-User-Interface Level

Clients typically implement the user-interface level. Clients typically implement the user-interface level. This level consists of the programs that allow end This level consists of the programs that allow end users to interact with applications. users to interact with applications. There is a considerable difference in how There is a considerable difference in how sophisticated user-interface programs are.sophisticated user-interface programs are.The simplest user-interface program is nothing more The simplest user-interface program is nothing more than a character-based screen. than a character-based screen. Such an interface has been typically used in Such an interface has been typically used in mainframe environments. mainframe environments. In In those cases where the mainframe controls those cases where the mainframe controls all all interaction, including the interaction, including the keyboard and monitor, keyboard and monitor, one can hardly speak of a client-server environment. one can hardly speak of a client-server environment.

Page 5: Cairo University

However, in many cases, the user's terminal However, in many cases, the user's terminal does some local processing such as echoing does some local processing such as echoing typed keystrokes, or supporting form-like typed keystrokes, or supporting form-like interfaces in which a complete entry is to be interfaces in which a complete entry is to be edited before sending it to the main computer.edited before sending it to the main computer.

Nowadays,Nowadays, even in mainframe environments, even in mainframe environments, we see more advanced user interfaces. we see more advanced user interfaces.

Typically, the client machine offers at least a Typically, the client machine offers at least a graphical display in which pop-up or pull-down graphical display in which pop-up or pull-down menus are used, and of which much of the menus are used, and of which much of the screen controls are handled through a mouse screen controls are handled through a mouse instead of the keyboard.instead of the keyboard.

Page 6: Cairo University

Modem user interfaces offer considerably more Modem user interfaces offer considerably more functionality by allowing applications to share a single functionality by allowing applications to share a single graphical window, and to use that window graphical window, and to use that window to to exchange exchange data through user actions. data through user actions.

** ** For example:For example:

To delete a file, it is often possible to move the To delete a file, it is often possible to move the icon representing that file to an icon representing a icon representing that file to an icon representing a trash can.trash can.

Likewise, many word processors allow a user to move Likewise, many word processors allow a user to move text in a document to another position by using only text in a document to another position by using only the mouse.the mouse.

**** We return to user interfaces in Chap. 3. We return to user interfaces in Chap. 3.

Page 7: Cairo University

2-Processing Level2-Processing Level

Many client-server applications can be constructed Many client-server applications can be constructed from roughly three different pieces: from roughly three different pieces:

1-A part that handles interaction with a user, 1-A part that handles interaction with a user,

2-A part that operates on a database or file 2-A part that operates on a database or file system, system,

3-A middle part that generally contains the core 3-A middle part that generally contains the core functionality of an application. functionality of an application. This This middle part middle part is logically placed at the is logically placed at the processingprocessing

level. level. In contrast to user interfaces and databases, there In contrast to user interfaces and databases, there are not many aspects common to the processing level. are not many aspects common to the processing level.

Page 8: Cairo University

Therefore, we shall give a number of examples to make this level Therefore, we shall give a number of examples to make this level clearer.clearer.

** ** first example:first example: consider an consider an Internet search engineInternet search engine.. Ignoring all the Ignoring all the animated banners, images, and other fancy animated banners, images, and other fancy window dressing, the user interface of a search engine is very window dressing, the user interface of a search engine is very simple: a user types in a string of keywords and is subsesimple: a user types in a string of keywords and is subsequently quently presented with a list of titles of Web pages. presented with a list of titles of Web pages.

The back end is formed by a huge database of Web pages that The back end is formed by a huge database of Web pages that have been prefetched and indexed. have been prefetched and indexed.

The core of the search engine is a program that transforms the The core of the search engine is a program that transforms the user's string of keywords into one or more database queries.user's string of keywords into one or more database queries.

It subsequently ranks the results into a list, and transforms that It subsequently ranks the results into a list, and transforms that List into a series of HTML pages .List into a series of HTML pages .

Page 9: Cairo University

Within the client-server model, this information Within the client-server model, this information retrieval part is typically placed at the processing level. retrieval part is typically placed at the processing level. Fig. 1-28Fig. 1-28

shows this organization.shows this organization.

** ** Second example:Second example:

consider a decision support system for a stock consider a decision support system for a stock brokerage.brokerage. Analogous to a search engine, such a system can be Analogous to a search engine, such a system can be divided into :divided into :

I.I.A front end A front end implementing the user interface .implementing the user interface .

II.II.A back end A back end for accessing a database with the financial for accessing a database with the financial data data

III.III.The analysis programs between these twoThe analysis programs between these two. .

Page 10: Cairo University

Analysis of financial Analysis of financial data may require data may require sophisticated methods and techniques from sophisticated methods and techniques from statistics and artificialstatistics and artificial

intelligence. intelligence. In some cases, the core of a financial decision In some cases, the core of a financial decision

support system may even need to be executed on support system may even need to be executed on high-performance computers in order to achieve high-performance computers in order to achieve the throughput and responsiveness that is the throughput and responsiveness that is expected from its users.expected from its users.

** ** Third example Third example

consider a typical desktop package, consisting of a consider a typical desktop package, consisting of a word processor, a spreadsheet application, word processor, a spreadsheet application, communication facilities, and so on. communication facilities, and so on.

(e.g.) (e.g.) "office" "office" suites are generally integrated through a suites are generally integrated through a common user interface that supports compound common user interface that supports compound documents, and operates on tiles from the user's documents, and operates on tiles from the user's home directory.home directory.

Page 11: Cairo University

In this case, the processing level consists of a In this case, the processing level consists of a relatively large collection of programs, each having relatively large collection of programs, each having rather simple processing capabilities.rather simple processing capabilities.

Page 12: Cairo University

3-Data Level3-Data LevelThe data Level in the client-serves model contains the The data Level in the client-serves model contains the programs that maintain the actual data on which the programs that maintain the actual data on which the applications operate. applications operate.

An important properly of this level is that data are An important properly of this level is that data are persistent, that is, even if no application is persistent, that is, even if no application is running, data will running, data will be stored somewhere for next use.be stored somewhere for next use.

In its simplest form, the data level consists of aIn its simplest form, the data level consists of a

file system, but it is more common to use a full-fledged file system, but it is more common to use a full-fledged database. database.

In the client-server model, the data level is typically In the client-server model, the data level is typically implemented at the server side.implemented at the server side.

Page 13: Cairo University

Besides merely storing data, the data level is Besides merely storing data, the data level is generally also responsible for keeping data consistent generally also responsible for keeping data consistent across different applications. across different applications.

When databases are being When databases are being used, maintaining used, maintaining consistency means that metadata such as table consistency means that metadata such as table descriptions, descriptions, entry constraints and application-entry constraints and application-specific metadata are also stored at specific metadata are also stored at this level.this level.

** For example:** For example:

In the case of a bank, we may want to generate In the case of a bank, we may want to generate a notification when a customer's credit card debt a notification when a customer's credit card debt reaches a certain value, This type of information can be reaches a certain value, This type of information can be maintained through a database trigger that activates a maintained through a database trigger that activates a handler For bat trigger at the handler For bat trigger at the appropriate moment.appropriate moment.

Page 14: Cairo University

In traditional In traditional business-oriented environmentsbusiness-oriented environments, the , the data level is organized as a relational database, Data data level is organized as a relational database, Data independence is a keyword here. independence is a keyword here.

The data The data are organized are organized independent of the independent of the applications in such a applications in such a way that changes in that way that changes in that organization do organization do not affect applications, and neither not affect applications, and neither do the applications affect the data organization.do the applications affect the data organization.

Using Using relational databases relational databases in the client-server model in the client-server model helps us separate the processing level from the data helps us separate the processing level from the data level, as processing and data are considered level, as processing and data are considered independentindependent . .

Page 15: Cairo University

However, there is a growing class of applications for However, there is a growing class of applications for which relational databases which relational databases are not the ideal choiceare not the ideal choice. .

A characteristic feature of these applications is A characteristic feature of these applications is thatthat

they operate on complex data types that are they operate on complex data types that are more more easily modeled in terms of objects than in terms of easily modeled in terms of objects than in terms of relations.relations.

Examples of such data types range from simpleExamples of such data types range from simple

polygons and circles to representations of aircraft polygons and circles to representations of aircraft designs, as is the case with computer-aided design designs, as is the case with computer-aided design (CAD) systems. (CAD) systems.

Likewise, for multimedia systems it is much easier to Likewise, for multimedia systems it is much easier to operate on data types for audio and video streams operate on data types for audio and video streams with their specific operations, than to model such with their specific operations, than to model such streams in the form of tables of relations.streams in the form of tables of relations.

Page 16: Cairo University

In those cases where data operations are more In those cases where data operations are more easily expressed in terms of easily expressed in terms of object manipulationsobject manipulations, it , it makes sense to implement the data level by means of makes sense to implement the data level by means of an an object-oriented database. object-oriented database.

Such a database not only supports the organization Such a database not only supports the organization ofof

complex data in terms of objects, but also complex data in terms of objects, but also stores the implementation of the operations stores the implementation of the operations on on those objects.those objects.

Consequently, part of the functionality that was Consequently, part of the functionality that was found infound in

the processing Level is now moved to the data level.the processing Level is now moved to the data level.