Client-Server and Service-Oriented Arch

145 downloads 703 Views 155KB Size Report
Lecture: Client-Server and Service-Oriented Architecture. A. O'Riordan, 2009 ... server. Digitized photographs. Hypertext server. Hypertext web. Client 1. Client 2. Client 3. Client 4 ... Easy to add new servers or upgrade existing servers. ▫.
CS560 Lecture: Client-Server and Service-Oriented Architecture

A. O’Riordan, 2009 Based on slides by I. Sommerville

Distributed Systems 





Virtually all large computer-based systems are now distributed systems. Information processing is distributed over several computers rather than confined to a single machine. Different distributed systems architectures     

parallel/cluster/grid computing client-server distributed object architectures - CORBA; .NET; J2EE peer-to-peer service-oriented architectures 

Distributed system characteristics  

  

 

Resource sharing - sharing of hardware and software resources Openness – use of equipment and software from different vendors Concurrency - concurrent processing to enhance performance Scalability -increased throughput by adding new resources Fault tolerance - ability to continue in operation after a fault as occurred Security Manageability

Middleware 

Software that manages and supports the different components of a distributed system. In essence, it sits in the middle of the system.



Middleware can be off-the-shelf rather than specially written software



Examples   

Transaction processing monitors; Data converters; Communication controllers.

Client-server architecture 

Distributed system model where data and processing is distributed across a range of components



Set of servers which provide specific services such as printing, data management, etc.



Set of clients which call on these services



Network which allows clients to access servers



Clients know of servers but servers need not know of clients

Example: Film and picture library Client 1

Client 2

Client 3

Client 4

Wide-bandwidth network

Catalogue server

Video server

Picture server

Hypertext server

Catalogue

Film clip files

Digitiz ed photographs

Hypertext web

Computers in a C/S network c1 CC1

c2 CC2

c3, c4 CC3

Network

s1, s2

s3, s4

SC2

Server computer

SC1

c5, c6, c7

c8, c9 CC4

CC5

c10, c1 1, c1 2 CC6

Client computer

Client-server characteristics 

Advantages    



Distribution of data is straightforward Makes effective use of networked systems May require cheaper hardware Easy to add new servers or upgrade existing servers

Disadvantages 

 

No shared data model so sub-systems use different data organisation - data interchange may be inefficient Redundant management in each server No central register of names and services - it may be hard to find out what servers and services are available

Layered application architecture 

Presentation layer 



Concerned with presenting the results of a computation to system users and with collecting user inputs

Application processing layer

Presentation layer

Concerned with providing application specific functionality e.g., in a banking system, banking functions such as open account, close account, etc. 

Application processing layer 

Data management layer 

Concerned with managing the system databases Data management layer

Thin and fat clients 

Thin-client model 





all of the application processing and data management is carried out on the server client is simply responsible for running the presentation software

Fat-client model  

the server is only responsible for data management software on the client implements the application logic and the interactions with the system user

Thin and fat clients Presentation Thin-client model

Data management Application processing

Client

Presentation Application processing Fat-client model

Client

Server

Server Data management

Scaling  

Environment is typically heterogeneous and multi-vendor Client-server systems can be scaled horizontally or vertically 





Horizontal scaling means adding or removing client workstations with only a slight performance impact. Vertical scaling means migrating to a larger and faster server machine or multi servers.

The front-end task and back-end task have fundamentally different requirements for computing resources 



servers typically expensive, fast, multi-processor systems, with large storage capacity clients less expensive

Tiering 

A two-tier architecture is one where a client talks directly to a server, with no intervening server 



This type of architecture is typically used in small environments with less than 50 users

A three-tier architecture introduces another server (or an "agent") between the client and the server 



The role of the middle-tier agent is many-fold - it can provide translation services as in adapting a legacy application on a mainframe to a client/server environment A plethora of software technologies have evolved to fill the middle tier - middleware

Three-tier architectures 

In a three-tier architecture, each of the application architecture layers may execute on a separate processor



Allows for better performance than a thin-client approach and is simpler to manage than a fat-client approach



A more scalable architecture - as demands increase, extra servers can be added Presentation Server Client

Application processing

Server Data management

Example: An internet banking system Client

Client

HTTP interaction

SQL query Account service provision

Client

Client

Database server

Web server

SQL

Customer account database

Service-oriented architectures 



Based around the notion of externally provided services (web services). A web service is a standard approach to making a reusable component available and accessible across the web 

A tax filing service could provide support for users to fill in their tax forms and submit these to the tax authorities.

Web services Service registry Publish

Find

Service provider

Service requestor Bind

service

Service-oriented characteristics       

Provider independence Public advertising of service availability Potentially, run-time service binding Opportunistic construction of new services through composition Pay for use of services Smaller, more compact applications Reactive and adaptive applications

Web Services standards 

Web Services are based on agreed, XML-based standards so can be provided on any platform and written in any programming language.



Key W3C standards (see www.w3c.org)   



SOAP - Simple Object Access Protocol; WSDL - Web Services Description Language; UDDI - Universal Description, Discovery and Integration

Representational state transfer (REST) is a simpler style of software architecture for distributed systems such as the Web.

Services scenario 



An in-car information system provides drivers with information on weather, road traffic conditions, local information etc. This is linked to car radio so that information is delivered as a signal on a specific radio channel. The car is equipped with GPS receiver to discover its position and, based on that position, the system accesses a range of information services. Information may be delivered in the driver’s specified language.

Automotive system Road traffic info Weather info

Facilities info

gps coord

Road locator gps coord

gps coord

Mobile Info Service Translator

Info stream

Collates information Language info

Receiver Receives informationstream from services

Traffic info

Servicediscovery Finds available services

command gps coord

Transmitter

User inter face

Sendspositionand informationrequest to services

Receives request from user

Radio

Locator

Translates dig ital info stream to radio signal

Discovers car position In-car software system