Distributed Software Chapter 18 - Distributed Software1.

25
S Distributed Software Chapter 18 - Distributed Software 1

Transcript of Distributed Software Chapter 18 - Distributed Software1.

Page 1: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software1

S

Distributed Software

Page 2: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software2

Why Distributed Solutions?

Resource sharing Processor, disk, printer

Resource Utilization – off hours CPU usage

Performance – multiple processor usage

Availability – widespread locations

Scalability – “out not up”

Fault tolerance – depends on implementation

Page 3: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software3

Challenges

Transparancy

Openness (use of standard protocols)

Security

Scalability

Quality of Service Dependence on network bandwidth Key issue for streaming media

Failure Management Detection of failure Redirection of service

Page 4: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software4

Security

Threats Interception Interrumption Modification Fabrication

Difficulty Managing a policy over all components

Page 5: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software5

Model of InteractionRemote Procedure Call

RPC (Remote Procedure Call) Client:

Calling program calls a stub for the function, e.g. ComputeArea(width,height, area)

Stub packs request, parameters into data packet (marshalling) and sends to server

Server Receives request, separates the data (unmarshalling), calls

function with parameters Packs resulting values, sends response to client system

Client Stub receives response, unpacks data Returns values to calling code

Example CAD system

Page 6: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software6

Models of InteractionMessages

Messages

Not based on a stub waiting for a response.

HTTP Client sends a “GET” message with multiple lines of

parameters to server Server sends data (web page to client) Client sends “GET” messages to server to get images Server sends responses to client

Author’s example - waiter to staff Uses a standard format – XML (p 486)

Page 7: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software7

RPC vs Messages

RPC Client calls functions that appear local Functions developed at other end Stubs at both ends make this appear seamless

Messages Each component (client or server) must:

Formulate and send messages Interpret the messages from other components

Page 8: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software8

Client-ServerWhere do you use it?

Browser – Web Server – provides web pages

Local system – DHCP server – Get IP address

Local System – DNS server – Translate web names (www.google.com) to IP address (122.33.212.2)

Local System – Time Server – get current time

Email – SMTP Server – sends email

Email – POP Server – receives email

Page 9: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software9

Client-ServerWhere do you use it?

Local Application – DB server – read/write database

Local Application – File server – read/write files

Skype – Skype server – Connect to other user

FTP – FTP Server – store, retrieve files on server

I Tunes – Itunes Server – get audio, video, podcasts

Music Plugin – Media server – Streaming media (audio, video)

Log in to domain – Domain Server - authentication

Page 10: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software10

Distributed ArchitecturePatterns

Master- Slave

2 tier

Multi-Tier

Distributed

Peer-Peer

Page 11: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software11

Master-Slave

Intent – control Master – drives all activities Slave – responds to master

Page 12: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software12

(Master – Slave)

Examples SCADA – Supervisory Control and Acquisition

Gas Piping Network Power Plant Power Grid Chemical Plant

Network Management SNMP – Simple Network Management Protocol

Page 13: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software13

2-Tier

Thin Client Characteristics

Client software largely for display, interaction Business processing done at server Utilizes server resources, allows for slower, more limited clients Client software seldom needs updates Updating software on server makes upgrades easy

Examples Web Browser (with server side scripting) Citrix Server

Page 14: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software14

(2-Tier)

Fat client Characteristics

Most processing occurs on client Relies on server for data storage Relies on power of client, offloads server Updating the client software may require more work

Examples Web broswer (pages implemented with JavaScript) Custom applications accessing a database

Page 15: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software15

Multi-Tier

More and more common 2 Tier architecture does not have enough capability

Common Client (Web Browser) Server (Web Server) Database (Database server)

Could be more Web server could access a program that in turn accesses a

database

Page 16: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software16

Distributed Architectures

Characteristics Multiple systems cooperate to provide services Not layered Expandable by adding new nodes Middleware that acts as a communicator

Page 17: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software17

Distributed Architectures

Examples DNS – Domain Name system

Provides mapping of domain names (google.com) to IP (122.22.22.3)

Different servers responsible for partitions of the global namespace

Replication of data allows separate servers to provide the same information

Response to a request may involve several servers The DNS system manages itself as a distributed

architectures. Clients access one of the servers as a server Often referred to as a “hierarchical distributed

database”

Page 18: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software18

(Distributed Architectures)

Examples Routers

Every PC on a network is configured to find addresses via the router (default gateway)

Configured to know how to find any IP address on the Internet Configured to be responsible for some range of IP addresses Communicates through routing protocols to other routers Routing protocols configure neighboring routers

Database replication Databases can be live backups of a database

Page 19: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software19

Distributed Systems

Disadvantages Complex to design No common middleware to help coordinate systems

Corba, JavaBeans, .net

Page 20: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software20

Peer-Peer Architecture

No server is in control – systems talk to each other

Generally for small, local networks

General areas: Computationally intense, but distributable tasks Local information sharing

Page 21: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software21

Peer-Peer Architecture

WINS - Window Internet Naming System Microsoft naming system for small networks Individual systems contact peers to discover system

names

VOIP – Voice Over IP Skype, Vonage, Cisco phone systems. Systems access a server to set up a call

Server keeps list of participating systems Ongoing communication is directly between two peers.

Page 22: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software22

Software as a Service

Characteristics User does not buy software license

Software not installed on the user’s system User subscribes to use the service over the Internet

Generally delivered on web pages and accessed via a browser Can be based on other servers and clients (Citrix,

Microsoft) Server stores data for the user

Page 23: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software23

Software as a ServiceExamples

Voter Targeting

Google Apps Gmail Google Docs Calendar

Ancestry.com

Page 24: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software24

Software as a Service

Advantages Installation is not needed. Setup is minimal Updating software only needs to be done on the

server Users do not have to manage backups

Page 25: Distributed Software Chapter 18 - Distributed Software1.

Chapter 18 - Distributed Software25

Software as a Service

Challenges Performance with many users on a server Problems can escalate with many users on system Separation of data Security Scalability Configuration per user

No custom software per user Backup