SlideShare a Scribd company logo
Distributed Systems
Outline
1. What is a Distributed System
2. Why bother with them?
3. Examples of Distributed Systems
4. Common Characteristics
5. Goals
6. Summary
What is Distributed?
 Data are Distributed
» If data must exist in multiple computers for admin and ownership
reasons
 Computation is Distributed
» Applications taking advantage of parallelism, multiple processors,
» particular feature
» Scalability and heterogeneity of Distributed System
 Users are Distributed
» If Users communicate and interact via application (shared objects)
History of Distributed Computing
• 1940. The British Government came to the conclusion that 2
or 3 computers would be sufficient for UK.
• 1960. Mainframe computers took up a few hundred square
feet.
• 1970. First Local Area Networks (LAN) such as Ethernet.
• 1980. First network cards for PCs.
• 1990. First wide area networks, the Internet, that evolved
from the US Advanced Research Projects Agency net
(ARPANET, 4 nodes in 1969) and was, later, fueled by the
rapid increase in network bandwith and the invention of the
World Wide Web at CERN in 1989.
Distributed System Types (Enslow 1978)
Fully Distributed
Processors
Control
Fully replicated
Not fully replicated master directory
Local data, local directory
Master-slave
Autonomous transaction based
Autonomous fully cooperative
Homog.
special
purpose
Heterog.
special
purpose
Homog.
general
purpose
Heterog.
general
purpose
What is a Distributed System?
A collection of components that execute on different
computers. Interaction is achieved using a computer network.
A distributed system consists of a collection of autonomous
computers, connected through a network and distributed
operating system software, which enables computers to
coordinate their activities and to share the resources of the
system, so that users perceive the system as a single, integrated
computing facility.
Centralised System Characteristics
• Non-autonomous parts: The system possesses full control.
• Homogeneous: Constructed using the same technology (e.g.,
same programming language and compiler for all parts).
• Component shared by all users all the time.
• All resources accessible.
• Software runs in a single process.
• Single Point of control.
• Single Point of failure (either they work or they do not
work).
Distributed System Characteristics
• Multiple autonomous components.
• Heterogeneous.
• Components are not shared by all users.
• Resources may not be accessible.
• Software runs in concurrent processes on different
processors.
• Multiple Points of control.
• Multiple Points of failure (but more fault tolerant!).
Model of a Distributed System
Component 1 Component n
Middleware
Network Operating
System
Hardware
Host 1
Component 1 Component n
Middleware
Network Operating
System
Hardware
Host n
..
..
………...
Network
Examples of Distributed Systems
• Local Area Network
• Database Management System
• Automatic Teller Machine Network
• World-Wide Web
Local Area Network
Database Management System
Automatic Teller Machine Network
What Is A Distributed System?
• A collection of independent computers that
appears to its users as a single coherent system.
• Features:
– No shared memory – message-based communication
– Each runs its own local OS
– Heterogeneity
• Ideal: to present a single-system image:
– The distributed system “looks like” a single
computer rather than a collection of separate
computers.
Advantages and disadvantages
Advantages
 Economics
 Speed
 Inherent distribution
 Reliability
 Incremental growth
Disadvantages
 Software
 Network
 More components to fail
Common Characteristics
• What are we trying to achieve when we
construct a distributed system?
• Certain common characteristics can be used
to assess distributed systems
– Resource Sharing
– Openness
– Concurrency
– Scalability
– Fault Tolerance
– Transparency
Resource Access and Sharing
• Ability to use any hardware, software or data
anywhere in the system ... once authorised!.
• Security implications: Resource manager
controls access, provides naming scheme and
controls concurrency.
• Resource sharing model:
client/server vs n-tier architectures.
Openness
• Openness is concerned with extensions and
improvements of distributed systems.
• Detailed interfaces of components need to be
standardized and published.
• It is crucial because the overall architecture
needs to be stable even in the face of
changing functional requirements.
Concurrency
• Components in distributed systems are
executed in concurrent processes.
• Components access and update shared
resources (e.g. variables, databases, device
drivers).
• Integrity of the system may be violated if
concurrent updates are not coordinated.
– Lost updates
– Inconsistent analysis
Scalability
• Adaptation of distributed systems to
– accommodate more users
– respond faster (this is the hard one)
• Usually done by adding more and/or faster
processors.
• Components should not need to be changed
when scale of a system increases.
• Design components to be scalable!
Fault Tolerance
• Hardware, software and networks fail!
• Distributed systems must maintain
availability even at low levels of
hardware/software/network reliability.
• Fault tolerance is achieved by
– Redundancy (replication)
– Recovery
– Design
Transparency
• Distributed systems should be perceived by users
and application programmers as a whole rather than
as a collection of cooperating components.
• Transparency has different aspects that were
identified by ANSA (Advanced Network Systems
Architecture).
• These represent properties that a well-designed
distributed systems should have
• They are dimensions against which we measure
middleware components.
Access Transparency
• Enables local and remote information objects to be accessed
using identical operations, that is, the interface to a service
request is the same for communication between components
on the same host and components on different hosts.
• Example: File system operations in Unix Network File
System (NFS).
• A component whose access is not transparent cannot easily
be moved from one host to the other. All other components
that request services would first have to be changed to use a
different interface.
Location Transparency
• Enables information objects to be accessed
without knowledge of their physical
location.
• Example: Pages in the Web.
• Example: When an NFS administrator moves
a partition, for instance because a disk is full,
application programs accessing files in that
partition would have to be changed if file
location is not transparent for them.
Migration Transparency
• Allows the movement of information objects within a
system without affecting the operations of users or
application programs.
• It is useful, as it sometimes becomes necessary to move a
component from one host to another (e.g., due to an
overload of the host or to a replacement of the host
hardware).
• Without migration transparency, a distributed system
becomes very inflexible as components are tied to particular
machines and moving them requires changes in other
components.
Replication Transparency
• Enables multiple instances of information
objects to be used to increase reliability and
performance without knowledge of the
replicas by users or application programs.
• Example: Distributed DBMS.
• Example: Mirroring Web Pages.
Concurrency Transparency
• Enables several processes to operate
concurrently using shared information
objects without interference between them.
Neither user nor application engineers have
to see how concurrency is controlled.
• Example: Bank applications.
• Example: Database management system.
Scalability Transparency
• Allows the system and applications to
expand in scale without change to the system
structure or the application algorithms.
• How system behaves with more components
• Similar to performance Transparency, i.e
QoS provided by applications.
• Example: World-Wide-Web.
• Example: Distributed Database.
Performance Transparency
• Allows the system to be reconfigured to
improve performance as loads vary.
• Consider how efficiently the system uses
resources.
• Relies on Migration and Replication
transparency
• Example: TCP/IP routes according to traffic.
• Load Balancing.
• Difficult to achieve because of dynamism
Failure Transparency
• Enables the concealment of faults!
• Components can be designed without taking into
account that services they rely on might fail.
• Server components can recover from failures
without the server designer taking measures for
such recovery.
• Allows users and applications to complete their
tasks despite the failure of other components.
• Its achievement is supported by both concurrency
and replication transparency.
Dimensions Of Transparency
Scalability
Transparency
Migration
Transparency
Access
Transparency
Performance
Transparency
Replication
Transparency
Location
Transparency
Failure
Transparency
Concurrency
Transparency
Summary
• What is a distributed system and how does it
compare to a centralised system?
• What are the characteristics of distributed
systems?
• What are the different dimensions of
transparency?
Role of Middleware (MW)
• In some early research systems: MW tried
to provide the illusion that a collection of
separate machines was a single computer.
– E.g. NOW project: GLUNIX middleware
• Today:
– clustering software allows independent
computers to work together closely
– MW also supports seamless access to remote
services, doesn’t try to look like a general-
purpose OS
Middleware Examples
• CORBA (Common Object Request Broker
Architecture)
• DCOM (Distributed Component Object
Management) – being replaced by .net
• Sun’s ONC RPC (Remote Procedure Call)
• RMI (Remote Method Invocation)
• SOAP (Simple Object Access Protocol)
Middleware Examples
• All of the previous examples support
communication across a network:
• They provide protocols that allow a
program running on one kind of computer,
using one kind of operating system, to call a
program running on another computer with
a different operating system
– The communicating programs must be running
the same middleware.
Distributed System Goals
• Resource Accessibility
• Distribution Transparency
• Openness
• Scalability
Goal 1 – Resource Availability
• Support user access to remote resources (printers,
data files, web pages, CPU cycles) and the fair
sharing of the resources
• Economics of sharing expensive resources
• Performance enhancement – due to multiple
processors; also due to ease of collaboration and
info exchange – access to remote services
– Groupware: tools to support collaboration
• Resource sharing introduces security problems.
Goal 2 – Distribution Transparency
• Software hides some of the details of the
distribution of system resources.
– Makes the system more user friendly.
• A distributed system that appears to its users &
applications to be a single computer system is said
to be transparent.
– Users & apps should be able to access remote
resources in the same way they access local
resources.
• Transparency has several dimensions.
Types of Transparency
Transparency Description
Access Hide differences in data representation &
resource access (enables interoperability)
Location Hide location of resource (can use resource
without knowing its location)
Migration Hide possibility that a system may change
location of resource (no effect on access)
Replication Hide the possibility that multiple copies of the
resource exist (for reliability and/or availability)
Concurrency Hide the possibility that the resource may be
shared concurrently
Failure Hide failure and recovery of the resource. How
does one differentiate betw. slow and failed?
Relocation Hide that resource may be moved during use
Figure 1-2. Different forms of transparency in a distributed system
(ISO, 1995)
Goal 2: Degrees of Transparency
• Trade-off: transparency versus other factors
– Reduced performance: multiple attempts to
contact a remote server can slow down the
system – should you report failure and let user
cancel request?
– Convenience: direct the print request to my
local printer, not one on the next floor
• Too much emphasis on transparency may prevent
the user from understanding system behavior.
Goal 3 - Openness
• An open distributed system “…offers services according to
standard rules that describe the syntax and semantics of those
services.” In other words, the interfaces to the system are
clearly specified and freely available.
– Compare to network protocols
– Not proprietary
• Interface Definition/Description Languages (IDL): used to
describe the interfaces between software components, usually
in a distributed system
– Definitions are language & machine independent
– Support communication between systems using different
OS/programming languages; e.g. a C++ program running on Windows
communicates with a Java program running on UNIX
– Communication is usually RPC-based.
Examples of IDLs
Goal 3-Openness
• IDL: Interface Description Language
– The original
• WSDL: Web Services Description Language
– Provides machine-readable descriptions of the
services
• OMG IDL: used for RPC in CORBA
– OMG – Object Management Group
• …
• Interoperability: the ability of two different
systems or applications to work together
– A process that needs a service should be able to
talk to any process that provides the service.
– Multiple implementations of the same service
may be provided, as long as the interface is
maintained
• Portability: an application designed to run
on one distributed system can run on another
system which implements the same interface.
• Extensibility: Easy to add new components,
features
Open Systems Support …
Goal 4 - Scalability
• Dimensions that may scale:
– With respect to size
– With respect to geographical distribution
– With respect to the number of administrative
organizations spanned
• A scalable system still performs well as it
scales up along any of the three dimensions.
Size Scalability
• Scalability is negatively affected when the system is
based on
– Centralized server: one for all users
– Centralized data: a single data base for all users
– Centralized algorithms: one site collects all information,
processes it, distributes the results to all sites.
• Complete knowledge: good
• Time and network traffic: bad
Decentralized Algorithms
• No machine has complete information about
the system state
• Machines make decisions based only on
local information
• Failure of a single machine doesn’t ruin the
algorithm
• There is no assumption that a global clock
exists.
Geographic Scalability
• Early distributed systems ran on LANs, relied on
synchronous communication.
– May be too slow for wide-area networks
– Wide-area communication is unreliable, point-to-point;
– Unpredictable time delays may even affect correctness
• LAN communication is based on broadcast.
– Consider how this affects an attempt to locate a
particular kind of service
• Centralized components + wide-area
communication: waste of network bandwidth
Scalability - Administrative
• Different domains may have different
policies about resource usage, management,
security, etc.
• Trust often stops at administrative
boundaries
– Requires protection from malicious attacks
Scaling Techniques
• Scalability affects performance more than
anything else.
• Three techniques to improve scalability:
– Hiding communication latencies
– Distribution
– Replication
Hiding Communication Delays
• Structure applications to use asynchronous
communication (no blocking for replies)
– While waiting for one answer, do something else; e.g.,
create one thread to wait for the reply and let other
threads continue to process or schedule another task
• Download part of the computation to the
requesting platform to speed up processing
– Filling in forms to access a DB: send a separate
message for each field, or download form/code and
submit finished version.
– i.e., shorten the wait times
Scaling Techniques
Figure 1-4. The difference between letting (a) a server
or (b) a client check forms as they are being filled.
Distribution
• Instead of one centralized service, divide
into parts and distribute geographically
• Each part handles one aspect of the job
– Example: DNS namespace is organized as a
tree of domains; each domain is divided into
zones; names in each zone are handled by a
different name server
– WWW consists of many (millions?) of servers
Scaling Techniques (2)
Figure 1-5. An example of dividing the DNS
name space into zones.
Third Scaling Technique -
Replication
• Replication: multiple identical copies of
something
– Replicated objects may also be distributed, but
aren’t necessarily.
• Replication
– Increases availability
– Improves performance through load balancing
– May avoid latency by improving proximity of
resource
Caching
• Caching is a form of replication
– Normally creates a (temporary) replica of
something closer to the user
• Replication is often more permanent
• User (client system) decides to cache, server
system decides to replicate
• Both lead to consistency problems
Summary
Goals for Distribution
• Resource accessibility
– For sharing and enhanced performance
• Distribution transparency
– For easier use
• Openness
– To support interoperability, portability, extensibility
• Scalability
– With respect to size (number of users), geographic
distribution, administrative domains
Issues/Pitfalls of Distribution
• Requirement for advanced software to realize the
potential benefits.
• Security and privacy concerns regarding network
communication
• Replication of data and services provides fault
tolerance and availability, but at a cost.
• Network reliability, security, heterogeneity,
topology
• Latency and bandwidth
• Administrative domains
Types of Distributed Systems
• Distributed Computing Systems
– Clusters
– Grids
– Clouds
• Distributed Information Systems
– Transaction Processing Systems
– Enterprise Application Integration
• Distributed Embedded Systems
– Home systems
– Health care systems
– Sensor networks
Cluster Computing Systems
• Figure 1-6. An example of a cluster
computing system.
Figure 1-6. An example of a (Beowolf) cluster
computing system
Cluster Computing
• A collection of similar processors (PCs,
workstations) running the same operating
system, connected by a high-speed LAN.
• Parallel computing capabilities using
inexpensive PC hardware
• Replace big parallel computers (MPPs)
Cluster Types & Uses
• High Performance Clusters (HPC)
– run large parallel programs
– Scientific, military, engineering apps; e.g., weather
modeling
• Load Balancing Clusters
– Front end processor distributes incoming requests
– server farms (e.g., at banks or popular web site)
• High Availability Clusters (HA)
– Provide redundancy – back up systems
– May be more fault tolerant than large mainframes
Clusters – Beowulf model
• Linux-based
• Master-slave paradigm
– One processor is the master; allocates tasks to
other processors, maintains batch queue of
submitted jobs, handles interface to users
– Master has libraries to handle message-based
communication or other features (the
middleware).
Clusters – MOSIX model
• Provides a symmetric, rather than
hierarchical paradigm
– High degree of distribution transparency (single
system image)
– Processes can migrate between nodes
dynamically and preemptively (more about this
later.) Migration is automatic
• Used to manage Linux clusters
Grid computing system
Grid Computing Systems
• Modeled loosely on the electrical grid.
• Highly heterogeneous with respect to
hardware, software, networks, security
policies, etc.
• Grids support virtual organizations: a
collaboration of users who pool resources
(servers, storage, databases) and share them
• Grid software is concerned with managing
sharing across administrative domains.
Grids
• Similar to clusters but processors are more loosely
coupled, tend to be heterogeneous, and are not all
in a central location.
• Can handle workloads similar to those on
supercomputers, but grid computers connect over
a network (Internet?) and supercomputers’ CPUs
connect to a high-speed internal bus/network
• Problems are broken up into parts and distributed
across multiple computers in the grid – less
communication betw parts than in clusters.
Cloud Computing
• Provides scalable services as a utility over
the Internet.
• Often built on a computer grid
• Users buy services from the cloud
– Grid users may develop and run their own
software
• Cluster/grid/cloud distinctions blur at the
edges!
Types of Distributed Systems
• Distributed Computing Systems
– Clusters
– Grids
– Clouds
• Distributed Information Systems
• Distributed Embedded Systems
Transaction Processing System
Characteristic properties of transactions:
 Atomic: To the outside world, the transaction
happens indivisibly.
 Consistent: The transaction does not violate system
invariants.
 Isolated: Concurrent transactions do not interfere
with each other.
 Durable: Once a transaction commits, the changes
are permanent
Distributed Information Systems
• Business-oriented
• Systems to make a number of separate
network applications interoperable and
build “enterprise-wide information
systems”.
• Two types discussed here:
– Transaction processing systems
– Enterprise application integration (EAI)
Transaction Processing Systems
• Provide a highly structured client-server
approach for database applications
• Transactions are the communication model
• Obey the ACID properties:
– Atomic: all or nothing
– Consistent: invariants are preserved
– Isolated (serializable)
– Durable: committed operations can’t be undone
Transaction Processing Systems
• Figure 1-8. Example primitives for
transactions.
Transactions
• Transaction processing may be centralized
(traditional client/server system) or
distributed.
• A distributed database is one in which the
data storage is distributed – connected to
separate processors.
Nested Transactions
• A nested transaction is a transaction within
another transaction (a sub-transaction)
– Example: a transaction may ask for two things
(e.g., airline reservation info + hotel info) which
would spawn two nested transactions
• Primary transaction waits for the results.
– While children are active parent may only abort,
commit, or spawn other children
Transaction Processing Systems
Figure 1-9. A nested transaction.
Implementing Transactions
• Conceptually, private copy of all data
• Actually, usually based on logs
• Multiple sub-transactions – commit, abort
– Durability is a characteristic of top-level
transactions only
• Nested transactions are suitable for
distributed systems
– Transaction processing monitor may interface
between client and multiple data bases.
Enterprise Application Integration
• Less structured than transaction-based systems
• EA components communicate directly
– Enterprise applications are things like HR data,
inventory programs, …
– May use different OSs, different DBs but need to
interoperate sometimes.
• Communication mechanisms to support this
include CORBA, Remote Procedure Call (RPC)
and Remote Method Invocation (RMI)
Enterprise Application
Integration
Figure 1-11. Middleware as a communication facilitator in enterprise
application integration.
Distributed Pervasive Systems
• The first two types of systems are characterized by
their stability: nodes and network connections are
more or less fixed
• This type of system is likely to incorporate small,
battery-powered, mobile devices
– Home systems
– Electronic health care systems – patient monitoring
– Sensor networks – data collection, surveillance
Home System
• Built around one or more PCs, but can also
include other electronic devices:
– Automatic control of lighting, sprinkler
systems, alarm systems, etc.
– Network enabled appliances
– PDAs and smart phones, etc.
Electronic Health Care Systems
Figure 1-12. Monitoring a person in a pervasive electronic health care
system, using (a) a local hub or (b) a continuous wireless connection.
Sensor Networks
• A collection of geographically distributed nodes
consisting of a comm. device, a power source,
some kind of sensor, a small processor…
• Purpose: to collectively monitor sensory data
(temperature, sound, moisture etc.,) and transmit
the data to a base station
• “smart environment” – the nodes may do some
rudimentary processing of the data in addition to
their communication responsibilities.
Sensor Networks
Figure 1-13. Organizing a sensor network database, while storing and
processing data (a) only at the operator’s site or …
Sensor Networks
Figure 1-13. Organizing a sensor network database, while storing and
processing data … or (b) only at the sensors.
Summary – Types of Systems
• Distributed computing systems – our main
emphasis
• Distributed information systems – we will
talk about some aspects of them
• Distributed pervasive systems – not so
much
****
Questions?
Additional Slides
• Middleware: CORBA, ONC RPC, SOAP
• Distributed Systems – Historical
Perspective
• Grid Computing Sites
CORBA
COMMON OBJECT REQUEST
BROKER ARCHITECTURE
Architecture…
Introduction
CORBA (Common Object Request Broker
Architecture) is a standard that enables an
object written in one programming language,
running on one platform to interact with objects
across the network that are written in other
programming languages and running on other
platforms.
For example, a client object written in C++
and running under Windows can communicate
with an object on a remote machine written in
Java running under UNIX.
89
OMG
The CORBA specification was developed by the Object
Management Group (OMG).
The OMG is an international, not-for-profit group
consisting of approximately 800 companies and
organizations defining standards for distributed object
computing
CORBA is only one of the specifications they develop.
They are also behind other key object oriented standards
such as UML (Unified Modeling Language).
90
History
The OMG was established in 1988 and the initial CORBA
specification came out in 1992. Over the past 10 years
significant revisions have taken place.
Version 2.0, which defined a common protocol for specifying
how implementations from different vendors can
communicate, was released in the mid-nineties.
The current version of CORBA is 3.0, which introduced the
CORBA Component Model.
91
Today
Today, CORBA serves as middleware for a variety of large
enterprise level applications.
One of the most important and most frequent uses is for
servers that must handle a large number of clients, at high
hit rates, with high reliability.
The current users of CORBA are diverse - including The
Weather Channel, GNOME, US Army, CNN, and Charles
Schwab.
92
Uses of CORBA
• Provides high level object oriented interface
• Allows application and their objects to
communicate to each other no matter where
they are and or who designed them.
93
ORB
• ORB is “middle ware” based on client server model of
distributed computing, CORBA inserts a “broker” between server
and client
The ORB :
• Intercepts calls
• Finds object
• Invokes method
• Passes parameters
• Returns results or error messages
94
CLIENT SERVER/OBJECT
IMPLEMENTATION
Cont…
• Broker provides basic messaging and
communication between client and server,
“insulating “ applications from the specifics
of the system configuration
• Client transparently invokes methods on
server , either on same machine or across a
network.
95
Cont…
• The role of CORBA and the ORB are defined in
the Object Management Architecture
• Included within the OMA are four object
categories
96
Application
objects
CORBA
domains
CORBA
facilities
Object Request Broker
CORBAservices
Cont…
The four categories of the OMA:
• CORBA services: creation/movement of objects,
queries/transactions, concurrency control, directory
services
• CORBA domains are ‘vertical market’ standards. For
example: financial, medical, telecommunications and
manufacturing
• CORBA facilities include compound document and
system management. Both can be applied across multiple
vertical domains for added functionality
• Applications: user defined and proprietary interfaces97
CORBA Architecture
98
Three- tier CORBA Architecture
99
The Primary Elements
• IDL
– Interface Definition Language
• Client / Server CORBA Objects
– Abstract objects based upon a concrete implementation
• ORBs
– Object Request Brokers
• GIOP / IIOP
– General and Internet Inter-Object Protocols
100
Interface Definition Language
Defines public interface for any CORBA
server.
• C++ like syntax
• Client and Server implemented based on
compilation of the same IDL (usually)
• OMG has defined mappings for:
– C, C++, Java, COBOL, Smalltalk, ADA, Lisp, Python, and IDLscript
101
CORBA vs. DCOM
• DCOM supports an object-oriented model,
but differs substantially from classical OO
models. DCOM object provides services
through one or more distinct interfaces.
• DCOM is lack of polymorphism, instead, it
constructs application from binary
components.
102
CORBA vs. DCOM
• The major difference is CORBA is an open specification.
DCOM has the potential to evolve at a faster rate than
CORBA because the politics will be simpler.
• CORBA can be deployed far more widely than DCOM and
runs in most current OS environment, while DCOM is running
almost exclusively in the Windows environment.
103
CORBA vs. JAVA/RMI
• Some overlap between these two, both
provide a viable means of building
distributed applications.
• CORBA is concerned with interfaces between
objects and applications modeled as objects,
Java is primarily concerned with the
implementation of these objects.
104
CORBA vs. JAVA/RMI
• JAVA/RMI systems fall short of seamless
integration because of their interoperability
requirements with other languages.
JAVA/RMI system assumes the homogeneous
environment of the JVM, which can only take
advantage of Java Object Model.
• Coexistence between CORBA and Java
105
Companies Using CORBA
Today
• AT&T
– Late 1990’s developed 20 to 40 systems using CORBA for
both internal and external access
– Are certain development time for future projects will be
greatly reduced by building reusable frameworks with the
OMG
• The Weather Channel
– Used CORBA and Linux
– System is reliable, low maintenance, offers data logging
– Cut software development time from months to weeks
106
ONC RPC
• “ONC RPC, short for Open Network
Computing Remote Procedure Call, is a
widely deployed remote procedure call
system. ONC was originally developed by
Sun Microsystems as part of their Network
File System project, and is sometimes
referred to as Sun ONC or Sun RPC.”
http://en.wikipedia.org/wiki/Open_Network_Computing_Remote_Procedure_Call
Remote procedure call
Client/server architecture
Client-server architecture
• Client sends a request, server replies with a
response
– Interaction fits many applications
– Naturally extends to distributed computing
• Why do people like client/server architecture?
– Provides fault isolation between modules
– Scalable performance (multiple servers)
– Central server:
• Easy to manage
• Easy to program
Remote procedure call
• A remote procedure call makes a call to a
remote service look like a local call
– RPC makes transparent whether server is local
or remote
– RPC allows applications to become distributed
transparently
– RPC makes architecture of remote machine
transparent
Developing with RPC
1. Define APIs between modules
• Split application based on function, ease of
development, and ease of maintenance
• Don’t worry whether modules run locally or remotely
2. Decide what runs locally and remotely
• Decision may even be at run-time
3. Make APIs bullet proof
• Deal with partial failures
Stubs: obtaining transparency
• Compiler generates from API stubs for a procedure
on the client and server
• Client stub
– Marshals arguments into machine-independent format
– Sends request to server
– Waits for response
– Unmarshals result and returns to caller
• Server stub
– Unmarshals arguments and builds stack frame
– Calls procedure
– Server stub marshalls results and sends reply
RPC vs. LPC
• 4 properties of distributed computing that
make achieving transparency difficult:
– Partial failures
– Concurrency
– Latency
– Memory access
Partial failures
• In local computing:
– if machine fails, application fails
• In distributed computing:
– if a machine fails, part of application fails
– one cannot tell the difference between a
machine failure and network failure
• How to make partial failures transparent to
client?
Simple Object Access Protocol
• SOAP is a lightweight protocol for exchange of
information in a decentralized, distributed environment. It
is an XML based protocol that consists of three parts: an
envelope that defines a framework for describing what is
in a message and how to process it, a set of encoding rules
for expressing instances of application-defined datatypes,
and a convention for representing remote procedure calls
and responses. SOAP can potentially be used in
combination with a variety of other protocols; however, the
only bindings defined in this document describe how to
use SOAP in combination with HTTP and HTTP
Extension Framework.
• http://www.w3.org/TR/2000/NOTE-SOAP-20000508/
Historical Perspective - MPPs
• Compare clusters to the Massively Parallel
Processors of the 1990’s
• Many separate nodes, each with its own
private memory –hundreds or thousands of
nodes (e.g., Cray T3E, nCube)
– Manufactured as a single computer with a
proprietary OS, very fast communication
network.
– Designed to run large, compute-intensive
parallel applications
– Expensive, long time-to-market cycle
Historical Perspective - NOWs
• Networks of Workstations
• Designed to harvest idle workstation cycles
to support compute-intensive applications.
• Advocates contended that if done properly,
you could get the power of an MPP at
minimal additional cost.
• Supported general-purpose processing and
parallel applications
Other Grid Resources
• The Globus Alliance: “a community of organizations
and individuals developing fundamental technologies
behind the "Grid," which lets people share computing
power, databases, instruments, and other on-line tools
securely across corporate, institutional, and geographic
boundaries without sacrificing local autonomy”
• Grid Computing Info Center: “aims to promote the
development and advancement of technologies that
provide seamless and scalable access to wide-area
distributed resources”
Summary
• Definitions of distributed systems and
comparisons to centralized systems.
• The characteristics of distributed systems.
• The eight forms of transparency.
• The basic design issues.
119
ARCHITECTURE
MODELS
Classification [2]
• Based on system architecture
– Client – Server model
– Peer – Peer model
• Based on communication network
– Bus
– Switched
• Based on level of coupling
– Tightly coupled (parallel)
– Loosely coupled (distributed)
Based on System Architecture :
Client Server Model
One server acts as the principal control agent
Several nodes report to the server
Advantages:
 Better control and security
 Concentration of functions in high performance
servers
Disadvantages:
 Not robust due to lack of redundancy
 Performance suffers if the number of clients increases
Examples:
 Workstation – Server Model
 Processor Pool Model
Based on System Architecture :
Workstation – Server Model
• Many workstations connect to the
network.
• Workstations provide local processing and
an interface to the network.
• Consist of one or more client workstations
connected to one or more server
workstations using a communication
network.
• Mainly used for resource sharing
Based on System Architecture :
Processor Pool Model
• All the processing is moved to a pool of
processors
• No concept of a home machine
• Workstations are dummy terminals with
good graphical display
• Terminals have minimum intelligence like
remote booting, remote mounting of file
systems, virtual terminal handling and
packet assembly and disassembly services
Based on System Architecture : Peer
– Peer Model
• All the nodes in the network have equal privilege
• No special routing server required. The nodes
themselves take care of routing the data
• Peers – both suppliers and consumers
• As the number of nodes increases, the bandwidth
increases
• Reduces single point failures
• It is less secure
• Usually used for sharing of resources – files, audio -
visual media
Based on Communication Network : Bus – Based
Interconnection
Usually used in Point – Point connection
systems
System connected by computer bus
The access to communication media is
time shared
IEEE 802 LAN Standard
 Ethernet, Token Bus, Token Ring, Fiber
Distributed data Interface (FDDI), Fiber
Queue Dual Buses (FQDB)
Based on Communication Network :
Switch – Based Interconnection
• Usually used in multi point connection systems
• Systems connected by network switches
• The access to communication media is both time
and space shared – but cost equally higher than
bus
• Private switches – Crossbar, multistage switch
• Public switch systems – Integrated Services
Digital Network (ISDN), Asynchronous Transfer
Mode (ATM
• Switches in public networks also perform routing
Based on Level of Coupling :
Loosely Coupled Systems
Each processor has its own memory
Runs its own OS
Do not communicate frequently
Can be placed in geographically separate
regions
Also called distributed computing
Based on Level of Coupling :
Tightly Coupled Systems
• Processors share a common memory
• Run on a single OS
• Communicate very frequently
• Usually connected through high speed
connection methods
• Also called parallel computing
Level of Coupling
Microprocessors Clusters LAN Global Internet
Small
Fast
Large
Slow
More Tightly Coupled More Loosely Coupled
Closer in physical proximity Farther in physical proximity
Grid Computing [3]
• Complete nodes connected by a conventional
network interface like Ethernet.
• Not tightly coupled. Can be geographically
diverse.
• The communication is not high speed - works
fine in environments that require less
communication.
• A single task is adequately parallelized and each
part is given to a different node that computes it
independently - so no concurrency issues
involved.
Cloud Computing
What is Cloud Computing [4]
Parallel and distributed system consisting of a
collection of inter-connected and virtualized
computers
Presented to the user as a single computer
Services provided:
 Software as service
 Platform as service
 Infrastructure as service
Advantages
 Speed of Operation
 Power saving
 Abstraction
 Virtualization
Folding@Home [6]
• Grid computing project designed to perform
computationally intensive simulations of protein
folding and other molecular dynamics
• The most powerful distributed computing cluster
in the world – Guinness 2007
• Primary contributors – thousands of everyday
personal computers
• Processes run in the background utilizing cpu idle
time
• In late March 2011 Folding@home briefly
peaked above the 7 native petaFLOP barrier.
Windows Azure Platform [7]
On demand platform used to build, host and scale
web applications through windows datacenter.
Platform as a service
Build, host and maintain web applications running
on Microsoft Datacenter
OS – Windows Azure
Services
 Live Services
 SQL Azure
 AppFabric
 SharePoint Services
 Dynamic CRM Services
CSS434 System Models 136
Platforms
• Minicomputer model
• Workstation model
• Workstation-server model
• Processor-pool model
• Cluster model
• Grid computing
CSS434 System Models 137
Minicomputer Model
• Extension of Time sharing system
– User must log on his/her home minicomputer.
– Thereafter, he/she can log on a remote machine by telnet.
• Resource sharing
– Database
– High-performance devices
Mini-
computer
Mini-
computer
Mini-
computer
ARPA
net
CSS434 System Models 138
Workstation Model
• Process migration
– Users first log on his/her personal workstation.
– If there are idle remote workstations, a heavy job may migrate to
one of them.
• Problems:
– How to find an idle workstation
– How to migrate a job
– What if a user log on the remote machine
100Mbps
LAN
Workstation
Workstation Workstation
Workstation
Workstation
CSS434 System Models 139
Workstation-Server Model
• Client workstations
– Diskless
– Graphic/interactive applications processed in local
– All file, print, http and even cycle computation requests
are sent to servers.
• Server minicomputers
– Each minicomputer is dedicated to one or more
different types of services.
• Client-Server model of communication
– RPC (Remote Procedure Call)
– RMI (Remote Method Invocation)
• A Client process calls a server process’ function.
• No process migration invoked
• Example: NFS
100Gbps
LAN
Workstation
Workstation Workstation
Mini-
Computer
file server
Mini-
Computer
http server
Mini-
Computer
cycle server
CSS434 System Models 140
Processor-Pool Model
• Clients:
– They log in one of terminals (diskless
workstations or X terminals)
– All services are dispatched to servers.
• Servers:
– Necessary number of processors are
allocated to each user from the pool.
• Better utilization but less interactivity
Server 1
100Mbps
LAN
Server N
CSS434 System Models 141
Cluster Model
• Client
– Takes a client-server model
• Server
– Consists of many
PC/workstations connected
to a high-speed network.
– Puts more focus on
performance: serves for
requests in parallel.
100Mbps
LAN
Workstation
Workstation Workstation
Master
node
Slave
1
Slave
N
Slave
2
1Gbps SAN
http server1
http server2
http server N
CSS434 System Models 142
High-speed
Information high way
Grid Computing
• Goal
– Collect computing power of supercomputers
and clusters sparsely located over the nation
and make it available as if it were the electric
grid
• Distributed Supercomputing
– Very large problems needing lots of CPU,
memory, etc.
• High-Throughput Computing
– Harnessing many idle resources
• On-Demand Computing
– Remote resources integrated with local
computation
• Data-intensive Computing
– Using distributed data
• Collaborative Computing
– Support communication among multiple parties
Super-
computer
Cluster
Super-
computer Cluster
Mini-
computer
Workstation
Workstation Workstation
CSS434 System Models 143
Middleware Models
Middleware Models Platforms
Client-server model Workstation-server model
Services provided by multiple
servers
Cluster model
Proxy servers and caches ISP server
Cluster model
Peer processes Workstation model
Mobile code and agents Workstation model
Workstation-server model
Thin clients Processor-pool model
Cluster model
CSS434 System Models 144
Client-Server Model
Server
Client
Client
invocation
result
Server
invocation
result
Process:
Key:
Computer:
100Gbps
LAN
Workstation
Workstation Workstation
Mini-
Computer
file server
Mini-
Computer
http server
Mini-
Computer
cycle server
HTTP server
File server
DNS server
CSS434 System Models 145
Services Provided by Multiple
Servers
Server
Server
Server
Service
Client
Client
Ex. altavista.digital.com DB server
Replication
• Availability
• Performance
100Gbps
LAN
Workstation
Workstation Workstation
Master
node
Slave
1
Slave
N
Slave
2
1Gbps SAN
CSS434 System Models 146
Proxy Servers and Caches
Client
Proxy
Web
server
Web
server
server
Client Ex. Internet Service Provider
100Gbps
LAN
Workstation
Workstation Workstation
Master
node
Slave
1
Slave
N
Slave
2
1Gbps SAN
CSS434 System Models 147
Peer Processes
Coordination
Application
code
Coordination
Application
code
Coordination
Application
code
100Gbps
LAN
Workstation
Workstation Workstation
Workstation
Workstation
Distributed whiteboard application
CSS434 System Models 148
Mobile Code and Agents
a) client request results in the dow nloading of applet code
Web
server
Client
Web
server
Applet
Applet code
Client
b) client interacts with the applet
100Gbps
LAN
Workstation
Workstation Workstation
Mini-
Computer
file server
Mini-
Computer
http server
Mini-
Computer
cycle server
CSS434 System Models 149
Network Computers and Thin
Clients
Thin
Client
Application
Process
Network computer or PC
Compute server
network
Server 1
100Gbps
LAN
Server N
100Gbps
LAN
Workstation
Workstation Workstation
Master
node
Slave
1
Slave
N
Slave
2
1Gbps SAN
X11
Diskless workstations
CSS434 System Models 150
Reasons for Distributed
Computing Systems
• Inherently distributed applications
– Distributed DB, worldwide airline reservation, banking system
• Information sharing among distributed users
– CSCW or groupware
• Resource sharing
– Sharing DB/expensive hardware and controlling remote lab. devices
• Better cost-performance ratio / Performance
– Emergence of Gbit network and high-speed/cheap MPUs
– Effective for coarse-grained or embarrassingly parallel applications
• Reliability
– Non-stopping (availability) and voting features.
• Scalability
– Loosely coupled connection and hot plug-in
• Flexibility
– Reconfigure the system to meet users’ requirements
CSS434 System Models 151
Network v.s. Distributed
Operating Systems
Features Network OS Distributed OS
SSI
(Single System Image)
NO
Ssh, sftp, no view of remote
memory
YES
Process migration, NFS,
DSM (Distr. Shared memory)
Autonomy High
Local OS at each computer
No global job coordination
Low
A single system-wide OS
Global job coordination
Fault Tolerance Unavailability grows as faulty
machines increase.
Unavailability remains little
even if fault machines
increase.
Data Communications &
Networking
Contents
• Data Transmission Circuits
• Data Communications
– Parallel Data Transmission
– Serial Data Transmission
• Asynchronous Serial Transmission
• Synchronous Serial Transmission
• Data Multiplexing & Modems
• Networks & Topologies (bus, star and ring)
• Cabling (coaxial, UTP, fiber optic)
• Media Access Methods (CSMA/CD, CSMA/CA, Token
Passing)
• LAN Architectures (Ethernet, Token Ring)
• Networking Devices
• OSI Model. OSI layer functions. OSI versus TCP/IP
Data Transmission
• Data transmission is the transfer of data from
point-to-point often represented as an
electromagnetic signal over a physical point-to-
point or point-to-multipoint communication
channel
• A communication channel refers to the medium
used to convey information from a sender (or
transmitter) to a receiver, and it can use fully or
partially the medium.
• Examples of channels: copper wires, optical
fibbers or wireless communication channels.
Data Communication Channels
• The following is a discussion on the THREE main types of transmission circuits
(channels), simplex, half duplex and full duplex.
• Simplex
– Data in a simplex channel is always one way. Simplex channels are not often used because it
is not possible to send back error or control signals to the transmit end. An example of a
simplex channel in a computer system is the interface between the keyboard and the
computer, in that key codes need only be sent one way from the keyboard to the computer
system.
• Half Duplex
– A half duplex channel can send and receive, but not at the same time. Its like a one-lane
bridge where two way traffic must give way in order to cross. Only one end transmits at a
time, the other end receives.
• Full Duplex
– Data can travel in both directions simultaneously. There is no need to switch from transmit to
receive mode like in half duplex. Its like a two lane bridge on a two-lane highway.
Parallel and Serial Data
• Parallel transmission (e.g. 8 bits)
– Each bit uses a separate wire
– To transfer data on a parallel link, a separate line is used as a clock signal. This
serves to inform the receiver when data is available. In addition, another line
may be used by the receiver to inform the sender that the data has been used,
and its ready for the next data.
Parallel and Serial Data
• Serial (e.g. 8 bits)
– Each bit is sent over a single wire, one after the other
– Usually no signal lines are used to convey clock (timing information)
– There are two types of serial transmission, essentially having to do with how the clock is
embedded into the serial data
• Asynchronous serial transmission
• Synchronous serial transmission
• If no clock information was sent, the receiver would misinterpret the arriving data
(due to bits being lost, going too slow).
• Parallel transmission is obviously faster, in that all bits are sent at the same time,
whereas serial transmission is slower, because only one bit can be sent at a time.
Parallel transmission is very costly for anything except short links.
Asynchronous Serial Transmission
(RS232 Example)
• Because no signal lines are used to convey clock (timing) information, this method groups
data together into a sequence of bits (five to eight), then prefixes them with a start bit and a
stop bit. This is the method most widely used for PC or simple terminal serial
communications.
• In asynchronous serial communication, the electrical interface is held in the mark position
between characters. The start of transmission of a character is signaled by a drop in signal
level to the space level. At this point, the receiver starts its clock. After one bit time (the start
bit) come 8 bits of true data followed by one or more stop bits at the mark level.
• The receiver tries to sample the signal in the middle of each bit time. The byte will be read
correctly if the line is still in the intended state when the last stop bit is read.
• Thus the transmitter and receiver only have to have approximately the same clock rate. A
little arithmetic will show that for a 10 bit sequence, the last bit will be interpreted correctly
even if the sender and receiver clocks differ by as much as 5%.
• It is relatively simple, and therefore inexpensive. However, it has a high overhead, in that
each byte carries at least two extra bits: a 20% loss of line bandwidth.
Synchronous Serial Transmission (PS2 Example)
• The PS/2 mouse and keyboard implement a bidirectional synchronous serial protocol.
• The bus is "idle" when both lines are high (open-collector). This is the only state where the
keyboard/mouse is allowed begin transmitting data. The host has ultimate control over the
bus and may inhibit communication at any time by pulling the Clock line low.
• The device (slave) always generates the clock signal. If the host wants to send data, it must
first inhibit communication from the device by pulling Clock low. The host then pulls Data
low and releases Clock. This is the "Request-to-Send" state and signals the device to start
generating clock pulses.
– Summary: Bus States
Data = high, Clock = high: Idle state.
Data = high, Clock = low: Communication Inhibited.
Data = low, Clock = high: Host Request-to-Send
Data is transmited 1 byte at a time:
•1 start bit. This is always 0.
•8 data bits, least significant bit first.
•1 parity bit (odd parity - The number of
1's in the data bits plus the parity bit
always add up to an odd number. This is
used for error detection.).
•1 stop bit. This is always 1.
•1 acknowledge bit (host-to-device
communication only)
Serial Communication
Name Sync
/Async
Type Duplex Max
devices
Max
speed
(Kbps)
Max
distance
(feet)
Pin
count
(not including ground)
RS-232 async peer full 2 115.2 30 2 (or 4 with HW handshake)
RS-422 async multi-drop half 10 10000 4,000 1 (unidirectional only,
additional pins for each
bidirectional comm.)
RS-485 async multi-point half 32 10000 4,000 2
I2C sync multi-
master
half Limitation based
on bus
capacitance and
bit rate
3400 <10 2
SPI sync multi-
master
full Limitation based
on bus
capacitance and
bit rate
>1000 <10 3+1(Additional pins needed
for every slave if slave count is
more than one)
Microwire sync master/slave full Limitation based
on bus
capacitance and
bit rate
>625 <10 3+1(Additional pins needed
for every slave if slave count is
more than one)
1-Wire async master/slave half Limitation based
on bus
capacitance and
bit rate
16 1,000 1
Data Communication Terminology
• Channel
– A channel is a portion of the communications medium allocated to the sender
and receiver for conveying information between them. The communications
medium is often subdivided into a number of separate paths, each of which is
used by a sender and receiver for communication purposes.
• Baud Rate
– Baud rate is the same as symbol rate and is a measure of the number of line
changes which occur every second. Each symbol can represent or convey one
(binary encoded signal) or several bits of data. For a binary signal of 20Hz, this
is equivalent to 20 baud (there are 20 changes per second).
• Bits Per Second
– This is an expression of the number of data bits per second. Where a binary
signal is being used, this is the same as the baud rate. When the signal is
changed to another form, it will not be equal to the baud rate, as each line
change can represent more than one bit (either two or four bits).
• Bandwidth
– Bandwidth is the frequency range of a channel, measured as the difference
between the highest and lowest frequencies that the channel supports. The
maximum transmission speed is dependant upon the available bandwidth. The
larger the bandwidth, the higher the transmission speed.
Data Multiplexing
• A multiplexer is a device which shares a communication link between
a number of devices (users).
• Rather than provide a separate circuit for each device, the multiplexer
combines each low speed circuit onto a single high speed link. The
cost of the single high speed link is less than the required number of
low speed links.
• It does this by time or frequency division.
Time Division Multiplexing
• In time division, the communications link is subdivided in terms of
time.
• Each sub-circuit is given the channel for a limited amount of time,
before it is switched over to the next user, and so on
• In the picture bellow it can be seen that each sub-channel occupies the
entire bandwidth of the channel, but only for a portion of the time
Frequency Division Multiplexing
• In frequency division multiplexing, each sub-channel is
separated by frequency (each sub-channel is allocated part
of the bandwidth of the main channel)
• The speed or bandwidth of the main link is the sum of the
individual sub-channel speeds or bandwidth.
Modems
• Modems are devices which allow digital data signals to be
transmitted across an analogue link.
• Modem stands for modulator/demodulator. A modem
changes the digital signal to an analogue frequency, and
sends this tone across the analogue link. At the other end,
another modem receives the signal and converts it back to
digital.
Modulation Techniques
• Modulation techniques are methods used to encode
digital information in an analogue world.
• There are three basic modulation techniques
– AM (amplitude modulation)
– FM (frequency modulation)
– PM (phase modulation)
• All 3 modulation techniques employ a carrier signal. A
carrier signal is a single frequency that is used to carry
the intelligence (data).
– For digital, the intelligence is either a 1 or 0.
– When we modulate the carrier , we are changing its
characteristics to correspond to either a 1 or 0.
Amplitude Modulation
• Modifies the amplitude of the carrier to represent 1s or 0s
– a 1 is represented by the presence of the carrier for a predefined period of 3 cycles of carrier.
– Absence or no carrier indicates a 0
• Pros
– Simple to design and implement
• Cons
– Noise spikes on transmission medium interfere with the carrier signal.
– Loss of connection is read as 0s.
Frequency Modulation
• Modifies the frequency of the carrier to represent the 1s or 0s.
– a 0 is represented by the original carrier frequency
– a 1 by a much higher frequency ( the cycles are spaced closer together)
• Pros
– Immunity to noise on transmission medium.
– Always a signal present. Loss of signal easily detected
• Cons
– Requires 2 frequencies
– Detection circuit needs to recognize both frequencies when signal is lost.
Phase Modulation
• Phase Modulation modifies the phase of the carrier to represent a 1 or 0.
– The carrier phase is switched at every occurrence of a 1 bit but remains unaffected for a 0 bit.
– The phase of the signal is measured relative to the phase of the preceding bit. The bits are timed to
coincide with a specific number of carrier cycles (3 in this example = 1 bit)
• Pros
– Only 1 frequency used
– Easy to detect loss of carrier
• Cons
– Complex circuitry required to generate and detect phase changes
What is a network
• A network as a "group of computers and associated devices
that are connected by communications facilities."
• A network provides two principle benefits: the ability to
communicate and the ability to share.
– A network supports communication among users in ways that
other media cannot.
– Sharing involves not only information (database records, e-mail,
graphics, etc.), but also resources (applications, printers, modems,
disk space, scanners, etc.) Through its ability to share, a network
promotes collaboration
• A network can consist of two computers connected together
on a desk or it can consist of many Local Area Networks
(LANs) connected together to form a Wide Area Network
(WAN) across a continent.
Network Classifications
• Scope
– Local area network (LAN)
– Metropolitan area (MAN)
– Wide area network (WAN)
• Ownership
– Closed versus open
• Topology (configuration)
– Bus (Ethernet)
– Star (Wireless networks with central Access
Point)
– Ring
Network Topologies
• A topology refers to the manner in which the cable is run to
individual workstations on the network.
– the configurations formed by the connections between devices on a
local area network (LAN) or between two or more LANs
• There are three basic network topologies (not counting
variations thereon): the bus, the star, and the ring.
• It is important to make a distinction between a topology and
an architecture.
– A topology is concerned with the physical arrangement of the
network components.
– In contrast, an architecture addresses the components themselves
and how a system is structured (cable access methods, lower level
protocols, topology, etc.). An example of an architecture is
10baseT Ethernet which typically uses the star topology.
Bus Topology
• A bus topology connects each computer (node) to a single
segment trunk.
– A ‘trunk’ is a communication line, typically coax cable, that is
referred to as the ‘bus.’ The signal travels from one end of the
bus to the other.
– A terminator is required at each end to absorb the signal so it
does not reflect back across the bus.
• In a bus topology, signals are broadcast to all stations. Each
computer checks the address on the signal (data frame) as it
passes along the bus. If the signal’s address matches that of the
computer, the computer processes the signal. If the address
doesn’t match, the computer takes no action and the signal
travels on down the bus.
• Only one computer can ‘talk’ on a network at a time. A media
access method (protocol) called CSMA/CD is used to handle
the collisions that occur when two signals are placed on the
wire at the same time.
• The bus topology is passive. In other words, the computers on
the bus simply ‘listen’ for a signal; they are not responsible for
moving the signal along.
• A bus topology is normally implemented with coaxial cable.
Bus Topology
• Advantages of bus topology:
– Easy to implement and extend
– Well suited for temporary networks that must be set up in a
hurry
– Typically the cheapest topology to implement
– Failure of one station does not affect others
• Disadvantages of bus topology:
– Difficult to administer/troubleshoot
– Limited cable length and number of stations
– A cable break can disable the entire network; no redundancy
– Maintenance costs may be higher in the long run
– Performance degrades as additional computers are added
Star Topology
• All of the stations in a star topology are connected to a central unit called a hub.
– The hub offers a common connection for all stations on the network. Each station has its
own direct cable connection to the hub. In most cases, this means more cable is required
than for a bus topology. However, this makes adding or moving computers a relatively
easy task; simply plug them into a cable outlet on the wall.
• If a cable is cut, it only affects the computer that was attached to it. This eliminates
the single point of failure problem associated with the bus topology. (Unless, of
course, the hub itself goes down.)
• Star topologies are normally implemented using twisted pair cable, specifically
unshielded twisted pair (UTP). The star topology is probably the most common form
of network topology currently in use.
Star Topology
• Advantages of star topology:
– Easy to add new stations
– Easy to monitor and troubleshoot
– Can accommodate different wiring
• Disadvantages of star topology:
– Failure of hub cripples attached stations
– More cable required (more expensive to wire a
building for networking)
Ring Topology
• A ring topology consists of a set of stations connected serially by cable. In other words, it’s a circle or
ring of computers. There are no terminated ends to the cable; the signal travels around the circle in a
clockwise (or anticlockwise) direction.
• Note that while this topology functions logically as ring, it is physically wired as a star. The central
connector is not called a hub but a Multistation Access Unit or MAU. (Don’t confuse a Token Ring
MAU with a ‘Media Adapter Unit’ which is actually a transceiver.)
• Under the ring concept, a signal is transferred sequentially via a "token" from one station to the next.
When a station wants to transmit, it "grabs" the token, attaches data and an address to it, and then sends it
around the ring. The token travels along the ring until it reaches the destination address. The receiving
computer acknowledges receipt with a return message to the sender. The sender then releases the token
for use by another computer.
• Each station on the ring has equal access but only one station can talk at a time.
Ring Topology
• In contrast to the ‘passive’ topology of the bus, the ring
employs an ‘active’ topology. Each station repeats or
’boosts’ the signal before passing it on to the next station.
• Rings are normally implemented using twisted pair or
fiber-optic cable
• Advantages of ring topology:
– Growth of system has minimal impact on performance
– All stations have equal access
• Disadvantages of ring topology:
– Most expensive topology
– Failure of one computer may impact others
– Complex
Choosing a Topology
• The following factors should be considered when choosing a topology:
– Installation
– Maintenance and troubleshooting
– Expected growth
– Distances
– Infrastructure
– Existing network
• As a general rule, a bus topology is the cheapest to install, but may be more
expensive to maintain because it does not provide for redundancy.
• Various topologies can be mixed on the same network.
• One very common example is a large Ethernet network with multiple hubs. Usually
the hubs are located on different floors in a building or perhaps outside in another
building. Each hub is wired in the typical star configuration. However, the hubs are
connected together along a bus, typically referred to as a ‘backbone.’
• The backbone between hubs might consist of fiber optic cable while the
workstations are wired to each individual hub with UTP (unshielded twisted pair)
cable.
Cabling
• Coaxial Cable
– Thinnet looks like regular TV cable. It is about 1/4 inch in diameter and is very
flexible and easy to work with.
– Thicknet is about 1/2 inch in diameter and not very flexible. Thicknet is older
and not very common anymore except as a backbone within and between
buildings. Coax transmits at 10 Mbps..
• Twisted Pair. Twisted pair looks like telephone wire and consists of
insulated strands of copper wire twisted together. There are two
versions of twisted pair cable:
– Shielded Twisted Pair (STP). STP is commonly used in Token Ring networks
– Unshielded Twisted Pair (UTP). UTP is used in Ethernet
networks. Transmission rates vary between 10-100-1000-10000 Mbps.
• Fiber-Optic Cable. Fiber-optic cable consists of a thin cylinder of
glass surrounded by glass cladding, encased in protective outer
sheath. Fiber-optic cable is very fast (over 1Gbps). It can transmit
over long distances (2 km +) but is expensive.
Cabling
• Top: Unshielded Twisted Pair and Shielded Twisted Pair Cable
• Bottom: Coaxial and Optical Fiber Cable
Media Access Methods
• A media access method refers to the manner in which a computer
gains and controls access to the network’s physical medium (e.g.,
cable).
• Common media access methods include the following:
– CSMA/CD
– CSMA/CA
– Token Passing
• One of the primary concerns with media access is how to prevent
packets from colliding when two or more computers try to transmit
simultaneously. Each of the methods listed above takes a different
approach to this problem.
• Data transmitted over a network is sent one bit at a time. A bit is
either a 1 or a 0 represented by a voltage change (on or off) or a light
pulse. If two stations are transmitting at the same time, it is possible
that the signals may overlap, resulting in garbled data. Such
overlapping is referred to as a "collision."
CSMA/CD
• CSMA/CD stands for Carrier-Sense Multiple Access with Collision Detection. It is
a media access method which means it defines how the network places data on the
cable and how it takes it off.
• CSMA/CD specifies how bus topologies such as Ethernet handle transmission
collisions. A collision occurs when two or more computers transmit signals at the
same time.
– "Carrier Sense" means that each station on the LAN continually listens to (tests) the
cable for the presence of a signal prior to transmitting.
– "Multiple Access" means that there are many computers attempting to transmit and
compete for the opportunity to send data (i.e., they are in contention).
– "Collision Detection" means that when a collision is detected, the stations will stop
transmitting and wait a random length of time before retransmitting.
• CSMA/CD works best in an environment where relatively fewer, longer data frames
are transmitted. This is in contrast to token passing which works best with a
relatively large amount of short data frames.
• Because CSMA/CD works to control or manage collisions rather than prevent them,
network performance can be degraded with heavy traffic. The greater the traffic, the
greater the number of collisions and retransmissions.
• CSMA/CD is used on Ethernet networks.
CSMA/CD Operation
• In its most simple form it operates as follows:
– A station that wishes to transmit on the network
checks to see if the cable is free.
– If the cable is free, the station starts transmitting.
– However, another station may have detected a free
cable at the same instant and also start transmitting.
The result is a "collision."
– Once the collision is detected, all stations
immediately stop transmitting.
– Stations then wait a random length of time before
checking the cable and then retransmit
CSMA/CA
• CSMA/CA stands for Carrier-Sense Multiple Access with
Collision Avoidance and is a media access method very similar
to CSMA/CD.
• The difference is that the CD (collision detection) is changed to
CA (collision avoidance). Instead of detecting and reacting to
collisions, CSMA/CA tries to avoid them by having each
computer signal its intention to transmit before actually
transmitting. In effect, the transmitting computer gives a 'heads
up' prior to transmitting.
• Although CSMA/CA can prevent collisions, it comes with a
cost in the form of the additional overhead incurred by having
each workstation broadcast it's intention prior to transmitting.
Thus, CSMA/CA is slower than CSMA/CD.
• CSMA/CA is used on Apple networks and on WiFi (IEEE
802.11) networks.
Token Passing
• Token passing is a media access method by which collisions are
prevented.
• Collisions are eliminated under token passing because only a
computer that possesses a free token (a small data frame) is
allowed to transmit. The token passing method also allows
different priorities to be assigned to different stations on the ring.
Transmissions from a stations with higher priority take
precedence over stations with lower priority.
• Token passing works best in an environment where a relatively
large number of shorter data frames are being transmitted. (As
opposed to CSMA/CD which works best in an environment
where relatively fewer, longer data frames are being transmitted.)
• Token passing is used on Token Ring networks
Token Passing Operation
• In its most simple form it operates as follows:
– A station that wishes to transmit on the network waits until it
will receive a free token.
– The sending station transmits its data with the token.
– The data travels to the recipient without stopping at other
stations (it is just relayed).
– The receiving station receives the data and returns the token
to the sender as an acknowledgment.
– The sender receives acknowledgment and releases the token
to next station.
– The token continues being passed along the ring until it is
“seized" by the next station that wants to transmit.
LAN Architectures
• Network architecture refers to the manner in
which the hardware and software is structured.
The architecture includes the cable access method
(transmission), topology, and lower level
protocols.
• The most common type of LAN architecture is
Ethernet. Token Ring was also used in the past.
• These architectures are sometimes referred to as
"lower-level protocols" because they represent
the specifications for the IEEE802 model which
encompasses the physical (1st) and data link
(2nd) layers of the OSI model (to be discussed
latter)
Ethernet
• Ethernet is a popular, relatively inexpensive, easy-to-install LAN architecture with
the following characteristics:
– Uses the CSMA/CD media access control.
– Data transmission normally occurs at 100 Mbps (10Mbps in the early forms and 10Gbps
in the most recent forms).
– Typically implemented in a star topology (early versions used bus topology as well).
– Ethernet LANs are normally distinguished by the type of cable they use Twisted Pair
(Thinnet or Thicknet were also used in the past).
• The Ethernet architecture conforms to most but not all of the IEEE 802.3
specification (the physical layers are identical but the MAC layers are somewhat
different).
• An Ethernet LAN is often described in terms of three parameters: transmission rate,
transmission type, and segment distance or cable type.
– "100baseT" means:
• 100 - transmission rate or through put of 100Mbps
• base - transmission type is baseband rather than broadband network (i.e., the signal is placed
directly on the cable, one signal at a time)
• T – the cable type (e.g. Twisted pair)
• Few types of Ethernet: 10Base2, 10Base5, 10BaseT and 10BaseF, 100BaseT,
100BaseF, etc..
Token Ring
• Token ring is a relatively expensive LAN architecture that was
strongly influenced by IBM. It is very stable and can be expanded
without a significant degradation in network performance.
• Token ring uses the token passing media access control. Data
transmission normally occurs at 4 or 16 Mbps depending on the
cable.
• Token ring is normally implemented in a logical ring/physical star
topology with a MAU (Multistation Access Unit) as the hub. The
maximum number of stations on one ring is 260 for shielded
twisted pair and 72 for unshielded twisted pair (UTP). There can
be up to 33 MAUs per ring.
• Token Ring LANs normally use shielded twisted pair (STP) but
may also use unshielded twisted pair (UTP) or fiber-optic cable.
The maximum distance to the MAU from the workstation depends
on the cable and varies from 45 meters for UTP to 100 meters for
STP.
• The Token Ring architecture conforms generally to the IEEE’s
802.5 specification
Ethernet vs. Token Ring
• Ethernet is generally less expensive and easier to install
than Token Ring.
• Token Ring is generally more secure and more stable than
Ethernet, but not used anymore in typical LAN
configurations.
• It is usually more difficult to add more computers on a
Token Ring LAN than it is to an Ethernet LAN. However,
as additional computers are added, performance degradation
will be less pronounced on the Token Ring LAN than it will
be on the Ethernet LAN.
• Ethernet uses CSMA/CD media access control and Token
Ring uses token passing. This makes Ethernet better suited
in a situation where there are a large number of computers
sending fewer, larger data frames. Token Ring is better
suited for small to medium size LANs sending many,
smaller data frames.
4-192
Connecting Networks
• Repeater: Extends a network
• Bridge: Connects two compatible networks,
doesn’t necessarily pass all the messages across
the connection
• Switch: Connect several compatible networks,
allowing it to connect several busses rather than
two.
Building a large bus network from
smaller ones
Connecting Networks
• When networks are connected via repeaters, bridges or
switches, the result is a single large network.
• The entire system operates in the same way as the original
smaller networks
• Sometimes the networks to be connected have incompatible
characteristics (e.g. WiFi network to be connected with Ethernet
network, etc..).
• When building networks of networks, the system is known as
internet (note the small “i”, term that is distinct from the
Internet – which refers to a particular world wide internet).
• Router: Connects two incompatible networks resulting in a
network of networks - internet
Routers connecting two WiFi networks
and an Ethernet network to form an
internet
Routers and internet addressing
• Routers purpose is to route (forward messages) in their proper
directions.
• The forwarding process is based on an internet wide addressing
system which all the machines in the internet (including the
machines in the original networks as well as the routers) are
assigned unique addresses.
– Thus each machine in an internet has two addresses: its original local
address within its own network and the internet address
• A machine wanting to send a message to a machine in a distant
network, it will attach the internet address of the destination and
will direct the message to its local router. From there it is
forwarded to the proper direction (based on a forwarding table
maintained by the router).
Client and Server
• The terms "client" and "server" are used to describe individual
computers that are part of a network where computing resources and
workload are shared.
• A server is a computer that makes its resources available to the
network and responds to the commands of a client. The server’s
shared resources can be files (a file server); printers (a print server);
processing power (an application server); etc…
• A client is a computer that uses the resources made available by a
server. The client must have sufficient processing power on its own to
run applications that interact with the resources on the server.
• It is possible, and quite common, for an individual computer to
function as both a client and a server.
– For example, if Bill queries a SQL Server database from his workstation for the
data he needs to create an Excel spreadsheet, then his workstation is functioning
as a client. However, if Sue then connects to Bill’s workstation from her
computer and copies the spreadsheet, then Bill’s workstation is functioning as a
server.
ISO/OSI Model
• The International Standards Organization (ISO) Open Systems Interconnect (OSI) is
a standard set of rules describing the transfer of data between each layer in a
network operating system. Each layer has a specific function (i.e. the physical layer
deals with the electrical and cable specifications)
• The OSI Model clearly defines the interfaces between each layer. This allows
different network operating systems and protocols to work together by having each
manufacturer adhere to the standard interfaces. The application of the ISO OSI
model has allowed the modern networks that exist today. There are seven layers in
the OSI model.
OSI Model
• The Physical Layer
– Establishes the physical characteristics of the network (e.g., the type of cable,
connectors, length of cable, etc.)
– Defines the electrical characteristics of the signals used to transmit the data (e.g.
signal voltage swing, duration of voltages, etc.)
– Transmits the binary data (bits) as electrical or optical signals depending on the
medium.
• The Data Link Layer
– Defines how the signal will be placed on or taken off the NIC. The data frames
are broken down into individual bits that can be translated into electric signals
and sent over the network. On the receiving side, the bits are reassembled into
frames for processing by upper levels.
– Error detection and correction is also performed at the data link layer. If an
acknowledgement is expected and not received, the frame will be resent.
Corrupt data is also identified at the data link layer.
– Because the Data-Link Layer is very complex, it is sometimes divided into
sublayers (as defined by the IEEE 802 model). The lower sublayer provides
network access. The upper sublayer is concerned with sending and receiving
packets and error checking.
OSI Model
• The Network Layer
– Primarily concerned with addressing and routing. Logical addresses (e.g.,
an IP address) are translated into physical addresses (i.e., the MAC
address) for transmission at the network layer. On the receiving side, the
translation process is reversed.
– It is at the network layer where the route from the source to destination
computer is determined. Routes are determined based on packet
addresses and network conditions. Traffic control measures are also
implemented at the network layer.
• The Transport Layer
– On the sending side, messages are packaged for efficient transmission and
assigned a tracking number so they can be reassembled in proper order.
On the receiving side, the packets are reassembled, checked for errors and
acknowledged.
– Performs error handling in that it ensures all data is received in the proper
sequence and without errors. If there are errors, the data is retransmitted.
OSI Model
• The Session Layer
– Is responsible for establishing, maintaining, and terminating a connection called a
'session'.
– A session is an exchange of messages between computers (a dialog). Managing the
session involves synchronization of user tasks and dialog control (e.g., who transmits and
for how long). Synchronization involves the use of checkpoints in the data stream. In
the event of a failure, only the data from the last checkpoint has to be resent.
– Logon, name recognition and security functions take place at the Session Layer.
• The Presentation Layer
– It is responsible for data translation (formatting), compression, and encryption.
– The Presentation Layer is primarily concerned with translation; interpreting and
converting the data from various formats. For example, EBCIDIC characters might be
converted into ASCII. It is also where data is compressed for transmission and
uncompressed on receipt. Encryption techniques are implemented at the Presentation
Layer.
– The redirector operates at the presentation layer by redirecting I/O operations across the
network.
• The Application Layer
– Provides the operating system with direct access to network services.
– It serves as the interface between the user and the network by providing services that
directly support user applications.
OSI Model
OSI Model
• Each layer may add a Header and a Trailer to its Data (which consists of the next
higher layer's Header, Trailer and Data as it moves through the layers). The Headers
contain information that specifically addresses layer-to-layer communication. For
example, the Transport Header (TH) contains information that only the Transport
layer sees. All other layers below the Transport layer pass the Transport Header as
part of their Data.
OSI vs. TCP/IP
SYSTEM ARCHITECTURES
• Client-Server
• Peer-to-Peer
• Services provided by multiple servers
• Proxy servers and caches
• Mobile code and mobile agents
• Network computers
• Thin clients and mobile devices
205
Clients Invoke Individual
Servers
Server
Client
Client
invocation
result
Server
invocation
result
Process:
Key:
Computer:
206
Peer-to-peer Systems
Application
Application
Application
Peer 1
Peer 2
Peer 3
Peers 5 .... N
Sharable
objects
Application
Peer 4
207
A Service by Multiple Servers
Server
Server
Server
Service
Client
Client
208
Web Proxy Server
Client
Proxy
Web
server
Web
server
server
Client
209
Web Applets
a) client request results in the dow nloading of applet code
Web
server
Client
Web
server
Applet
Applet code
Client
b) client interacts with the applet
210
Thin Clients and Compute
Servers
Thin
Client
Application
Process
Network computer or PC
Compute server
network
211
The Client/Server Database
Environment
212
Objectives
• Definition of terms
• List advantages of client/server architecture
• Explain three application components: presentation,
processing, and storage
• Suggest partitioning possibilities
• Distinguish between file server, database server, 3-tier, and n-
tier approaches
• Describe and discuss middleware
• Explain query-by-example (QBE)
• Explain database linking via ODBC and JDBC
• Explain VBA and Microsoft Access
213
Client/server
Peer-to-peer
Server
“I want to access
some information”
“I want to
collaborate
with my
colleague”
Client
Client/Server Systems
• Networked computing model
• Processes distributed between clients and
servers
• Client – Workstation (usually a PC) that
requests and uses a service
• Server – Computer (PC/mini/mainframe)
that provides a service
• For DBMS, server is a database server
215
Application Logic in C/S
Systems
216
GUI Interface
Procedures, functions,
programs
DBMS activities
Processing Logic
 I/O processing
 Business rules
 Data management
Storage Logic
 Data storage/retrieval
Presentation Logic
 Input – keyboard/mouse
 Output – monitor/printer
Client/Server Architectures
• File Server Architecture
• Database Server Architecture
• Three-tier Architecture
217
Client does
extensive processing
Client does little
processing
File Server Architecture
• All processing is done at the PC that requested the
data
• Entire files are transferred from the server to the
client for processing
• Problems:
– Huge amount of data transfer on the network
– Each client must contain full DBMS
• Heavy resource demand on clients
• Client DBMSs must recognize shared locks, integrity checks, etc.
218
219
Figure 9-2: File Server Architecture
FAT CLIENT
Two-Tier Database Server Architectures
• Client is responsible for
– I/O processing logic
– Some business rules logic
• Server performs all data storage and access
processing
 DBMS is only on server
220
Advantages of Two-Tier Approach
• Clients do not have to be as powerful
• Greatly reduces data traffic on the network
• Improved data integrity since it is all
processed centrally
• Stored procedures  some business rules
done on server
221
Advantages of
Stored Procedures
• Compiled SQL statements
• Reduced network traffic
• Improved security
• Improved data integrity
• Thinner clients
222
223
Two-tier database server architecture
Thinner
clients
DBMS only
on server
Three-Tier Architectures
224
Thin Client
 PC just for user interface and a little application
processing. Limited or no data storage (sometimes no
hard drive)
GUI interface
(I/O processing)
Browser
Business rules Web Server
Data storage DBMS
Client
Application server
Database server
225
Three-tier architecture
Thinnest
clients
Business rules on
separate server
DBMS only on
DB server
Advantages of Three-Tier
Architectures
• Scalability
• Technological flexibility
• Long-term cost reduction
• Better match of systems to business needs
• Improved customer service
• Competitive advantage
• Reduced risk
226
Challenges of Three-tier
Architectures
• High short-term costs
• Tools and training
• Experience
• Incompatible standards
• Lack of compatible end-user tools
227
Application Partitioning
• Placing portions of the application code in
different locations (client vs. server) AFTER it
is written
• Advantages
– Improved performance
– Improved interoperability
– Balanced workloads
228
Parallel Computer Architectures
• Tightly Coupled
– Symmetric Multiprocessing (SMP)
– Multiple CPUs
– Shared RAM
• Loosely Coupled
– Massively Parallel Processing (MPP)
– Multiple CPUs
– Each CPU has its own RAM space
229
Parallel Computer Architectures
230
Figure 9-6
Tightly coupled – CPUs share
common memory space
Figure 9-7
Loosely coupled – CPUs each
have their own memory space
Query Processing with Parallel
Processors
231
Figure 9-5a:
Parallel transactions
Figure 9-5b:
Parallel query
Processing Logic Distributions
232
Two-tier distributions
n-tier distributions
Processing logic could be
at client, server, or both
Processing logic will be at
application server or Web
server
Middleware
• Software which allows an application to
interoperate with other software
• No need for programmer/user to understand
internal processing
• Accomplished via Application Program
Interface (API)
233
The “glue” that holds client/server applications together
Types of Middleware
• Remote Procedure Calls (RPC)
– client makes calls to procedures running on remote computers
– synchronous and asynchronous
• Message-Oriented Middleware (MOM)
– asynchronous calls between the client via message queues
• Publish/Subscribe
– push technology  server sends information to client when available
• Object Request Broker (ORB)
– object-oriented management of communications between clients and servers
• SQL-oriented Data Access
– middleware between applications and database servers
234
Database Middleware
• ODBC – Open Database Connectivity
– Most DB vendors support this
• OLE-DB
– Microsoft enhancement of ODBC
• JDBC – Java Database Connectivity
– Special Java classes that allow Java
applications/applets to connect to databases
235
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
236
Query-by-Example (QBE)
• Direct-manipulation database language
• Graphical approach
• Available in MS Access
• MS Access translates QBE to SQL and vice versa
• Useful for end-user database programming
• Good for ad hoc processing and prototyping
237
238
Figure 9-10:
QBE view of
a multiple-
table join
query
Figure 9-12:
Equivalent
query in SQL
239
Figure 9-9: Access usability hierarchy
Foundation of MS Access
Simple processes
Stored modules of pre-
existing VBA code
Visual Basic for
Applications…language for
customizing the application
API to call functions in
DLLs external to MS Access
Using ODBC to Link External Databases
Stored on a Database Server
• Open Database Connectivity (ODBC)
– API that provides a common language for application programs to
access and process SQL databases independent of the particular
RDBMS that is accessed
• Required parameters:
– ODBC driver
– Back-end server name
– Database name
– User id and password
• Additional information:
– Data source name (DSN)
– Windows client computer name
– Client application program’s executable name
240
Java Database Connectivity (JDBC) is similar to ODBC – built specifically for Java applications
ODBC Architecture
(Figure 9-18)
241
Each DBMS has its own ODBC-compliant driver
Client does not need
to know anything
about the DBMS
Application Program Interface
(API) provides common
interface to all DBMSs
Visual Basic for Applications
• VBA is the programming language that
accompanies Access 2000
• VBA provides these features:
– Ability to perform complex functionality
– Error handling
– Faster execution than macros
– Easier maintenance
– OLE automation
– Programmatic control
– Ease of reading for programmers
• Event-driven – nonprocedural programming that detects
events and generates appropriate responses
242
P2P
P2P
Application-level overlays
• One per application
• Nodes are decentralized
ISP3
ISP1 ISP2
Site 1
Site 4
Site 3
Site 2
N
N N
N
N
N
P2P systems are overlay networks without central control
Client/Server Limitations
• Scalability is hard to achieve
• Presents a single point of failure
• Requires administration
• Unused resources at the network edge
• P2P systems try to address these limitations
Client-Server Versus Peer-to-
Peer Network Architecture
• A simple distinction
– Client-server
• Computers perform asymmetric functions
– Peers-to-Peer (P2P)
• Computers perform symmetric functions
• Different architectures offer different benefits
• Pure P2P networks are rare
– Most P2P networks rely on centralized server for some
functions
What is P2P?
…a technology that enables
two or more peers to
collaborate
spontaneously in a
network of equal peers by
using appropriate
information and
communication systems
without the necessity for
central coordination.
• File/information/resource
sharing
• Equal peers
• Decentralization
Workstation
(Client)
Server
Workstation
(Client)
Client/Server Model
Server
Workstation
(Client)
Order
result
Peer to Peer Model
Assumption
Workstation is so powerless
that it can not do any task.
result Order
Assumption
Workstation is powerful
enough to do some jobs
Pure P2P
Other workstation and server can
remote-control the workstation
Only User (Operator) can
control the workstation
P2P Network Features
• Clients are also servers and routers
– Nodes contribute content, storage, memory, CPU
• Nodes are autonomous (no administrative authority)
• Network is dynamic: nodes enter and leave the
network “frequently”
• Nodes collaborate directly with each other (not
through well-known servers)
• Nodes have widely varying capabilities
Features of the P2P Computing
• P2P computing is the sharing of computer resources and
services by direct exchange between systems.
• These resources and services include the exchange of
information, processing cycles, cache storage, and disk
storage for files.
• P2P computing takes advantage of existing computing
power, computer storage and networking connectivity,
allowing users to leverage their collective power to the
‘benefit’ of all.
P2P Architecture
• All nodes are both
clients and servers
– Provide and consume
data
– Any node can initiate a
connection
• No centralized data
source
– “The ultimate form of
democracy on the
Internet”
– “The ultimate threat to
copy-right protection on
the Internet”
Node
Node
Node Node
Node
Internet
Client-Server vs. Peer-to-Peer
Example
C
li
e
n
t
–
S
e
r
v
e
r
P
e
e
r
-
t
o
-
P
e
e
r
Large-Scale Data Sharing: P2P
Client
Internet
server
Client
Client
Client
Client
Client
Client
Client
Client
Client
Cache
Proxy
server
Congestion zone Client/
Server
server server
Client/
Server
Client/
Server Client/
Server
Client/
Server
Client/
Server
Client/
Server
Client/
Server
Client/
Server
Congestion zone
Client/server model
Peer-to-peer model
p2p pir too pir n. a virtual network of functionally similar
nodes created using an alternate, often private, namespace
P2P Benefits
• Efficient use of resources
– Unused bandwidth, storage, processing power at the edge of the network
• Scalability
– Since every peer is alike, it is possible to add more peers to the system and scale
to larger networks
– Consumers of resources also donate resources
– Aggregate resources grow naturally with utilization
• Reliability
– Replicas
– Geographic distribution
– No single point of failure
• E.g., the Internet and the Web do not have a central point of failure.
• Most internet and web services use the client-server model (e.g. HTTP), so a specific
service does have a central point of failure
• Ease of administration
– Nodes self organize
– No need to deploy servers to satisfy demand – confer (compare, c.f.) scalability
– Built-in fault tolerance, replication, and load balancing
The traditional network
architecture
A hybrid P2P network
architecture
• A hybrid P2P architecture
P2P must be disruptive…
• Peer-to-peer (p2p): third generation of the Internet
• 1st generation: “raw” Internet
• 2nd generation: the Web
• 3rd generation: making new services to users
cheaply and quickly by making use of their PCs as
active participants in computing processes
• P2P doing this in “disruptive” ways
Peer-peer networking
Peer-peer networking
Focus at the application level
How it works
Three main categories of systems
• Centralized systems: peer connects to server which
coordinates and manages communication. e.g. SETI@home
• Brokered systems: peers connect to a server to discover
other peers, but then manage the communication themselves
(e.g. Napster). This is also called Brokered P2P.
• Decentralized systems: peers run independently with no
central services. Discovery is decentralized and
communication takes place between the peers. e.g. Gnutella,
Freenet
Classification of the P2P Systems
True P2P
What P2P is good for?
• Community Web network
– Any group with specific common interests, including a
family or hobbyists, can use lists and a Web site to
create their own intranet.
• Search engines
– Fresh, up-to-date information can be found by
searching directly across the space where the desired
item is likely to reside
• Collaborative development
– The scope can range from developing software products
to composing a document to applications like rendering
graphics.
P2P Application Areas
• Communication
– AOL Instant Messenger
– ICQ
• Remote Collaboration (Shared File Editing, Audio-video Conferencing)
– Jabber
– Shared whiteboard
• Multiplayer Games
– Unreal Tournament, DOOM
• Streaming (Application-level Multicast)
– Narada
– Yoid
– NICE, CAN-Multicast, Scribe
• Distributed Computing
– SETI@home
• File Sharing
– Napster
– Gnutella, Freenet, LimeWire
– KazaA, Morpheus
• Ad-hoc networks
Instant Messaging
• A convenient way of communicating with a small group of selected people
(e.g., friends, family members, etc.)
• Usually, a central server is used to store user profiles and to have a list of
registered users
• While communication takes place between the peers, searching for other
people is done using the server
• One of the reasons why a server is needed is the ability to send messages to
other persons (i.e., peers)
• If the target peer is not online, the system has to store the message until the
target peers becomes online again
• This would be, of course, also possible with a server-less P2P system, but
the price would be an increased complexity and a certain probability of
messages getting lost
• Examples for such systems are:
– Napster
– ICQ
– threedegrees
– Jabber
Collaboration
• This is not a typical example for the usefulness of P2P technology
• It is about having people having the same view or different views
on shared information
• This would typically call for a server storing this information
• This way, the information is available to all members without the
necessity of having the information provider or contributor online
or the data distributed to all other participants
• But there are use cases where P2P technology comes in mobile
phones
• One example could be ad hoc collaboration of devices in an
environment where no connection to a server exist
– E.g., people are meeting in a place where no connection to the
Internet is available
• In this scenario, people would communicate (and collaborate) in a
server-less P2P manner
• One perfect example for this use case is Groove
– It uses a server to store shared information but is also able to
provide collaboration services without the existence of such a
server
P2P Technical Challenges
• Peer identification
• Routing protocols
• Network topologies
• Peer discovery
• Communication/coordination protocols
• Quality of service
• Security
• Fine-grained resource management
Fault Tolerance, Logging
& recovery
Lecture Outline
Real Systems (are often unreliable)
◦ We ignored failures till now
◦ Fault Tolerance basic concepts
Fault Tolerance – Check pointing
Fault Tolerance – Logging and Recovery
269
What is Fault Tolerance?
• Dealing successfully with partial failure
within a distributed system
• Fault tolerant ~> dependable systems
• Dependability implies the following:
1. Availability
2. Reliability
3. Safety
4. Maintainability
Dependability Concepts
• Availability – the system is ready to be used immediately.
• Reliability – the system runs continuously without failure.
• Safety – if a system fails, nothing catastrophic
will happen. (e.g. process control systems)
• Maintainability – when a system fails, it can
be repaired easily and quickly (sometimes, without its users
noticing the failure). (also called Recovery)
– What’s a failure? : System that cannot meet its goals => faults
– Faults can be: Transient, Intermittent, Permanent
Failure Models
Masking Failures by Redundancy
• Strategy: hide the occurrence of failure from
other processes using redundancy.
1. Information Redundancy – add extra bits to
allow for error detection/recovery (e.g.,
Hamming codes and the like).
2. Time Redundancy – perform operation and, if
needs be, perform it again. Think about how
transactions work (BEGIN/END/COMMIT/ABORT).
3. Physical Redundancy – add extra (duplicate)
hardware and/or software to the system.
Masking Failures by Redundancy
Triple modular redundancy in a circuit (b)
A,B,C are circuit elements and V* are voters
Lecture Outline
• Real Systems (are often unreliable)
– We ignored failures till now
– Fault Tolerance basic concepts
• Fault Tolerance – Recovery using Check pointing
• Fault Tolerance – Logging and Recovery
275
Achieving Fault Tolerance in DS
 Process Resilience (when processes fail) T8.2
◦ Have multiple processes (redundancy)
◦ Group them (flat, hierarchically), voting
 Reliable RPCs (communication failures) T8.3
◦ Several cases to consider (lost reply, client crash, …)
◦ Several potential solutions for each case
 Distributed Commit Protocols
◦ Perform operations by all group members, or not at all
◦ 2 phase commit, … (last lecture)
 Today: A failure has occurred, can we recover?
276
Recovery Strategies
 When a failure occurs, we need to bring the
system into an error free state (recovery). This is
fundamental to Fault Tolerance.
1. Backward Recovery: return the system to some
previous correct state (using checkpoints), then
continue executing. Example?
◦ Packet retransmit in case of lost packet
2. Forward Recovery: bring the system into a
correct new state, from which it can then continue
to execute. Example?
◦ Erasure coding, (n,k) where k < n <= 2k
Forward and Backward Recovery
 Major disadvantage of Backward Recovery:
◦ Checkpointing can be very expensive (especially
when errors are very rare).
◦ [Despite the cost, backward recovery is implemented
more often. The “logging” of information can be
thought of as a type of checkpointing.].
 Major disadvantage of Forward Recovery:
◦ In order to work, all potential errors need to be
accounted for up-front.
◦ When an error occurs, the recovery mechanism then
knows what to do to bring the system forward to a
correct state.
Checkpointing
A recovery line to detect the correct distributed snapshot
This becomes challenging if checkpoints are un-coordinated
Independent Checkpointing
The domino effect – Cascaded rollback
P2 crashes, roll back, but 2 checkpoints inconsistent (P2 shows m received, but P1 does not show m sent)
Coordinated Checkpointing
 Key idea: each process takes a checkpoint after a globally
coordinated action. (why is this good?)
 Simple Solution: 2-phase blocking protocol
◦ Co-ordinator multicast checkpoint_REQUEST message
◦ Participants receive message, takes a checkpoint, stops sending
(application) messages, and sends back checkpoint_ACK
◦ Once all participants ACK, coordinator sends checkpoint_DONE to
allow blocked processes to go on
 Optimization: consider only processes that depend on the
recovery of the coordinator (those it sent a message since
last checkpoint)
281
Recovery – Stable Storage
(a) Stable storage.
(b) Crash after drive 1 is updated.
(c) Bad spot.
Goal: Make transactions Reliable
 …in the presence of failures
◦ Machines can crash. Disk Contents (OK), Memory (volatile), Machines
don’t misbehave
◦ Networks are flaky, packet loss, handle using timeouts
 If we store database state in memory, a crash will cause loss of
“Durability”.
 May violate atomicity, i.e. recover such that uncommited
transactions COMMIT or ABORT.
 General idea: store enough information to disk to determine
global state (in the form of a LOG)
283
Challenges:
 Disk performance is poor (vs memory)
◦ Cannot save all transactions to disk
◦ Memory typically several orders of magnitude faster
 Writing to disk to handle arbitrary crash is hard
◦ Several reasons, but HDDs and SSDs have buffers
 Same general idea: store enough data on disk so as to
recover to a valid state after a crash:
◦ Shadow pages and Write-ahead Logging (WAL)
284
Shadow Paging Vs WAL
 Shadow Pages
◦ Provide Atomicity and Durability, “page” = unit of storage
◦ Idea: When writing a page, make a “shadow” copy
 No references from other pages, edit easily!
◦ ABORT: discard shadow page
◦ COMMIT: Make shadow page “real”. Update pointers to
data on this page from other pages (recursive). Can be done
atomically
◦ Essentially “copy-on-write” to avoid in-place page update
285
Shadow Paging vs WAL
 Write-Ahead-Logging
◦ Provide Atomicity and Durability
◦ Idea: create a log recording every update to database
◦ Updates considered reliable when stored on disk
◦ Updated versions are kept in memory (page cache)
◦ Logs typically store both REDO and UNDO operations
◦ After a crash, recover by replaying log entries to
reconstruct correct state
◦ WAL is more common, fewer disk operations, transactions
considered committed once log written.
286
Write-Ahead Logging
 View as sequence of entries, sequential number
◦ Log-Sequence Number (LSN)
◦ Database: fixed size PAGES, storage at page level
 Pages on disk, some also in memory (page cache)
◦ “Dirty pages”: page in memory differs from one on disk
 Reconstruction of global consistent state
◦ Log files + disk contents + (page cache)
 Logs consist of sequence of records
◦ Begin LSN, TID #Begin TXN
◦ End LSN, TID, PrevLSN #Finish TXN (abort or commit)
◦ Update LSN, TID, PrevLSN, pageID, offset, old value,
new value
287
Write-Ahead Logging
 Logs consist of sequence of records
◦ To record an update to state
◦ Update LSN, TID, PrevLSN, pageID, offset, old value,
new value
◦ PrevLSN forms a backward chain of operations for each TID
◦ Storing “old” and “new” values allow REDO operations to bring a page up to date,
or UNDO an update reverting to an earlier version
 Transaction Table (TT): All TXNS not written to disk
◦ Including Seq Num of the last log entry they caused
 Dirty Page Table (DPT): all dirty pages in memory
◦ Modified pages, but not written back to disk.
288
Write-Ahead-Logging
 Commit a transaction
◦ Log file up to date until commit entry
◦ Don't update actual disk pages, log file has information
◦ Keep "tail" of log file in memory => not commits
◦ If the tail gets wiped out (crash), then partially executed
transactions will lost. Can still recover to reliable state
 Abort a transaction
◦ Locate last entry from TT, undo all updates so far
◦ Use PrevLSN to revert in-memory pages to start of TXN
◦ If page on disk needs undo, wait (come back to this)
289
Recovery using WAL – 3 passes
 Analysis Pass
◦ Reconstruct TT and DPT (from start or last checkpoint)
◦ Get copies of all pages at the start
 Recovery Pass (redo pass)
◦ Replay log forward, make updates to all dirty pages
◦ Bring everything to a state at the time of the crash
 Undo Pass
◦ Replay log file backward, revert any changes made by
transactions that had not committed (use PrevLSN)
◦ For each write Compensation Log Record (CLR)
◦ Once you reach BEGIN TXN, write an END TXN entry
290
WAL can be integrated with 2PC
• WAL can integrate with 2PC
– Have additional log entries that capture 2PC
operation
– Coordinator: Include list of participants
– Participant: Indicates coordinator
– Votes to commit or abort
– Indication from coordinator to Commit/Abort
291
Optimizing WAL
 As described earlier:
◦ Replay operations back to the beginning of time
◦ Log file would be kept forever, (entire Database)
 In practice, we can do better with
CHECKPOINT
◦ Periodically save DPT, TT
◦ Store any dirty pages to disk, indicate in LOG file
◦ Prune initial portion of log file: All transactions
upto checkpoint have been committed or aborted.
292
Summary
 Real Systems (are often unreliable)
◦ Introduced basic concepts for Fault Tolerant Systems
including redundancy, process resilience, RPC
 Fault Tolerance – Backward recovery using check
pointing, both Independent and coordinated
 Fault Tolerance –Recovery using Write-Ahead-
Logging, balances the overhead of check pointing
and ability to recover to a consistent state
293
Transactions: ACID Properties
Atomicity: Each transaction completes in its
entirely, or is aborted. If aborted, should not
have have effect on the shared global state.
◦ Example: Update account balance on multiple servers
Consistency: Each transaction preserves a set of
invariants about global state. (exact nature is
system dependent).
◦ Example: in a bank system, law of conservation of $$
295
 Isolation: Also means serializability. Each
transaction executes as if it were the only one with
the ability to RD/WR shared global state.
 Durability: Once a transaction has been completed,
or “committed” there is no going back. In other
words there is no “undo”.
 Transactions can also be nested
 “Atomic Operations” => Atomicity + Isolation
296
Transactions: ACID Properties
Structured Naming
Internet Naming Service: DNS*
Overview
• Introduction to the DNS
• DNS Components
• DNS Structure and Hierarchy
• The DNS in Context
The DNS is…
• The “Domain Name System”
• What Internet users use to reference
anything by name on the Internet
• The mechanism by which Internet software
translates names to attributes such as
addresses
The DNS is also…
• A globally distributed, scalable, reliable database
• Comprised of three components
– A “name space”
– Servers making that name space available
– Resolvers (clients) which query the servers about the
name space
DNS as a Lookup Mechanism
• Users generally prefer names to numbers
• Computers prefer numbers to names
• DNS provides the mapping between the two
– I have “x”, give me “y”
Global Distribution
• Data is maintained locally, but retrievable
globally
– No single computer has all DNS data
• DNS lookups can be performed by any
device
• Remote DNS data is locally cachable to
improve performance
Loose Coherency
• Each version of a subset of the database (a zone)
has a serial number
– The serial number is incremented on each database change
• Changes to the master copy of the database are
propagated to replicas according to timing set by
the zone administrator
• Cached data expires according to timeout set by
zone administrator
Domain Names
• A domain name is the sequence of labels from a node to the root,
separated by dots (“.”s), read left to right
– The name space has a maximum depth of 127 levels
– Domain names are limited to 255 characters in length
• A node’s domain name identifies its position in the name space
dakota
west
tornado
east www
nominum metainfo
com
berkeley nwu
edu gov
nato
int
army
mil
uu
net org
""
Subdomains
• One domain is a subdomain of another if its
domain name ends in the other’s domain name
– So sales.nominum.com is a subdomain of
• nominum.com & com
– nominum.com is a subdomain of com
Overview
• Introduction to the DNS
• DNS Components
– The name space
– The servers
– The resolvers
• DNS Structure and Hierarchy
• The DNS in Context
Name Servers
• Name servers store information about the name
space in units called “zones”
– The name servers that load a complete zone are said to
“have authority for” or “be authoritative for” the zone
• Usually, more than one name server are
authoritative for the same zone
– This ensures redundancy and spreads the load
• Also, a single name server may be authoritative
for many zones
Name Servers and Zones
128.8.10.5
nominum.com
204.152.187.11
202.12.28.129
Name Servers
isc.org
Zones
128.8.10.5
serves data for
both
nominum.com
and isc.org
zones
202.12.28.12
9 serves
data for
nominum.co
m zone only
204.152.187.11
serves data for
isc.org zone only
Types of Name Servers
• Two main types of servers
– Authoritative – maintains the data
• Master – where the data is edited
• Slave – where data is replicated to
– Caching – stores data obtained from an authoritative
server
• No special hardware necessary
Name Server Architecture
• You can think of a name server as part of:
– database server, answering queries about the
parts of the name space it knows about (i.e., is
authoritative for),
– cache, temporarily storing data it learns from
other name servers, and
– agent, helping resolvers and other name servers
find data
Name Server Architecture
Master
server
Zone transfer
Zone
data
file
From
disk
Authoritative Data
(primary master and
slave zones)
Agent
(looks up queries
on behalf of resolvers)
Cache Data
(responses from
other name servers)
Name Server Process
Authoritative Data
Resolver
Query
Response
Authoritative Data
(primary master and
slave zones)
Agent
(looks up queries
on behalf of resolvers)
Cache Data
(responses from
other name servers)
Name Server Process
Using Other Name Servers
Another
name
server
Response
Resolver
Query
Query
Authoritative Data
(primary master and
slave zones)
Agent
(looks up queries
on behalf of resolvers)
Cache Data
(responses from
other name servers)
Name Server Process
Response
Cached Data
Query
Response
Authoritative Data
(primary master and
slave zones)
Agent
(looks up queries
on behalf of resolvers)
Cache Data
(responses from
other name servers)
Name Server Process
Resolver
Overview
• Introduction to the DNS
• DNS Components
– The name space
– The servers
– The resolvers
• DNS Structure and Hierarchy
• The DNS in Context
ping www.nominum.com.
The Resolution Process
• Let’s look at the resolution process step-by-
step:
annie.west.sprockets.com
What’s the IP address
of
www.nominum.com?
The Resolution Process
• The workstation annie asks its configured name
server, dakota, for www.nominum.com’s address
ping www.nominum.com.
annie.west.sprockets.com
dakota.west.sprockets.com
The Resolution Process
• The name server dakota asks a root name server, m, for
www.nominum.com’s address
ping www.nominum.com.
annie.west.sprockets.com
m.root-servers.net
dakota.west.sprockets.com
What’s the IP address
of
www.nominum.com?
The Resolution Process
• The root server m refers dakota to the com name servers
• This type of response is called a “referral”
ping www.nominum.com.
annie.west.sprockets.com
m.root-servers.net
dakota.west.sprockets.com Here’s a list of the
com name servers.
Ask one of them.
The Resolution Process
• The name server dakota asks a com name server, f,
for www.nominum.com’s address
ping www.nominum.com.
annie.west.sprockets.com
m.root-servers.net
dakota.west.sprockets.com
What’s the IP address
of
www.nominum.com?
f.gtld-servers.net
The Resolution Process
• The com name server f refers dakota to the
nominum.com name servers
ping www.nominum.com.
annie.west.sprockets.com
f.gtld-servers.net
m.root-servers.net
dakota.west.sprockets.com
Here’s a list of the
nominum.com
name servers.
Ask one of them.
ping ftp.nominum.com.
Resolution Process (Caching)
• After the previous query, the name server dakota now knows:
– The names and IP addresses of the com name servers
– The names and IP addresses of the nominum.com name servers
– The IP address of www.nominum.com
• Let’s look at the resolution process again
annie.west.sprockets.com
Overview
• Introduction to the DNS
• DNS Components
• DNS Structure and Hierarchy
• The DNS in Context
DNS Structure and Hierarchy
• The DNS imposes no constraints on how the DNS
hierarchy is implemented except:
– A single root
– The label restrictions
– So, can we create a host with a name a.wonderful.world?
• If a site is not connected to the Internet, it can use any
domain hierarchy it chooses
– Can make up whatever TLDs (top level domains) you want
• Connecting to the Internet implies use of the existing
DNS hierarchy
Registries, Registrars, and Registrants
• A classification of roles in the operation of a domain name space
• Registry
– the name space’s database
– the organization which has edit control of that database
– the organization which runs the authoritative name servers for that
name space
• Registrar
– the agent which submits change requests to the registry on behalf of
the registrant
• Registrant
– the entity which makes use of the domain name
Overview
• Introduction to the DNS
• DNS Components
• DNS Hierarchy
• The DNS in Context
Questions?
distributed system original.pdf
What is a Distributed File System??
• Allows transparent access to remote files over a
network.
Examples:
• Network File System (NFS) by Sun Microsystems.
• Remote File Sharing System (RFS) from AT&T.
• Andrew File System (AFS) from CMU.
Centralized File System Vs. Distributed File System
Properties of Distributed File Systems
• Network transparency.
• Location transparency.
• Location independence.
• User mobility.
• Fault tolerance.
• Scalability.
• File Mobility.
Design Considerations
Different Distributed File Systems can be compared
according to how they deal with these issues:
• Name Space.
• Stateful or stateless operation.
• Semantics of sharing.
• Remote access methods.
Network File Systems (NFS)
• The architecture is based on the Client-Server model.
• Clients and servers communicate via Remote
Procedure Calls (RPC).
• An NFS server exports one or more filesystems.
• Clients mount such a file system.
- Hard and Soft mounts.
e.g: mount –t nfs nfssrv:/usr /usr
Design Goals
• NFS should not be restricted to UNIX.
• The protocol should not be dependent on any
particular hardware.
• Simple recovery mechanisms.
• Remote files should be accessible transparently.
• NFS performance should be comparable to that of local
disk.
• Implementation must be transport independent.
• Unix file system semantics must be maintained for
UNIX clients.
NFS Components
• The NFS protocol
• The Remote Procedure Call (RPC) protocol.
• The Extended Data Representation (XDR).
• The NFS Server Code.
• The NFS Client Code.
• The Mount protocol.
• Daemon processes.
• The Network Lock Manager (NLM).
NFS Implementation
• Control flow: When a process on the client makes a
system call that operates on an NFS file, the file-system
independent code identifies the vnode of the file and
invokes the relevant Vnode operation.
• File handles: The NFS protocol associates an object
called the file handle with each file or directory.
• The mount operation:
•Pathname Lookup
UNIX Semantics
• Open file permissions.
• Deletion of open files.
• Reads and writes.
NFS Performance
• Performance Bottlenecks.
• Client-Side Caching.
• Deferral of writes.
• The Retransmissions Cache.
Remote File Sharing (RFS)
• Introduced by AT&T.
• RFS uses the client-server model.
• The design goal is to provide transparent access to remote files by
preserving UNIX semantics.
• RFS is a completely stateful architecture.
• RFS uses a reliable, virtual circuit transport service such as TCP/IP.
A virtual circuit is established between a client and server during the
first mount operation.
• Network independence is achieved.
•There is a name server.
RFS Implementations
• Remote mount: An RFS server can advertise a
directory using the advfs system call along with some
arguments.
• RFS clients and servers: The client can access an RFS
file either through its pathname or through a file
descriptor.
• Crash Recovery: Stateful systems need elaborate crash
recovery mechanisms.
Client-Side Caching: Client caching is
activated at mount time. The cache is strictly
write through and the data is written to server
immediately after the local cache copy is
written to and thus the consistency is
maintained.
Cache Consistency: Any modification of a
file, either by user or client, invalidates the
cached copy on all other clients.
Andrew File System (AFS)
This is a distributed file system capable of scaling to
thousands of users like in a university campus.
• Developed by Carnegie-Melon University and IBM.
• AFS is UNIX compatible.
• It provides a uniform, location independent name space
for shared files.
• AFS is fault tolerant in case a server fails.
• AFS provides security without trusting clients or n/w.
• The performance should be comparable to time-sharing
system.
The Andrew File System
Scalable Architecture:
Storage and Name space organization:
Session semantics:
AFS Implementation
Caching and Consistency: The cache manager
implements the vnode operations for AFS files on
clients.
Pathname Lookup: This is a CPU intensive operation
and AFS handles it directly on clients.
Security: AFS considers the collection of servers as the
boundary of secutriy. It uses the Kerberos authentication
system.
The DCE Distributed File System
In 1989 the Transarc Corporation took over the
development and production of AFS.
DFS is similar to AFS in several respects. It improves
upon AFS in following ways:
• It allows a single machine to be both a server and
client.
• It provides stronger, UNIX like sharing semantics
and consistency guarantees.
• It allows greater interoperability with other file
systems.
Questions??

More Related Content

PDF
Object oriented analysis and design unit- i
PPT
Component based models and technology
PDF
MG6088 SOFTWARE PROJECT MANAGEMENT
PPT
Chapter 10
PPTX
4.software management
PPT
HCI 3e - Ch 9: Evaluation techniques
PPTX
Object Oriented Approach for Software Development
PDF
Uml Tutorial
Object oriented analysis and design unit- i
Component based models and technology
MG6088 SOFTWARE PROJECT MANAGEMENT
Chapter 10
4.software management
HCI 3e - Ch 9: Evaluation techniques
Object Oriented Approach for Software Development
Uml Tutorial

What's hot (20)

PPTX
Class based modeling
PPT
Chapter 7
PPTX
Database System Architectures
PPT
State Diagrams
PDF
Rayleigh model
PDF
Object oriented analysis and design unit- ii
PDF
CS8592-OOAD Lecture Notes Unit-1
PPTX
Scenario based methods
PDF
Web services
PPT
Object oriented modeling and design
PDF
Php file handling in Hindi
PPTX
Proses rekayasa perangkat lunak
PPT
Ooad ch 4
PPT
5 architecture
PDF
M.sc.iii sem digital image processing unit iv
DOCX
Uml Common Mechanism
PPTX
Object oriented modeling and design
PPT
Лекція №14
PDF
Kriptografi - Algoritma Kriptografi Modern
PPT
Software coding and testing
Class based modeling
Chapter 7
Database System Architectures
State Diagrams
Rayleigh model
Object oriented analysis and design unit- ii
CS8592-OOAD Lecture Notes Unit-1
Scenario based methods
Web services
Object oriented modeling and design
Php file handling in Hindi
Proses rekayasa perangkat lunak
Ooad ch 4
5 architecture
M.sc.iii sem digital image processing unit iv
Uml Common Mechanism
Object oriented modeling and design
Лекція №14
Kriptografi - Algoritma Kriptografi Modern
Software coding and testing
Ad

Similar to distributed system original.pdf (20)

PDF
distributed system chapter one introduction to distribued system.pdf
PPTX
Introduction to Distributed System
PDF
Lecture 1 distriubted computing
PPTX
Distributed Computing Introduction01.pptx
PPT
Lecture 2 - Definition and Goals of a Distributed System.ppt
PPT
DISTRIBUTED SYSTEMS lecture notes 25 .ppt
PPTX
Unit 1
PPTX
Lect 1 Distributed System.pptx
PPTX
Unit 1
PPT
Intorduction Distributed and Parallel Computing.ppt
PPTX
Lecture 9.pptx
PPTX
Unit 1
PPT
itwiki.pptFRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRY...
DOCX
DISTRIBUTED SYSTEM.docx
PPTX
Distributed Systems.pptx
PPT
Chapter 1-Introduction.ppt
PPTX
PPTS DS UNIT-1.pptx
PDF
mnjkhhjggfhjkl;kjhgf hgghgfffd hghzss.pdf
PDF
mnjkhhjggfhjkl;kjhgf hgghgfffd hghzss.pdf
PPT
Chap 01 lecture 1distributed computer lecture
distributed system chapter one introduction to distribued system.pdf
Introduction to Distributed System
Lecture 1 distriubted computing
Distributed Computing Introduction01.pptx
Lecture 2 - Definition and Goals of a Distributed System.ppt
DISTRIBUTED SYSTEMS lecture notes 25 .ppt
Unit 1
Lect 1 Distributed System.pptx
Unit 1
Intorduction Distributed and Parallel Computing.ppt
Lecture 9.pptx
Unit 1
itwiki.pptFRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRY...
DISTRIBUTED SYSTEM.docx
Distributed Systems.pptx
Chapter 1-Introduction.ppt
PPTS DS UNIT-1.pptx
mnjkhhjggfhjkl;kjhgf hgghgfffd hghzss.pdf
mnjkhhjggfhjkl;kjhgf hgghgfffd hghzss.pdf
Chap 01 lecture 1distributed computer lecture
Ad

Recently uploaded (20)

PPTX
oil_refinery_comprehensive_20250804084928 (1).pptx
PPTX
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
PDF
Business Analytics and business intelligence.pdf
PPTX
Computer network topology notes for revision
PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PDF
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
PPTX
Acceptance and paychological effects of mandatory extra coach I classes.pptx
PPTX
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
PPTX
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
PPTX
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
PDF
Foundation of Data Science unit number two notes
PDF
Fluorescence-microscope_Botany_detailed content
PPTX
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
PPTX
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
PPTX
Introduction-to-Cloud-ComputingFinal.pptx
PDF
Mega Projects Data Mega Projects Data
PDF
Clinical guidelines as a resource for EBP(1).pdf
PPTX
MODULE 8 - DISASTER risk PREPAREDNESS.pptx
PPTX
climate analysis of Dhaka ,Banglades.pptx
oil_refinery_comprehensive_20250804084928 (1).pptx
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
Business Analytics and business intelligence.pdf
Computer network topology notes for revision
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
Acceptance and paychological effects of mandatory extra coach I classes.pptx
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
Foundation of Data Science unit number two notes
Fluorescence-microscope_Botany_detailed content
01_intro xxxxxxxxxxfffffffffffaaaaaaaaaaafg
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
Introduction-to-Cloud-ComputingFinal.pptx
Mega Projects Data Mega Projects Data
Clinical guidelines as a resource for EBP(1).pdf
MODULE 8 - DISASTER risk PREPAREDNESS.pptx
climate analysis of Dhaka ,Banglades.pptx

distributed system original.pdf

  • 2. Outline 1. What is a Distributed System 2. Why bother with them? 3. Examples of Distributed Systems 4. Common Characteristics 5. Goals 6. Summary
  • 3. What is Distributed?  Data are Distributed » If data must exist in multiple computers for admin and ownership reasons  Computation is Distributed » Applications taking advantage of parallelism, multiple processors, » particular feature » Scalability and heterogeneity of Distributed System  Users are Distributed » If Users communicate and interact via application (shared objects)
  • 4. History of Distributed Computing • 1940. The British Government came to the conclusion that 2 or 3 computers would be sufficient for UK. • 1960. Mainframe computers took up a few hundred square feet. • 1970. First Local Area Networks (LAN) such as Ethernet. • 1980. First network cards for PCs. • 1990. First wide area networks, the Internet, that evolved from the US Advanced Research Projects Agency net (ARPANET, 4 nodes in 1969) and was, later, fueled by the rapid increase in network bandwith and the invention of the World Wide Web at CERN in 1989.
  • 5. Distributed System Types (Enslow 1978) Fully Distributed Processors Control Fully replicated Not fully replicated master directory Local data, local directory Master-slave Autonomous transaction based Autonomous fully cooperative Homog. special purpose Heterog. special purpose Homog. general purpose Heterog. general purpose
  • 6. What is a Distributed System? A collection of components that execute on different computers. Interaction is achieved using a computer network. A distributed system consists of a collection of autonomous computers, connected through a network and distributed operating system software, which enables computers to coordinate their activities and to share the resources of the system, so that users perceive the system as a single, integrated computing facility.
  • 7. Centralised System Characteristics • Non-autonomous parts: The system possesses full control. • Homogeneous: Constructed using the same technology (e.g., same programming language and compiler for all parts). • Component shared by all users all the time. • All resources accessible. • Software runs in a single process. • Single Point of control. • Single Point of failure (either they work or they do not work).
  • 8. Distributed System Characteristics • Multiple autonomous components. • Heterogeneous. • Components are not shared by all users. • Resources may not be accessible. • Software runs in concurrent processes on different processors. • Multiple Points of control. • Multiple Points of failure (but more fault tolerant!).
  • 9. Model of a Distributed System Component 1 Component n Middleware Network Operating System Hardware Host 1 Component 1 Component n Middleware Network Operating System Hardware Host n .. .. ………... Network
  • 10. Examples of Distributed Systems • Local Area Network • Database Management System • Automatic Teller Machine Network • World-Wide Web
  • 14. What Is A Distributed System? • A collection of independent computers that appears to its users as a single coherent system. • Features: – No shared memory – message-based communication – Each runs its own local OS – Heterogeneity • Ideal: to present a single-system image: – The distributed system “looks like” a single computer rather than a collection of separate computers.
  • 15. Advantages and disadvantages Advantages  Economics  Speed  Inherent distribution  Reliability  Incremental growth Disadvantages  Software  Network  More components to fail
  • 16. Common Characteristics • What are we trying to achieve when we construct a distributed system? • Certain common characteristics can be used to assess distributed systems – Resource Sharing – Openness – Concurrency – Scalability – Fault Tolerance – Transparency
  • 17. Resource Access and Sharing • Ability to use any hardware, software or data anywhere in the system ... once authorised!. • Security implications: Resource manager controls access, provides naming scheme and controls concurrency. • Resource sharing model: client/server vs n-tier architectures.
  • 18. Openness • Openness is concerned with extensions and improvements of distributed systems. • Detailed interfaces of components need to be standardized and published. • It is crucial because the overall architecture needs to be stable even in the face of changing functional requirements.
  • 19. Concurrency • Components in distributed systems are executed in concurrent processes. • Components access and update shared resources (e.g. variables, databases, device drivers). • Integrity of the system may be violated if concurrent updates are not coordinated. – Lost updates – Inconsistent analysis
  • 20. Scalability • Adaptation of distributed systems to – accommodate more users – respond faster (this is the hard one) • Usually done by adding more and/or faster processors. • Components should not need to be changed when scale of a system increases. • Design components to be scalable!
  • 21. Fault Tolerance • Hardware, software and networks fail! • Distributed systems must maintain availability even at low levels of hardware/software/network reliability. • Fault tolerance is achieved by – Redundancy (replication) – Recovery – Design
  • 22. Transparency • Distributed systems should be perceived by users and application programmers as a whole rather than as a collection of cooperating components. • Transparency has different aspects that were identified by ANSA (Advanced Network Systems Architecture). • These represent properties that a well-designed distributed systems should have • They are dimensions against which we measure middleware components.
  • 23. Access Transparency • Enables local and remote information objects to be accessed using identical operations, that is, the interface to a service request is the same for communication between components on the same host and components on different hosts. • Example: File system operations in Unix Network File System (NFS). • A component whose access is not transparent cannot easily be moved from one host to the other. All other components that request services would first have to be changed to use a different interface.
  • 24. Location Transparency • Enables information objects to be accessed without knowledge of their physical location. • Example: Pages in the Web. • Example: When an NFS administrator moves a partition, for instance because a disk is full, application programs accessing files in that partition would have to be changed if file location is not transparent for them.
  • 25. Migration Transparency • Allows the movement of information objects within a system without affecting the operations of users or application programs. • It is useful, as it sometimes becomes necessary to move a component from one host to another (e.g., due to an overload of the host or to a replacement of the host hardware). • Without migration transparency, a distributed system becomes very inflexible as components are tied to particular machines and moving them requires changes in other components.
  • 26. Replication Transparency • Enables multiple instances of information objects to be used to increase reliability and performance without knowledge of the replicas by users or application programs. • Example: Distributed DBMS. • Example: Mirroring Web Pages.
  • 27. Concurrency Transparency • Enables several processes to operate concurrently using shared information objects without interference between them. Neither user nor application engineers have to see how concurrency is controlled. • Example: Bank applications. • Example: Database management system.
  • 28. Scalability Transparency • Allows the system and applications to expand in scale without change to the system structure or the application algorithms. • How system behaves with more components • Similar to performance Transparency, i.e QoS provided by applications. • Example: World-Wide-Web. • Example: Distributed Database.
  • 29. Performance Transparency • Allows the system to be reconfigured to improve performance as loads vary. • Consider how efficiently the system uses resources. • Relies on Migration and Replication transparency • Example: TCP/IP routes according to traffic. • Load Balancing. • Difficult to achieve because of dynamism
  • 30. Failure Transparency • Enables the concealment of faults! • Components can be designed without taking into account that services they rely on might fail. • Server components can recover from failures without the server designer taking measures for such recovery. • Allows users and applications to complete their tasks despite the failure of other components. • Its achievement is supported by both concurrency and replication transparency.
  • 32. Summary • What is a distributed system and how does it compare to a centralised system? • What are the characteristics of distributed systems? • What are the different dimensions of transparency?
  • 33. Role of Middleware (MW) • In some early research systems: MW tried to provide the illusion that a collection of separate machines was a single computer. – E.g. NOW project: GLUNIX middleware • Today: – clustering software allows independent computers to work together closely – MW also supports seamless access to remote services, doesn’t try to look like a general- purpose OS
  • 34. Middleware Examples • CORBA (Common Object Request Broker Architecture) • DCOM (Distributed Component Object Management) – being replaced by .net • Sun’s ONC RPC (Remote Procedure Call) • RMI (Remote Method Invocation) • SOAP (Simple Object Access Protocol)
  • 35. Middleware Examples • All of the previous examples support communication across a network: • They provide protocols that allow a program running on one kind of computer, using one kind of operating system, to call a program running on another computer with a different operating system – The communicating programs must be running the same middleware.
  • 36. Distributed System Goals • Resource Accessibility • Distribution Transparency • Openness • Scalability
  • 37. Goal 1 – Resource Availability • Support user access to remote resources (printers, data files, web pages, CPU cycles) and the fair sharing of the resources • Economics of sharing expensive resources • Performance enhancement – due to multiple processors; also due to ease of collaboration and info exchange – access to remote services – Groupware: tools to support collaboration • Resource sharing introduces security problems.
  • 38. Goal 2 – Distribution Transparency • Software hides some of the details of the distribution of system resources. – Makes the system more user friendly. • A distributed system that appears to its users & applications to be a single computer system is said to be transparent. – Users & apps should be able to access remote resources in the same way they access local resources. • Transparency has several dimensions.
  • 39. Types of Transparency Transparency Description Access Hide differences in data representation & resource access (enables interoperability) Location Hide location of resource (can use resource without knowing its location) Migration Hide possibility that a system may change location of resource (no effect on access) Replication Hide the possibility that multiple copies of the resource exist (for reliability and/or availability) Concurrency Hide the possibility that the resource may be shared concurrently Failure Hide failure and recovery of the resource. How does one differentiate betw. slow and failed? Relocation Hide that resource may be moved during use Figure 1-2. Different forms of transparency in a distributed system (ISO, 1995)
  • 40. Goal 2: Degrees of Transparency • Trade-off: transparency versus other factors – Reduced performance: multiple attempts to contact a remote server can slow down the system – should you report failure and let user cancel request? – Convenience: direct the print request to my local printer, not one on the next floor • Too much emphasis on transparency may prevent the user from understanding system behavior.
  • 41. Goal 3 - Openness • An open distributed system “…offers services according to standard rules that describe the syntax and semantics of those services.” In other words, the interfaces to the system are clearly specified and freely available. – Compare to network protocols – Not proprietary • Interface Definition/Description Languages (IDL): used to describe the interfaces between software components, usually in a distributed system – Definitions are language & machine independent – Support communication between systems using different OS/programming languages; e.g. a C++ program running on Windows communicates with a Java program running on UNIX – Communication is usually RPC-based.
  • 42. Examples of IDLs Goal 3-Openness • IDL: Interface Description Language – The original • WSDL: Web Services Description Language – Provides machine-readable descriptions of the services • OMG IDL: used for RPC in CORBA – OMG – Object Management Group • …
  • 43. • Interoperability: the ability of two different systems or applications to work together – A process that needs a service should be able to talk to any process that provides the service. – Multiple implementations of the same service may be provided, as long as the interface is maintained • Portability: an application designed to run on one distributed system can run on another system which implements the same interface. • Extensibility: Easy to add new components, features Open Systems Support …
  • 44. Goal 4 - Scalability • Dimensions that may scale: – With respect to size – With respect to geographical distribution – With respect to the number of administrative organizations spanned • A scalable system still performs well as it scales up along any of the three dimensions.
  • 45. Size Scalability • Scalability is negatively affected when the system is based on – Centralized server: one for all users – Centralized data: a single data base for all users – Centralized algorithms: one site collects all information, processes it, distributes the results to all sites. • Complete knowledge: good • Time and network traffic: bad
  • 46. Decentralized Algorithms • No machine has complete information about the system state • Machines make decisions based only on local information • Failure of a single machine doesn’t ruin the algorithm • There is no assumption that a global clock exists.
  • 47. Geographic Scalability • Early distributed systems ran on LANs, relied on synchronous communication. – May be too slow for wide-area networks – Wide-area communication is unreliable, point-to-point; – Unpredictable time delays may even affect correctness • LAN communication is based on broadcast. – Consider how this affects an attempt to locate a particular kind of service • Centralized components + wide-area communication: waste of network bandwidth
  • 48. Scalability - Administrative • Different domains may have different policies about resource usage, management, security, etc. • Trust often stops at administrative boundaries – Requires protection from malicious attacks
  • 49. Scaling Techniques • Scalability affects performance more than anything else. • Three techniques to improve scalability: – Hiding communication latencies – Distribution – Replication
  • 50. Hiding Communication Delays • Structure applications to use asynchronous communication (no blocking for replies) – While waiting for one answer, do something else; e.g., create one thread to wait for the reply and let other threads continue to process or schedule another task • Download part of the computation to the requesting platform to speed up processing – Filling in forms to access a DB: send a separate message for each field, or download form/code and submit finished version. – i.e., shorten the wait times
  • 51. Scaling Techniques Figure 1-4. The difference between letting (a) a server or (b) a client check forms as they are being filled.
  • 52. Distribution • Instead of one centralized service, divide into parts and distribute geographically • Each part handles one aspect of the job – Example: DNS namespace is organized as a tree of domains; each domain is divided into zones; names in each zone are handled by a different name server – WWW consists of many (millions?) of servers
  • 53. Scaling Techniques (2) Figure 1-5. An example of dividing the DNS name space into zones.
  • 54. Third Scaling Technique - Replication • Replication: multiple identical copies of something – Replicated objects may also be distributed, but aren’t necessarily. • Replication – Increases availability – Improves performance through load balancing – May avoid latency by improving proximity of resource
  • 55. Caching • Caching is a form of replication – Normally creates a (temporary) replica of something closer to the user • Replication is often more permanent • User (client system) decides to cache, server system decides to replicate • Both lead to consistency problems
  • 56. Summary Goals for Distribution • Resource accessibility – For sharing and enhanced performance • Distribution transparency – For easier use • Openness – To support interoperability, portability, extensibility • Scalability – With respect to size (number of users), geographic distribution, administrative domains
  • 57. Issues/Pitfalls of Distribution • Requirement for advanced software to realize the potential benefits. • Security and privacy concerns regarding network communication • Replication of data and services provides fault tolerance and availability, but at a cost. • Network reliability, security, heterogeneity, topology • Latency and bandwidth • Administrative domains
  • 58. Types of Distributed Systems • Distributed Computing Systems – Clusters – Grids – Clouds • Distributed Information Systems – Transaction Processing Systems – Enterprise Application Integration • Distributed Embedded Systems – Home systems – Health care systems – Sensor networks
  • 59. Cluster Computing Systems • Figure 1-6. An example of a cluster computing system. Figure 1-6. An example of a (Beowolf) cluster computing system
  • 60. Cluster Computing • A collection of similar processors (PCs, workstations) running the same operating system, connected by a high-speed LAN. • Parallel computing capabilities using inexpensive PC hardware • Replace big parallel computers (MPPs)
  • 61. Cluster Types & Uses • High Performance Clusters (HPC) – run large parallel programs – Scientific, military, engineering apps; e.g., weather modeling • Load Balancing Clusters – Front end processor distributes incoming requests – server farms (e.g., at banks or popular web site) • High Availability Clusters (HA) – Provide redundancy – back up systems – May be more fault tolerant than large mainframes
  • 62. Clusters – Beowulf model • Linux-based • Master-slave paradigm – One processor is the master; allocates tasks to other processors, maintains batch queue of submitted jobs, handles interface to users – Master has libraries to handle message-based communication or other features (the middleware).
  • 63. Clusters – MOSIX model • Provides a symmetric, rather than hierarchical paradigm – High degree of distribution transparency (single system image) – Processes can migrate between nodes dynamically and preemptively (more about this later.) Migration is automatic • Used to manage Linux clusters
  • 65. Grid Computing Systems • Modeled loosely on the electrical grid. • Highly heterogeneous with respect to hardware, software, networks, security policies, etc. • Grids support virtual organizations: a collaboration of users who pool resources (servers, storage, databases) and share them • Grid software is concerned with managing sharing across administrative domains.
  • 66. Grids • Similar to clusters but processors are more loosely coupled, tend to be heterogeneous, and are not all in a central location. • Can handle workloads similar to those on supercomputers, but grid computers connect over a network (Internet?) and supercomputers’ CPUs connect to a high-speed internal bus/network • Problems are broken up into parts and distributed across multiple computers in the grid – less communication betw parts than in clusters.
  • 67. Cloud Computing • Provides scalable services as a utility over the Internet. • Often built on a computer grid • Users buy services from the cloud – Grid users may develop and run their own software • Cluster/grid/cloud distinctions blur at the edges!
  • 68. Types of Distributed Systems • Distributed Computing Systems – Clusters – Grids – Clouds • Distributed Information Systems • Distributed Embedded Systems
  • 69. Transaction Processing System Characteristic properties of transactions:  Atomic: To the outside world, the transaction happens indivisibly.  Consistent: The transaction does not violate system invariants.  Isolated: Concurrent transactions do not interfere with each other.  Durable: Once a transaction commits, the changes are permanent
  • 70. Distributed Information Systems • Business-oriented • Systems to make a number of separate network applications interoperable and build “enterprise-wide information systems”. • Two types discussed here: – Transaction processing systems – Enterprise application integration (EAI)
  • 71. Transaction Processing Systems • Provide a highly structured client-server approach for database applications • Transactions are the communication model • Obey the ACID properties: – Atomic: all or nothing – Consistent: invariants are preserved – Isolated (serializable) – Durable: committed operations can’t be undone
  • 72. Transaction Processing Systems • Figure 1-8. Example primitives for transactions.
  • 73. Transactions • Transaction processing may be centralized (traditional client/server system) or distributed. • A distributed database is one in which the data storage is distributed – connected to separate processors.
  • 74. Nested Transactions • A nested transaction is a transaction within another transaction (a sub-transaction) – Example: a transaction may ask for two things (e.g., airline reservation info + hotel info) which would spawn two nested transactions • Primary transaction waits for the results. – While children are active parent may only abort, commit, or spawn other children
  • 75. Transaction Processing Systems Figure 1-9. A nested transaction.
  • 76. Implementing Transactions • Conceptually, private copy of all data • Actually, usually based on logs • Multiple sub-transactions – commit, abort – Durability is a characteristic of top-level transactions only • Nested transactions are suitable for distributed systems – Transaction processing monitor may interface between client and multiple data bases.
  • 77. Enterprise Application Integration • Less structured than transaction-based systems • EA components communicate directly – Enterprise applications are things like HR data, inventory programs, … – May use different OSs, different DBs but need to interoperate sometimes. • Communication mechanisms to support this include CORBA, Remote Procedure Call (RPC) and Remote Method Invocation (RMI)
  • 78. Enterprise Application Integration Figure 1-11. Middleware as a communication facilitator in enterprise application integration.
  • 79. Distributed Pervasive Systems • The first two types of systems are characterized by their stability: nodes and network connections are more or less fixed • This type of system is likely to incorporate small, battery-powered, mobile devices – Home systems – Electronic health care systems – patient monitoring – Sensor networks – data collection, surveillance
  • 80. Home System • Built around one or more PCs, but can also include other electronic devices: – Automatic control of lighting, sprinkler systems, alarm systems, etc. – Network enabled appliances – PDAs and smart phones, etc.
  • 81. Electronic Health Care Systems Figure 1-12. Monitoring a person in a pervasive electronic health care system, using (a) a local hub or (b) a continuous wireless connection.
  • 82. Sensor Networks • A collection of geographically distributed nodes consisting of a comm. device, a power source, some kind of sensor, a small processor… • Purpose: to collectively monitor sensory data (temperature, sound, moisture etc.,) and transmit the data to a base station • “smart environment” – the nodes may do some rudimentary processing of the data in addition to their communication responsibilities.
  • 83. Sensor Networks Figure 1-13. Organizing a sensor network database, while storing and processing data (a) only at the operator’s site or …
  • 84. Sensor Networks Figure 1-13. Organizing a sensor network database, while storing and processing data … or (b) only at the sensors.
  • 85. Summary – Types of Systems • Distributed computing systems – our main emphasis • Distributed information systems – we will talk about some aspects of them • Distributed pervasive systems – not so much ****
  • 87. Additional Slides • Middleware: CORBA, ONC RPC, SOAP • Distributed Systems – Historical Perspective • Grid Computing Sites
  • 88. CORBA COMMON OBJECT REQUEST BROKER ARCHITECTURE Architecture…
  • 89. Introduction CORBA (Common Object Request Broker Architecture) is a standard that enables an object written in one programming language, running on one platform to interact with objects across the network that are written in other programming languages and running on other platforms. For example, a client object written in C++ and running under Windows can communicate with an object on a remote machine written in Java running under UNIX. 89
  • 90. OMG The CORBA specification was developed by the Object Management Group (OMG). The OMG is an international, not-for-profit group consisting of approximately 800 companies and organizations defining standards for distributed object computing CORBA is only one of the specifications they develop. They are also behind other key object oriented standards such as UML (Unified Modeling Language). 90
  • 91. History The OMG was established in 1988 and the initial CORBA specification came out in 1992. Over the past 10 years significant revisions have taken place. Version 2.0, which defined a common protocol for specifying how implementations from different vendors can communicate, was released in the mid-nineties. The current version of CORBA is 3.0, which introduced the CORBA Component Model. 91
  • 92. Today Today, CORBA serves as middleware for a variety of large enterprise level applications. One of the most important and most frequent uses is for servers that must handle a large number of clients, at high hit rates, with high reliability. The current users of CORBA are diverse - including The Weather Channel, GNOME, US Army, CNN, and Charles Schwab. 92
  • 93. Uses of CORBA • Provides high level object oriented interface • Allows application and their objects to communicate to each other no matter where they are and or who designed them. 93
  • 94. ORB • ORB is “middle ware” based on client server model of distributed computing, CORBA inserts a “broker” between server and client The ORB : • Intercepts calls • Finds object • Invokes method • Passes parameters • Returns results or error messages 94 CLIENT SERVER/OBJECT IMPLEMENTATION
  • 95. Cont… • Broker provides basic messaging and communication between client and server, “insulating “ applications from the specifics of the system configuration • Client transparently invokes methods on server , either on same machine or across a network. 95
  • 96. Cont… • The role of CORBA and the ORB are defined in the Object Management Architecture • Included within the OMA are four object categories 96 Application objects CORBA domains CORBA facilities Object Request Broker CORBAservices
  • 97. Cont… The four categories of the OMA: • CORBA services: creation/movement of objects, queries/transactions, concurrency control, directory services • CORBA domains are ‘vertical market’ standards. For example: financial, medical, telecommunications and manufacturing • CORBA facilities include compound document and system management. Both can be applied across multiple vertical domains for added functionality • Applications: user defined and proprietary interfaces97
  • 99. Three- tier CORBA Architecture 99
  • 100. The Primary Elements • IDL – Interface Definition Language • Client / Server CORBA Objects – Abstract objects based upon a concrete implementation • ORBs – Object Request Brokers • GIOP / IIOP – General and Internet Inter-Object Protocols 100
  • 101. Interface Definition Language Defines public interface for any CORBA server. • C++ like syntax • Client and Server implemented based on compilation of the same IDL (usually) • OMG has defined mappings for: – C, C++, Java, COBOL, Smalltalk, ADA, Lisp, Python, and IDLscript 101
  • 102. CORBA vs. DCOM • DCOM supports an object-oriented model, but differs substantially from classical OO models. DCOM object provides services through one or more distinct interfaces. • DCOM is lack of polymorphism, instead, it constructs application from binary components. 102
  • 103. CORBA vs. DCOM • The major difference is CORBA is an open specification. DCOM has the potential to evolve at a faster rate than CORBA because the politics will be simpler. • CORBA can be deployed far more widely than DCOM and runs in most current OS environment, while DCOM is running almost exclusively in the Windows environment. 103
  • 104. CORBA vs. JAVA/RMI • Some overlap between these two, both provide a viable means of building distributed applications. • CORBA is concerned with interfaces between objects and applications modeled as objects, Java is primarily concerned with the implementation of these objects. 104
  • 105. CORBA vs. JAVA/RMI • JAVA/RMI systems fall short of seamless integration because of their interoperability requirements with other languages. JAVA/RMI system assumes the homogeneous environment of the JVM, which can only take advantage of Java Object Model. • Coexistence between CORBA and Java 105
  • 106. Companies Using CORBA Today • AT&T – Late 1990’s developed 20 to 40 systems using CORBA for both internal and external access – Are certain development time for future projects will be greatly reduced by building reusable frameworks with the OMG • The Weather Channel – Used CORBA and Linux – System is reliable, low maintenance, offers data logging – Cut software development time from months to weeks 106
  • 107. ONC RPC • “ONC RPC, short for Open Network Computing Remote Procedure Call, is a widely deployed remote procedure call system. ONC was originally developed by Sun Microsystems as part of their Network File System project, and is sometimes referred to as Sun ONC or Sun RPC.” http://en.wikipedia.org/wiki/Open_Network_Computing_Remote_Procedure_Call
  • 109. Client-server architecture • Client sends a request, server replies with a response – Interaction fits many applications – Naturally extends to distributed computing • Why do people like client/server architecture? – Provides fault isolation between modules – Scalable performance (multiple servers) – Central server: • Easy to manage • Easy to program
  • 110. Remote procedure call • A remote procedure call makes a call to a remote service look like a local call – RPC makes transparent whether server is local or remote – RPC allows applications to become distributed transparently – RPC makes architecture of remote machine transparent
  • 111. Developing with RPC 1. Define APIs between modules • Split application based on function, ease of development, and ease of maintenance • Don’t worry whether modules run locally or remotely 2. Decide what runs locally and remotely • Decision may even be at run-time 3. Make APIs bullet proof • Deal with partial failures
  • 112. Stubs: obtaining transparency • Compiler generates from API stubs for a procedure on the client and server • Client stub – Marshals arguments into machine-independent format – Sends request to server – Waits for response – Unmarshals result and returns to caller • Server stub – Unmarshals arguments and builds stack frame – Calls procedure – Server stub marshalls results and sends reply
  • 113. RPC vs. LPC • 4 properties of distributed computing that make achieving transparency difficult: – Partial failures – Concurrency – Latency – Memory access
  • 114. Partial failures • In local computing: – if machine fails, application fails • In distributed computing: – if a machine fails, part of application fails – one cannot tell the difference between a machine failure and network failure • How to make partial failures transparent to client?
  • 115. Simple Object Access Protocol • SOAP is a lightweight protocol for exchange of information in a decentralized, distributed environment. It is an XML based protocol that consists of three parts: an envelope that defines a framework for describing what is in a message and how to process it, a set of encoding rules for expressing instances of application-defined datatypes, and a convention for representing remote procedure calls and responses. SOAP can potentially be used in combination with a variety of other protocols; however, the only bindings defined in this document describe how to use SOAP in combination with HTTP and HTTP Extension Framework. • http://www.w3.org/TR/2000/NOTE-SOAP-20000508/
  • 116. Historical Perspective - MPPs • Compare clusters to the Massively Parallel Processors of the 1990’s • Many separate nodes, each with its own private memory –hundreds or thousands of nodes (e.g., Cray T3E, nCube) – Manufactured as a single computer with a proprietary OS, very fast communication network. – Designed to run large, compute-intensive parallel applications – Expensive, long time-to-market cycle
  • 117. Historical Perspective - NOWs • Networks of Workstations • Designed to harvest idle workstation cycles to support compute-intensive applications. • Advocates contended that if done properly, you could get the power of an MPP at minimal additional cost. • Supported general-purpose processing and parallel applications
  • 118. Other Grid Resources • The Globus Alliance: “a community of organizations and individuals developing fundamental technologies behind the "Grid," which lets people share computing power, databases, instruments, and other on-line tools securely across corporate, institutional, and geographic boundaries without sacrificing local autonomy” • Grid Computing Info Center: “aims to promote the development and advancement of technologies that provide seamless and scalable access to wide-area distributed resources”
  • 119. Summary • Definitions of distributed systems and comparisons to centralized systems. • The characteristics of distributed systems. • The eight forms of transparency. • The basic design issues. 119
  • 121. Classification [2] • Based on system architecture – Client – Server model – Peer – Peer model • Based on communication network – Bus – Switched • Based on level of coupling – Tightly coupled (parallel) – Loosely coupled (distributed)
  • 122. Based on System Architecture : Client Server Model One server acts as the principal control agent Several nodes report to the server Advantages:  Better control and security  Concentration of functions in high performance servers Disadvantages:  Not robust due to lack of redundancy  Performance suffers if the number of clients increases Examples:  Workstation – Server Model  Processor Pool Model
  • 123. Based on System Architecture : Workstation – Server Model • Many workstations connect to the network. • Workstations provide local processing and an interface to the network. • Consist of one or more client workstations connected to one or more server workstations using a communication network. • Mainly used for resource sharing
  • 124. Based on System Architecture : Processor Pool Model • All the processing is moved to a pool of processors • No concept of a home machine • Workstations are dummy terminals with good graphical display • Terminals have minimum intelligence like remote booting, remote mounting of file systems, virtual terminal handling and packet assembly and disassembly services
  • 125. Based on System Architecture : Peer – Peer Model • All the nodes in the network have equal privilege • No special routing server required. The nodes themselves take care of routing the data • Peers – both suppliers and consumers • As the number of nodes increases, the bandwidth increases • Reduces single point failures • It is less secure • Usually used for sharing of resources – files, audio - visual media
  • 126. Based on Communication Network : Bus – Based Interconnection Usually used in Point – Point connection systems System connected by computer bus The access to communication media is time shared IEEE 802 LAN Standard  Ethernet, Token Bus, Token Ring, Fiber Distributed data Interface (FDDI), Fiber Queue Dual Buses (FQDB)
  • 127. Based on Communication Network : Switch – Based Interconnection • Usually used in multi point connection systems • Systems connected by network switches • The access to communication media is both time and space shared – but cost equally higher than bus • Private switches – Crossbar, multistage switch • Public switch systems – Integrated Services Digital Network (ISDN), Asynchronous Transfer Mode (ATM • Switches in public networks also perform routing
  • 128. Based on Level of Coupling : Loosely Coupled Systems Each processor has its own memory Runs its own OS Do not communicate frequently Can be placed in geographically separate regions Also called distributed computing
  • 129. Based on Level of Coupling : Tightly Coupled Systems • Processors share a common memory • Run on a single OS • Communicate very frequently • Usually connected through high speed connection methods • Also called parallel computing
  • 130. Level of Coupling Microprocessors Clusters LAN Global Internet Small Fast Large Slow More Tightly Coupled More Loosely Coupled Closer in physical proximity Farther in physical proximity
  • 131. Grid Computing [3] • Complete nodes connected by a conventional network interface like Ethernet. • Not tightly coupled. Can be geographically diverse. • The communication is not high speed - works fine in environments that require less communication. • A single task is adequately parallelized and each part is given to a different node that computes it independently - so no concurrency issues involved.
  • 133. What is Cloud Computing [4] Parallel and distributed system consisting of a collection of inter-connected and virtualized computers Presented to the user as a single computer Services provided:  Software as service  Platform as service  Infrastructure as service Advantages  Speed of Operation  Power saving  Abstraction  Virtualization
  • 134. Folding@Home [6] • Grid computing project designed to perform computationally intensive simulations of protein folding and other molecular dynamics • The most powerful distributed computing cluster in the world – Guinness 2007 • Primary contributors – thousands of everyday personal computers • Processes run in the background utilizing cpu idle time • In late March 2011 Folding@home briefly peaked above the 7 native petaFLOP barrier.
  • 135. Windows Azure Platform [7] On demand platform used to build, host and scale web applications through windows datacenter. Platform as a service Build, host and maintain web applications running on Microsoft Datacenter OS – Windows Azure Services  Live Services  SQL Azure  AppFabric  SharePoint Services  Dynamic CRM Services
  • 136. CSS434 System Models 136 Platforms • Minicomputer model • Workstation model • Workstation-server model • Processor-pool model • Cluster model • Grid computing
  • 137. CSS434 System Models 137 Minicomputer Model • Extension of Time sharing system – User must log on his/her home minicomputer. – Thereafter, he/she can log on a remote machine by telnet. • Resource sharing – Database – High-performance devices Mini- computer Mini- computer Mini- computer ARPA net
  • 138. CSS434 System Models 138 Workstation Model • Process migration – Users first log on his/her personal workstation. – If there are idle remote workstations, a heavy job may migrate to one of them. • Problems: – How to find an idle workstation – How to migrate a job – What if a user log on the remote machine 100Mbps LAN Workstation Workstation Workstation Workstation Workstation
  • 139. CSS434 System Models 139 Workstation-Server Model • Client workstations – Diskless – Graphic/interactive applications processed in local – All file, print, http and even cycle computation requests are sent to servers. • Server minicomputers – Each minicomputer is dedicated to one or more different types of services. • Client-Server model of communication – RPC (Remote Procedure Call) – RMI (Remote Method Invocation) • A Client process calls a server process’ function. • No process migration invoked • Example: NFS 100Gbps LAN Workstation Workstation Workstation Mini- Computer file server Mini- Computer http server Mini- Computer cycle server
  • 140. CSS434 System Models 140 Processor-Pool Model • Clients: – They log in one of terminals (diskless workstations or X terminals) – All services are dispatched to servers. • Servers: – Necessary number of processors are allocated to each user from the pool. • Better utilization but less interactivity Server 1 100Mbps LAN Server N
  • 141. CSS434 System Models 141 Cluster Model • Client – Takes a client-server model • Server – Consists of many PC/workstations connected to a high-speed network. – Puts more focus on performance: serves for requests in parallel. 100Mbps LAN Workstation Workstation Workstation Master node Slave 1 Slave N Slave 2 1Gbps SAN http server1 http server2 http server N
  • 142. CSS434 System Models 142 High-speed Information high way Grid Computing • Goal – Collect computing power of supercomputers and clusters sparsely located over the nation and make it available as if it were the electric grid • Distributed Supercomputing – Very large problems needing lots of CPU, memory, etc. • High-Throughput Computing – Harnessing many idle resources • On-Demand Computing – Remote resources integrated with local computation • Data-intensive Computing – Using distributed data • Collaborative Computing – Support communication among multiple parties Super- computer Cluster Super- computer Cluster Mini- computer Workstation Workstation Workstation
  • 143. CSS434 System Models 143 Middleware Models Middleware Models Platforms Client-server model Workstation-server model Services provided by multiple servers Cluster model Proxy servers and caches ISP server Cluster model Peer processes Workstation model Mobile code and agents Workstation model Workstation-server model Thin clients Processor-pool model Cluster model
  • 144. CSS434 System Models 144 Client-Server Model Server Client Client invocation result Server invocation result Process: Key: Computer: 100Gbps LAN Workstation Workstation Workstation Mini- Computer file server Mini- Computer http server Mini- Computer cycle server HTTP server File server DNS server
  • 145. CSS434 System Models 145 Services Provided by Multiple Servers Server Server Server Service Client Client Ex. altavista.digital.com DB server Replication • Availability • Performance 100Gbps LAN Workstation Workstation Workstation Master node Slave 1 Slave N Slave 2 1Gbps SAN
  • 146. CSS434 System Models 146 Proxy Servers and Caches Client Proxy Web server Web server server Client Ex. Internet Service Provider 100Gbps LAN Workstation Workstation Workstation Master node Slave 1 Slave N Slave 2 1Gbps SAN
  • 147. CSS434 System Models 147 Peer Processes Coordination Application code Coordination Application code Coordination Application code 100Gbps LAN Workstation Workstation Workstation Workstation Workstation Distributed whiteboard application
  • 148. CSS434 System Models 148 Mobile Code and Agents a) client request results in the dow nloading of applet code Web server Client Web server Applet Applet code Client b) client interacts with the applet 100Gbps LAN Workstation Workstation Workstation Mini- Computer file server Mini- Computer http server Mini- Computer cycle server
  • 149. CSS434 System Models 149 Network Computers and Thin Clients Thin Client Application Process Network computer or PC Compute server network Server 1 100Gbps LAN Server N 100Gbps LAN Workstation Workstation Workstation Master node Slave 1 Slave N Slave 2 1Gbps SAN X11 Diskless workstations
  • 150. CSS434 System Models 150 Reasons for Distributed Computing Systems • Inherently distributed applications – Distributed DB, worldwide airline reservation, banking system • Information sharing among distributed users – CSCW or groupware • Resource sharing – Sharing DB/expensive hardware and controlling remote lab. devices • Better cost-performance ratio / Performance – Emergence of Gbit network and high-speed/cheap MPUs – Effective for coarse-grained or embarrassingly parallel applications • Reliability – Non-stopping (availability) and voting features. • Scalability – Loosely coupled connection and hot plug-in • Flexibility – Reconfigure the system to meet users’ requirements
  • 151. CSS434 System Models 151 Network v.s. Distributed Operating Systems Features Network OS Distributed OS SSI (Single System Image) NO Ssh, sftp, no view of remote memory YES Process migration, NFS, DSM (Distr. Shared memory) Autonomy High Local OS at each computer No global job coordination Low A single system-wide OS Global job coordination Fault Tolerance Unavailability grows as faulty machines increase. Unavailability remains little even if fault machines increase.
  • 153. Contents • Data Transmission Circuits • Data Communications – Parallel Data Transmission – Serial Data Transmission • Asynchronous Serial Transmission • Synchronous Serial Transmission • Data Multiplexing & Modems • Networks & Topologies (bus, star and ring) • Cabling (coaxial, UTP, fiber optic) • Media Access Methods (CSMA/CD, CSMA/CA, Token Passing) • LAN Architectures (Ethernet, Token Ring) • Networking Devices • OSI Model. OSI layer functions. OSI versus TCP/IP
  • 154. Data Transmission • Data transmission is the transfer of data from point-to-point often represented as an electromagnetic signal over a physical point-to- point or point-to-multipoint communication channel • A communication channel refers to the medium used to convey information from a sender (or transmitter) to a receiver, and it can use fully or partially the medium. • Examples of channels: copper wires, optical fibbers or wireless communication channels.
  • 155. Data Communication Channels • The following is a discussion on the THREE main types of transmission circuits (channels), simplex, half duplex and full duplex. • Simplex – Data in a simplex channel is always one way. Simplex channels are not often used because it is not possible to send back error or control signals to the transmit end. An example of a simplex channel in a computer system is the interface between the keyboard and the computer, in that key codes need only be sent one way from the keyboard to the computer system. • Half Duplex – A half duplex channel can send and receive, but not at the same time. Its like a one-lane bridge where two way traffic must give way in order to cross. Only one end transmits at a time, the other end receives. • Full Duplex – Data can travel in both directions simultaneously. There is no need to switch from transmit to receive mode like in half duplex. Its like a two lane bridge on a two-lane highway.
  • 156. Parallel and Serial Data • Parallel transmission (e.g. 8 bits) – Each bit uses a separate wire – To transfer data on a parallel link, a separate line is used as a clock signal. This serves to inform the receiver when data is available. In addition, another line may be used by the receiver to inform the sender that the data has been used, and its ready for the next data.
  • 157. Parallel and Serial Data • Serial (e.g. 8 bits) – Each bit is sent over a single wire, one after the other – Usually no signal lines are used to convey clock (timing information) – There are two types of serial transmission, essentially having to do with how the clock is embedded into the serial data • Asynchronous serial transmission • Synchronous serial transmission • If no clock information was sent, the receiver would misinterpret the arriving data (due to bits being lost, going too slow). • Parallel transmission is obviously faster, in that all bits are sent at the same time, whereas serial transmission is slower, because only one bit can be sent at a time. Parallel transmission is very costly for anything except short links.
  • 158. Asynchronous Serial Transmission (RS232 Example) • Because no signal lines are used to convey clock (timing) information, this method groups data together into a sequence of bits (five to eight), then prefixes them with a start bit and a stop bit. This is the method most widely used for PC or simple terminal serial communications. • In asynchronous serial communication, the electrical interface is held in the mark position between characters. The start of transmission of a character is signaled by a drop in signal level to the space level. At this point, the receiver starts its clock. After one bit time (the start bit) come 8 bits of true data followed by one or more stop bits at the mark level. • The receiver tries to sample the signal in the middle of each bit time. The byte will be read correctly if the line is still in the intended state when the last stop bit is read. • Thus the transmitter and receiver only have to have approximately the same clock rate. A little arithmetic will show that for a 10 bit sequence, the last bit will be interpreted correctly even if the sender and receiver clocks differ by as much as 5%. • It is relatively simple, and therefore inexpensive. However, it has a high overhead, in that each byte carries at least two extra bits: a 20% loss of line bandwidth.
  • 159. Synchronous Serial Transmission (PS2 Example) • The PS/2 mouse and keyboard implement a bidirectional synchronous serial protocol. • The bus is "idle" when both lines are high (open-collector). This is the only state where the keyboard/mouse is allowed begin transmitting data. The host has ultimate control over the bus and may inhibit communication at any time by pulling the Clock line low. • The device (slave) always generates the clock signal. If the host wants to send data, it must first inhibit communication from the device by pulling Clock low. The host then pulls Data low and releases Clock. This is the "Request-to-Send" state and signals the device to start generating clock pulses. – Summary: Bus States Data = high, Clock = high: Idle state. Data = high, Clock = low: Communication Inhibited. Data = low, Clock = high: Host Request-to-Send Data is transmited 1 byte at a time: •1 start bit. This is always 0. •8 data bits, least significant bit first. •1 parity bit (odd parity - The number of 1's in the data bits plus the parity bit always add up to an odd number. This is used for error detection.). •1 stop bit. This is always 1. •1 acknowledge bit (host-to-device communication only)
  • 160. Serial Communication Name Sync /Async Type Duplex Max devices Max speed (Kbps) Max distance (feet) Pin count (not including ground) RS-232 async peer full 2 115.2 30 2 (or 4 with HW handshake) RS-422 async multi-drop half 10 10000 4,000 1 (unidirectional only, additional pins for each bidirectional comm.) RS-485 async multi-point half 32 10000 4,000 2 I2C sync multi- master half Limitation based on bus capacitance and bit rate 3400 <10 2 SPI sync multi- master full Limitation based on bus capacitance and bit rate >1000 <10 3+1(Additional pins needed for every slave if slave count is more than one) Microwire sync master/slave full Limitation based on bus capacitance and bit rate >625 <10 3+1(Additional pins needed for every slave if slave count is more than one) 1-Wire async master/slave half Limitation based on bus capacitance and bit rate 16 1,000 1
  • 161. Data Communication Terminology • Channel – A channel is a portion of the communications medium allocated to the sender and receiver for conveying information between them. The communications medium is often subdivided into a number of separate paths, each of which is used by a sender and receiver for communication purposes. • Baud Rate – Baud rate is the same as symbol rate and is a measure of the number of line changes which occur every second. Each symbol can represent or convey one (binary encoded signal) or several bits of data. For a binary signal of 20Hz, this is equivalent to 20 baud (there are 20 changes per second). • Bits Per Second – This is an expression of the number of data bits per second. Where a binary signal is being used, this is the same as the baud rate. When the signal is changed to another form, it will not be equal to the baud rate, as each line change can represent more than one bit (either two or four bits). • Bandwidth – Bandwidth is the frequency range of a channel, measured as the difference between the highest and lowest frequencies that the channel supports. The maximum transmission speed is dependant upon the available bandwidth. The larger the bandwidth, the higher the transmission speed.
  • 162. Data Multiplexing • A multiplexer is a device which shares a communication link between a number of devices (users). • Rather than provide a separate circuit for each device, the multiplexer combines each low speed circuit onto a single high speed link. The cost of the single high speed link is less than the required number of low speed links. • It does this by time or frequency division.
  • 163. Time Division Multiplexing • In time division, the communications link is subdivided in terms of time. • Each sub-circuit is given the channel for a limited amount of time, before it is switched over to the next user, and so on • In the picture bellow it can be seen that each sub-channel occupies the entire bandwidth of the channel, but only for a portion of the time
  • 164. Frequency Division Multiplexing • In frequency division multiplexing, each sub-channel is separated by frequency (each sub-channel is allocated part of the bandwidth of the main channel) • The speed or bandwidth of the main link is the sum of the individual sub-channel speeds or bandwidth.
  • 165. Modems • Modems are devices which allow digital data signals to be transmitted across an analogue link. • Modem stands for modulator/demodulator. A modem changes the digital signal to an analogue frequency, and sends this tone across the analogue link. At the other end, another modem receives the signal and converts it back to digital.
  • 166. Modulation Techniques • Modulation techniques are methods used to encode digital information in an analogue world. • There are three basic modulation techniques – AM (amplitude modulation) – FM (frequency modulation) – PM (phase modulation) • All 3 modulation techniques employ a carrier signal. A carrier signal is a single frequency that is used to carry the intelligence (data). – For digital, the intelligence is either a 1 or 0. – When we modulate the carrier , we are changing its characteristics to correspond to either a 1 or 0.
  • 167. Amplitude Modulation • Modifies the amplitude of the carrier to represent 1s or 0s – a 1 is represented by the presence of the carrier for a predefined period of 3 cycles of carrier. – Absence or no carrier indicates a 0 • Pros – Simple to design and implement • Cons – Noise spikes on transmission medium interfere with the carrier signal. – Loss of connection is read as 0s.
  • 168. Frequency Modulation • Modifies the frequency of the carrier to represent the 1s or 0s. – a 0 is represented by the original carrier frequency – a 1 by a much higher frequency ( the cycles are spaced closer together) • Pros – Immunity to noise on transmission medium. – Always a signal present. Loss of signal easily detected • Cons – Requires 2 frequencies – Detection circuit needs to recognize both frequencies when signal is lost.
  • 169. Phase Modulation • Phase Modulation modifies the phase of the carrier to represent a 1 or 0. – The carrier phase is switched at every occurrence of a 1 bit but remains unaffected for a 0 bit. – The phase of the signal is measured relative to the phase of the preceding bit. The bits are timed to coincide with a specific number of carrier cycles (3 in this example = 1 bit) • Pros – Only 1 frequency used – Easy to detect loss of carrier • Cons – Complex circuitry required to generate and detect phase changes
  • 170. What is a network • A network as a "group of computers and associated devices that are connected by communications facilities." • A network provides two principle benefits: the ability to communicate and the ability to share. – A network supports communication among users in ways that other media cannot. – Sharing involves not only information (database records, e-mail, graphics, etc.), but also resources (applications, printers, modems, disk space, scanners, etc.) Through its ability to share, a network promotes collaboration • A network can consist of two computers connected together on a desk or it can consist of many Local Area Networks (LANs) connected together to form a Wide Area Network (WAN) across a continent.
  • 171. Network Classifications • Scope – Local area network (LAN) – Metropolitan area (MAN) – Wide area network (WAN) • Ownership – Closed versus open • Topology (configuration) – Bus (Ethernet) – Star (Wireless networks with central Access Point) – Ring
  • 172. Network Topologies • A topology refers to the manner in which the cable is run to individual workstations on the network. – the configurations formed by the connections between devices on a local area network (LAN) or between two or more LANs • There are three basic network topologies (not counting variations thereon): the bus, the star, and the ring. • It is important to make a distinction between a topology and an architecture. – A topology is concerned with the physical arrangement of the network components. – In contrast, an architecture addresses the components themselves and how a system is structured (cable access methods, lower level protocols, topology, etc.). An example of an architecture is 10baseT Ethernet which typically uses the star topology.
  • 173. Bus Topology • A bus topology connects each computer (node) to a single segment trunk. – A ‘trunk’ is a communication line, typically coax cable, that is referred to as the ‘bus.’ The signal travels from one end of the bus to the other. – A terminator is required at each end to absorb the signal so it does not reflect back across the bus. • In a bus topology, signals are broadcast to all stations. Each computer checks the address on the signal (data frame) as it passes along the bus. If the signal’s address matches that of the computer, the computer processes the signal. If the address doesn’t match, the computer takes no action and the signal travels on down the bus. • Only one computer can ‘talk’ on a network at a time. A media access method (protocol) called CSMA/CD is used to handle the collisions that occur when two signals are placed on the wire at the same time. • The bus topology is passive. In other words, the computers on the bus simply ‘listen’ for a signal; they are not responsible for moving the signal along. • A bus topology is normally implemented with coaxial cable.
  • 174. Bus Topology • Advantages of bus topology: – Easy to implement and extend – Well suited for temporary networks that must be set up in a hurry – Typically the cheapest topology to implement – Failure of one station does not affect others • Disadvantages of bus topology: – Difficult to administer/troubleshoot – Limited cable length and number of stations – A cable break can disable the entire network; no redundancy – Maintenance costs may be higher in the long run – Performance degrades as additional computers are added
  • 175. Star Topology • All of the stations in a star topology are connected to a central unit called a hub. – The hub offers a common connection for all stations on the network. Each station has its own direct cable connection to the hub. In most cases, this means more cable is required than for a bus topology. However, this makes adding or moving computers a relatively easy task; simply plug them into a cable outlet on the wall. • If a cable is cut, it only affects the computer that was attached to it. This eliminates the single point of failure problem associated with the bus topology. (Unless, of course, the hub itself goes down.) • Star topologies are normally implemented using twisted pair cable, specifically unshielded twisted pair (UTP). The star topology is probably the most common form of network topology currently in use.
  • 176. Star Topology • Advantages of star topology: – Easy to add new stations – Easy to monitor and troubleshoot – Can accommodate different wiring • Disadvantages of star topology: – Failure of hub cripples attached stations – More cable required (more expensive to wire a building for networking)
  • 177. Ring Topology • A ring topology consists of a set of stations connected serially by cable. In other words, it’s a circle or ring of computers. There are no terminated ends to the cable; the signal travels around the circle in a clockwise (or anticlockwise) direction. • Note that while this topology functions logically as ring, it is physically wired as a star. The central connector is not called a hub but a Multistation Access Unit or MAU. (Don’t confuse a Token Ring MAU with a ‘Media Adapter Unit’ which is actually a transceiver.) • Under the ring concept, a signal is transferred sequentially via a "token" from one station to the next. When a station wants to transmit, it "grabs" the token, attaches data and an address to it, and then sends it around the ring. The token travels along the ring until it reaches the destination address. The receiving computer acknowledges receipt with a return message to the sender. The sender then releases the token for use by another computer. • Each station on the ring has equal access but only one station can talk at a time.
  • 178. Ring Topology • In contrast to the ‘passive’ topology of the bus, the ring employs an ‘active’ topology. Each station repeats or ’boosts’ the signal before passing it on to the next station. • Rings are normally implemented using twisted pair or fiber-optic cable • Advantages of ring topology: – Growth of system has minimal impact on performance – All stations have equal access • Disadvantages of ring topology: – Most expensive topology – Failure of one computer may impact others – Complex
  • 179. Choosing a Topology • The following factors should be considered when choosing a topology: – Installation – Maintenance and troubleshooting – Expected growth – Distances – Infrastructure – Existing network • As a general rule, a bus topology is the cheapest to install, but may be more expensive to maintain because it does not provide for redundancy. • Various topologies can be mixed on the same network. • One very common example is a large Ethernet network with multiple hubs. Usually the hubs are located on different floors in a building or perhaps outside in another building. Each hub is wired in the typical star configuration. However, the hubs are connected together along a bus, typically referred to as a ‘backbone.’ • The backbone between hubs might consist of fiber optic cable while the workstations are wired to each individual hub with UTP (unshielded twisted pair) cable.
  • 180. Cabling • Coaxial Cable – Thinnet looks like regular TV cable. It is about 1/4 inch in diameter and is very flexible and easy to work with. – Thicknet is about 1/2 inch in diameter and not very flexible. Thicknet is older and not very common anymore except as a backbone within and between buildings. Coax transmits at 10 Mbps.. • Twisted Pair. Twisted pair looks like telephone wire and consists of insulated strands of copper wire twisted together. There are two versions of twisted pair cable: – Shielded Twisted Pair (STP). STP is commonly used in Token Ring networks – Unshielded Twisted Pair (UTP). UTP is used in Ethernet networks. Transmission rates vary between 10-100-1000-10000 Mbps. • Fiber-Optic Cable. Fiber-optic cable consists of a thin cylinder of glass surrounded by glass cladding, encased in protective outer sheath. Fiber-optic cable is very fast (over 1Gbps). It can transmit over long distances (2 km +) but is expensive.
  • 181. Cabling • Top: Unshielded Twisted Pair and Shielded Twisted Pair Cable • Bottom: Coaxial and Optical Fiber Cable
  • 182. Media Access Methods • A media access method refers to the manner in which a computer gains and controls access to the network’s physical medium (e.g., cable). • Common media access methods include the following: – CSMA/CD – CSMA/CA – Token Passing • One of the primary concerns with media access is how to prevent packets from colliding when two or more computers try to transmit simultaneously. Each of the methods listed above takes a different approach to this problem. • Data transmitted over a network is sent one bit at a time. A bit is either a 1 or a 0 represented by a voltage change (on or off) or a light pulse. If two stations are transmitting at the same time, it is possible that the signals may overlap, resulting in garbled data. Such overlapping is referred to as a "collision."
  • 183. CSMA/CD • CSMA/CD stands for Carrier-Sense Multiple Access with Collision Detection. It is a media access method which means it defines how the network places data on the cable and how it takes it off. • CSMA/CD specifies how bus topologies such as Ethernet handle transmission collisions. A collision occurs when two or more computers transmit signals at the same time. – "Carrier Sense" means that each station on the LAN continually listens to (tests) the cable for the presence of a signal prior to transmitting. – "Multiple Access" means that there are many computers attempting to transmit and compete for the opportunity to send data (i.e., they are in contention). – "Collision Detection" means that when a collision is detected, the stations will stop transmitting and wait a random length of time before retransmitting. • CSMA/CD works best in an environment where relatively fewer, longer data frames are transmitted. This is in contrast to token passing which works best with a relatively large amount of short data frames. • Because CSMA/CD works to control or manage collisions rather than prevent them, network performance can be degraded with heavy traffic. The greater the traffic, the greater the number of collisions and retransmissions. • CSMA/CD is used on Ethernet networks.
  • 184. CSMA/CD Operation • In its most simple form it operates as follows: – A station that wishes to transmit on the network checks to see if the cable is free. – If the cable is free, the station starts transmitting. – However, another station may have detected a free cable at the same instant and also start transmitting. The result is a "collision." – Once the collision is detected, all stations immediately stop transmitting. – Stations then wait a random length of time before checking the cable and then retransmit
  • 185. CSMA/CA • CSMA/CA stands for Carrier-Sense Multiple Access with Collision Avoidance and is a media access method very similar to CSMA/CD. • The difference is that the CD (collision detection) is changed to CA (collision avoidance). Instead of detecting and reacting to collisions, CSMA/CA tries to avoid them by having each computer signal its intention to transmit before actually transmitting. In effect, the transmitting computer gives a 'heads up' prior to transmitting. • Although CSMA/CA can prevent collisions, it comes with a cost in the form of the additional overhead incurred by having each workstation broadcast it's intention prior to transmitting. Thus, CSMA/CA is slower than CSMA/CD. • CSMA/CA is used on Apple networks and on WiFi (IEEE 802.11) networks.
  • 186. Token Passing • Token passing is a media access method by which collisions are prevented. • Collisions are eliminated under token passing because only a computer that possesses a free token (a small data frame) is allowed to transmit. The token passing method also allows different priorities to be assigned to different stations on the ring. Transmissions from a stations with higher priority take precedence over stations with lower priority. • Token passing works best in an environment where a relatively large number of shorter data frames are being transmitted. (As opposed to CSMA/CD which works best in an environment where relatively fewer, longer data frames are being transmitted.) • Token passing is used on Token Ring networks
  • 187. Token Passing Operation • In its most simple form it operates as follows: – A station that wishes to transmit on the network waits until it will receive a free token. – The sending station transmits its data with the token. – The data travels to the recipient without stopping at other stations (it is just relayed). – The receiving station receives the data and returns the token to the sender as an acknowledgment. – The sender receives acknowledgment and releases the token to next station. – The token continues being passed along the ring until it is “seized" by the next station that wants to transmit.
  • 188. LAN Architectures • Network architecture refers to the manner in which the hardware and software is structured. The architecture includes the cable access method (transmission), topology, and lower level protocols. • The most common type of LAN architecture is Ethernet. Token Ring was also used in the past. • These architectures are sometimes referred to as "lower-level protocols" because they represent the specifications for the IEEE802 model which encompasses the physical (1st) and data link (2nd) layers of the OSI model (to be discussed latter)
  • 189. Ethernet • Ethernet is a popular, relatively inexpensive, easy-to-install LAN architecture with the following characteristics: – Uses the CSMA/CD media access control. – Data transmission normally occurs at 100 Mbps (10Mbps in the early forms and 10Gbps in the most recent forms). – Typically implemented in a star topology (early versions used bus topology as well). – Ethernet LANs are normally distinguished by the type of cable they use Twisted Pair (Thinnet or Thicknet were also used in the past). • The Ethernet architecture conforms to most but not all of the IEEE 802.3 specification (the physical layers are identical but the MAC layers are somewhat different). • An Ethernet LAN is often described in terms of three parameters: transmission rate, transmission type, and segment distance or cable type. – "100baseT" means: • 100 - transmission rate or through put of 100Mbps • base - transmission type is baseband rather than broadband network (i.e., the signal is placed directly on the cable, one signal at a time) • T – the cable type (e.g. Twisted pair) • Few types of Ethernet: 10Base2, 10Base5, 10BaseT and 10BaseF, 100BaseT, 100BaseF, etc..
  • 190. Token Ring • Token ring is a relatively expensive LAN architecture that was strongly influenced by IBM. It is very stable and can be expanded without a significant degradation in network performance. • Token ring uses the token passing media access control. Data transmission normally occurs at 4 or 16 Mbps depending on the cable. • Token ring is normally implemented in a logical ring/physical star topology with a MAU (Multistation Access Unit) as the hub. The maximum number of stations on one ring is 260 for shielded twisted pair and 72 for unshielded twisted pair (UTP). There can be up to 33 MAUs per ring. • Token Ring LANs normally use shielded twisted pair (STP) but may also use unshielded twisted pair (UTP) or fiber-optic cable. The maximum distance to the MAU from the workstation depends on the cable and varies from 45 meters for UTP to 100 meters for STP. • The Token Ring architecture conforms generally to the IEEE’s 802.5 specification
  • 191. Ethernet vs. Token Ring • Ethernet is generally less expensive and easier to install than Token Ring. • Token Ring is generally more secure and more stable than Ethernet, but not used anymore in typical LAN configurations. • It is usually more difficult to add more computers on a Token Ring LAN than it is to an Ethernet LAN. However, as additional computers are added, performance degradation will be less pronounced on the Token Ring LAN than it will be on the Ethernet LAN. • Ethernet uses CSMA/CD media access control and Token Ring uses token passing. This makes Ethernet better suited in a situation where there are a large number of computers sending fewer, larger data frames. Token Ring is better suited for small to medium size LANs sending many, smaller data frames.
  • 192. 4-192 Connecting Networks • Repeater: Extends a network • Bridge: Connects two compatible networks, doesn’t necessarily pass all the messages across the connection • Switch: Connect several compatible networks, allowing it to connect several busses rather than two.
  • 193. Building a large bus network from smaller ones
  • 194. Connecting Networks • When networks are connected via repeaters, bridges or switches, the result is a single large network. • The entire system operates in the same way as the original smaller networks • Sometimes the networks to be connected have incompatible characteristics (e.g. WiFi network to be connected with Ethernet network, etc..). • When building networks of networks, the system is known as internet (note the small “i”, term that is distinct from the Internet – which refers to a particular world wide internet). • Router: Connects two incompatible networks resulting in a network of networks - internet
  • 195. Routers connecting two WiFi networks and an Ethernet network to form an internet
  • 196. Routers and internet addressing • Routers purpose is to route (forward messages) in their proper directions. • The forwarding process is based on an internet wide addressing system which all the machines in the internet (including the machines in the original networks as well as the routers) are assigned unique addresses. – Thus each machine in an internet has two addresses: its original local address within its own network and the internet address • A machine wanting to send a message to a machine in a distant network, it will attach the internet address of the destination and will direct the message to its local router. From there it is forwarded to the proper direction (based on a forwarding table maintained by the router).
  • 197. Client and Server • The terms "client" and "server" are used to describe individual computers that are part of a network where computing resources and workload are shared. • A server is a computer that makes its resources available to the network and responds to the commands of a client. The server’s shared resources can be files (a file server); printers (a print server); processing power (an application server); etc… • A client is a computer that uses the resources made available by a server. The client must have sufficient processing power on its own to run applications that interact with the resources on the server. • It is possible, and quite common, for an individual computer to function as both a client and a server. – For example, if Bill queries a SQL Server database from his workstation for the data he needs to create an Excel spreadsheet, then his workstation is functioning as a client. However, if Sue then connects to Bill’s workstation from her computer and copies the spreadsheet, then Bill’s workstation is functioning as a server.
  • 198. ISO/OSI Model • The International Standards Organization (ISO) Open Systems Interconnect (OSI) is a standard set of rules describing the transfer of data between each layer in a network operating system. Each layer has a specific function (i.e. the physical layer deals with the electrical and cable specifications) • The OSI Model clearly defines the interfaces between each layer. This allows different network operating systems and protocols to work together by having each manufacturer adhere to the standard interfaces. The application of the ISO OSI model has allowed the modern networks that exist today. There are seven layers in the OSI model.
  • 199. OSI Model • The Physical Layer – Establishes the physical characteristics of the network (e.g., the type of cable, connectors, length of cable, etc.) – Defines the electrical characteristics of the signals used to transmit the data (e.g. signal voltage swing, duration of voltages, etc.) – Transmits the binary data (bits) as electrical or optical signals depending on the medium. • The Data Link Layer – Defines how the signal will be placed on or taken off the NIC. The data frames are broken down into individual bits that can be translated into electric signals and sent over the network. On the receiving side, the bits are reassembled into frames for processing by upper levels. – Error detection and correction is also performed at the data link layer. If an acknowledgement is expected and not received, the frame will be resent. Corrupt data is also identified at the data link layer. – Because the Data-Link Layer is very complex, it is sometimes divided into sublayers (as defined by the IEEE 802 model). The lower sublayer provides network access. The upper sublayer is concerned with sending and receiving packets and error checking.
  • 200. OSI Model • The Network Layer – Primarily concerned with addressing and routing. Logical addresses (e.g., an IP address) are translated into physical addresses (i.e., the MAC address) for transmission at the network layer. On the receiving side, the translation process is reversed. – It is at the network layer where the route from the source to destination computer is determined. Routes are determined based on packet addresses and network conditions. Traffic control measures are also implemented at the network layer. • The Transport Layer – On the sending side, messages are packaged for efficient transmission and assigned a tracking number so they can be reassembled in proper order. On the receiving side, the packets are reassembled, checked for errors and acknowledged. – Performs error handling in that it ensures all data is received in the proper sequence and without errors. If there are errors, the data is retransmitted.
  • 201. OSI Model • The Session Layer – Is responsible for establishing, maintaining, and terminating a connection called a 'session'. – A session is an exchange of messages between computers (a dialog). Managing the session involves synchronization of user tasks and dialog control (e.g., who transmits and for how long). Synchronization involves the use of checkpoints in the data stream. In the event of a failure, only the data from the last checkpoint has to be resent. – Logon, name recognition and security functions take place at the Session Layer. • The Presentation Layer – It is responsible for data translation (formatting), compression, and encryption. – The Presentation Layer is primarily concerned with translation; interpreting and converting the data from various formats. For example, EBCIDIC characters might be converted into ASCII. It is also where data is compressed for transmission and uncompressed on receipt. Encryption techniques are implemented at the Presentation Layer. – The redirector operates at the presentation layer by redirecting I/O operations across the network. • The Application Layer – Provides the operating system with direct access to network services. – It serves as the interface between the user and the network by providing services that directly support user applications.
  • 203. OSI Model • Each layer may add a Header and a Trailer to its Data (which consists of the next higher layer's Header, Trailer and Data as it moves through the layers). The Headers contain information that specifically addresses layer-to-layer communication. For example, the Transport Header (TH) contains information that only the Transport layer sees. All other layers below the Transport layer pass the Transport Header as part of their Data.
  • 205. SYSTEM ARCHITECTURES • Client-Server • Peer-to-Peer • Services provided by multiple servers • Proxy servers and caches • Mobile code and mobile agents • Network computers • Thin clients and mobile devices 205
  • 207. Peer-to-peer Systems Application Application Application Peer 1 Peer 2 Peer 3 Peers 5 .... N Sharable objects Application Peer 4 207
  • 208. A Service by Multiple Servers Server Server Server Service Client Client 208
  • 210. Web Applets a) client request results in the dow nloading of applet code Web server Client Web server Applet Applet code Client b) client interacts with the applet 210
  • 211. Thin Clients and Compute Servers Thin Client Application Process Network computer or PC Compute server network 211
  • 213. Objectives • Definition of terms • List advantages of client/server architecture • Explain three application components: presentation, processing, and storage • Suggest partitioning possibilities • Distinguish between file server, database server, 3-tier, and n- tier approaches • Describe and discuss middleware • Explain query-by-example (QBE) • Explain database linking via ODBC and JDBC • Explain VBA and Microsoft Access 213
  • 214. Client/server Peer-to-peer Server “I want to access some information” “I want to collaborate with my colleague” Client
  • 215. Client/Server Systems • Networked computing model • Processes distributed between clients and servers • Client – Workstation (usually a PC) that requests and uses a service • Server – Computer (PC/mini/mainframe) that provides a service • For DBMS, server is a database server 215
  • 216. Application Logic in C/S Systems 216 GUI Interface Procedures, functions, programs DBMS activities Processing Logic  I/O processing  Business rules  Data management Storage Logic  Data storage/retrieval Presentation Logic  Input – keyboard/mouse  Output – monitor/printer
  • 217. Client/Server Architectures • File Server Architecture • Database Server Architecture • Three-tier Architecture 217 Client does extensive processing Client does little processing
  • 218. File Server Architecture • All processing is done at the PC that requested the data • Entire files are transferred from the server to the client for processing • Problems: – Huge amount of data transfer on the network – Each client must contain full DBMS • Heavy resource demand on clients • Client DBMSs must recognize shared locks, integrity checks, etc. 218
  • 219. 219 Figure 9-2: File Server Architecture FAT CLIENT
  • 220. Two-Tier Database Server Architectures • Client is responsible for – I/O processing logic – Some business rules logic • Server performs all data storage and access processing  DBMS is only on server 220
  • 221. Advantages of Two-Tier Approach • Clients do not have to be as powerful • Greatly reduces data traffic on the network • Improved data integrity since it is all processed centrally • Stored procedures  some business rules done on server 221
  • 222. Advantages of Stored Procedures • Compiled SQL statements • Reduced network traffic • Improved security • Improved data integrity • Thinner clients 222
  • 223. 223 Two-tier database server architecture Thinner clients DBMS only on server
  • 224. Three-Tier Architectures 224 Thin Client  PC just for user interface and a little application processing. Limited or no data storage (sometimes no hard drive) GUI interface (I/O processing) Browser Business rules Web Server Data storage DBMS Client Application server Database server
  • 225. 225 Three-tier architecture Thinnest clients Business rules on separate server DBMS only on DB server
  • 226. Advantages of Three-Tier Architectures • Scalability • Technological flexibility • Long-term cost reduction • Better match of systems to business needs • Improved customer service • Competitive advantage • Reduced risk 226
  • 227. Challenges of Three-tier Architectures • High short-term costs • Tools and training • Experience • Incompatible standards • Lack of compatible end-user tools 227
  • 228. Application Partitioning • Placing portions of the application code in different locations (client vs. server) AFTER it is written • Advantages – Improved performance – Improved interoperability – Balanced workloads 228
  • 229. Parallel Computer Architectures • Tightly Coupled – Symmetric Multiprocessing (SMP) – Multiple CPUs – Shared RAM • Loosely Coupled – Massively Parallel Processing (MPP) – Multiple CPUs – Each CPU has its own RAM space 229
  • 230. Parallel Computer Architectures 230 Figure 9-6 Tightly coupled – CPUs share common memory space Figure 9-7 Loosely coupled – CPUs each have their own memory space
  • 231. Query Processing with Parallel Processors 231 Figure 9-5a: Parallel transactions Figure 9-5b: Parallel query
  • 232. Processing Logic Distributions 232 Two-tier distributions n-tier distributions Processing logic could be at client, server, or both Processing logic will be at application server or Web server
  • 233. Middleware • Software which allows an application to interoperate with other software • No need for programmer/user to understand internal processing • Accomplished via Application Program Interface (API) 233 The “glue” that holds client/server applications together
  • 234. Types of Middleware • Remote Procedure Calls (RPC) – client makes calls to procedures running on remote computers – synchronous and asynchronous • Message-Oriented Middleware (MOM) – asynchronous calls between the client via message queues • Publish/Subscribe – push technology  server sends information to client when available • Object Request Broker (ORB) – object-oriented management of communications between clients and servers • SQL-oriented Data Access – middleware between applications and database servers 234
  • 235. Database Middleware • ODBC – Open Database Connectivity – Most DB vendors support this • OLE-DB – Microsoft enhancement of ODBC • JDBC – Java Database Connectivity – Special Java classes that allow Java applications/applets to connect to databases 235
  • 236. 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 236
  • 237. Query-by-Example (QBE) • Direct-manipulation database language • Graphical approach • Available in MS Access • MS Access translates QBE to SQL and vice versa • Useful for end-user database programming • Good for ad hoc processing and prototyping 237
  • 238. 238 Figure 9-10: QBE view of a multiple- table join query Figure 9-12: Equivalent query in SQL
  • 239. 239 Figure 9-9: Access usability hierarchy Foundation of MS Access Simple processes Stored modules of pre- existing VBA code Visual Basic for Applications…language for customizing the application API to call functions in DLLs external to MS Access
  • 240. Using ODBC to Link External Databases Stored on a Database Server • Open Database Connectivity (ODBC) – API that provides a common language for application programs to access and process SQL databases independent of the particular RDBMS that is accessed • Required parameters: – ODBC driver – Back-end server name – Database name – User id and password • Additional information: – Data source name (DSN) – Windows client computer name – Client application program’s executable name 240 Java Database Connectivity (JDBC) is similar to ODBC – built specifically for Java applications
  • 241. ODBC Architecture (Figure 9-18) 241 Each DBMS has its own ODBC-compliant driver Client does not need to know anything about the DBMS Application Program Interface (API) provides common interface to all DBMSs
  • 242. Visual Basic for Applications • VBA is the programming language that accompanies Access 2000 • VBA provides these features: – Ability to perform complex functionality – Error handling – Faster execution than macros – Easier maintenance – OLE automation – Programmatic control – Ease of reading for programmers • Event-driven – nonprocedural programming that detects events and generates appropriate responses 242
  • 244. Application-level overlays • One per application • Nodes are decentralized ISP3 ISP1 ISP2 Site 1 Site 4 Site 3 Site 2 N N N N N N P2P systems are overlay networks without central control
  • 245. Client/Server Limitations • Scalability is hard to achieve • Presents a single point of failure • Requires administration • Unused resources at the network edge • P2P systems try to address these limitations
  • 246. Client-Server Versus Peer-to- Peer Network Architecture • A simple distinction – Client-server • Computers perform asymmetric functions – Peers-to-Peer (P2P) • Computers perform symmetric functions • Different architectures offer different benefits • Pure P2P networks are rare – Most P2P networks rely on centralized server for some functions
  • 247. What is P2P? …a technology that enables two or more peers to collaborate spontaneously in a network of equal peers by using appropriate information and communication systems without the necessity for central coordination. • File/information/resource sharing • Equal peers • Decentralization
  • 248. Workstation (Client) Server Workstation (Client) Client/Server Model Server Workstation (Client) Order result Peer to Peer Model Assumption Workstation is so powerless that it can not do any task. result Order Assumption Workstation is powerful enough to do some jobs Pure P2P Other workstation and server can remote-control the workstation Only User (Operator) can control the workstation
  • 249. P2P Network Features • Clients are also servers and routers – Nodes contribute content, storage, memory, CPU • Nodes are autonomous (no administrative authority) • Network is dynamic: nodes enter and leave the network “frequently” • Nodes collaborate directly with each other (not through well-known servers) • Nodes have widely varying capabilities
  • 250. Features of the P2P Computing • P2P computing is the sharing of computer resources and services by direct exchange between systems. • These resources and services include the exchange of information, processing cycles, cache storage, and disk storage for files. • P2P computing takes advantage of existing computing power, computer storage and networking connectivity, allowing users to leverage their collective power to the ‘benefit’ of all.
  • 251. P2P Architecture • All nodes are both clients and servers – Provide and consume data – Any node can initiate a connection • No centralized data source – “The ultimate form of democracy on the Internet” – “The ultimate threat to copy-right protection on the Internet” Node Node Node Node Node Internet
  • 253. Large-Scale Data Sharing: P2P Client Internet server Client Client Client Client Client Client Client Client Client Cache Proxy server Congestion zone Client/ Server server server Client/ Server Client/ Server Client/ Server Client/ Server Client/ Server Client/ Server Client/ Server Client/ Server Congestion zone Client/server model Peer-to-peer model
  • 254. p2p pir too pir n. a virtual network of functionally similar nodes created using an alternate, often private, namespace
  • 255. P2P Benefits • Efficient use of resources – Unused bandwidth, storage, processing power at the edge of the network • Scalability – Since every peer is alike, it is possible to add more peers to the system and scale to larger networks – Consumers of resources also donate resources – Aggregate resources grow naturally with utilization • Reliability – Replicas – Geographic distribution – No single point of failure • E.g., the Internet and the Web do not have a central point of failure. • Most internet and web services use the client-server model (e.g. HTTP), so a specific service does have a central point of failure • Ease of administration – Nodes self organize – No need to deploy servers to satisfy demand – confer (compare, c.f.) scalability – Built-in fault tolerance, replication, and load balancing
  • 257. A hybrid P2P network architecture • A hybrid P2P architecture
  • 258. P2P must be disruptive… • Peer-to-peer (p2p): third generation of the Internet • 1st generation: “raw” Internet • 2nd generation: the Web • 3rd generation: making new services to users cheaply and quickly by making use of their PCs as active participants in computing processes • P2P doing this in “disruptive” ways
  • 260. Peer-peer networking Focus at the application level
  • 262. Three main categories of systems • Centralized systems: peer connects to server which coordinates and manages communication. e.g. SETI@home • Brokered systems: peers connect to a server to discover other peers, but then manage the communication themselves (e.g. Napster). This is also called Brokered P2P. • Decentralized systems: peers run independently with no central services. Discovery is decentralized and communication takes place between the peers. e.g. Gnutella, Freenet Classification of the P2P Systems True P2P
  • 263. What P2P is good for? • Community Web network – Any group with specific common interests, including a family or hobbyists, can use lists and a Web site to create their own intranet. • Search engines – Fresh, up-to-date information can be found by searching directly across the space where the desired item is likely to reside • Collaborative development – The scope can range from developing software products to composing a document to applications like rendering graphics.
  • 264. P2P Application Areas • Communication – AOL Instant Messenger – ICQ • Remote Collaboration (Shared File Editing, Audio-video Conferencing) – Jabber – Shared whiteboard • Multiplayer Games – Unreal Tournament, DOOM • Streaming (Application-level Multicast) – Narada – Yoid – NICE, CAN-Multicast, Scribe • Distributed Computing – SETI@home • File Sharing – Napster – Gnutella, Freenet, LimeWire – KazaA, Morpheus • Ad-hoc networks
  • 265. Instant Messaging • A convenient way of communicating with a small group of selected people (e.g., friends, family members, etc.) • Usually, a central server is used to store user profiles and to have a list of registered users • While communication takes place between the peers, searching for other people is done using the server • One of the reasons why a server is needed is the ability to send messages to other persons (i.e., peers) • If the target peer is not online, the system has to store the message until the target peers becomes online again • This would be, of course, also possible with a server-less P2P system, but the price would be an increased complexity and a certain probability of messages getting lost • Examples for such systems are: – Napster – ICQ – threedegrees – Jabber
  • 266. Collaboration • This is not a typical example for the usefulness of P2P technology • It is about having people having the same view or different views on shared information • This would typically call for a server storing this information • This way, the information is available to all members without the necessity of having the information provider or contributor online or the data distributed to all other participants • But there are use cases where P2P technology comes in mobile phones • One example could be ad hoc collaboration of devices in an environment where no connection to a server exist – E.g., people are meeting in a place where no connection to the Internet is available • In this scenario, people would communicate (and collaborate) in a server-less P2P manner • One perfect example for this use case is Groove – It uses a server to store shared information but is also able to provide collaboration services without the existence of such a server
  • 267. P2P Technical Challenges • Peer identification • Routing protocols • Network topologies • Peer discovery • Communication/coordination protocols • Quality of service • Security • Fine-grained resource management
  • 269. Lecture Outline Real Systems (are often unreliable) ◦ We ignored failures till now ◦ Fault Tolerance basic concepts Fault Tolerance – Check pointing Fault Tolerance – Logging and Recovery 269
  • 270. What is Fault Tolerance? • Dealing successfully with partial failure within a distributed system • Fault tolerant ~> dependable systems • Dependability implies the following: 1. Availability 2. Reliability 3. Safety 4. Maintainability
  • 271. Dependability Concepts • Availability – the system is ready to be used immediately. • Reliability – the system runs continuously without failure. • Safety – if a system fails, nothing catastrophic will happen. (e.g. process control systems) • Maintainability – when a system fails, it can be repaired easily and quickly (sometimes, without its users noticing the failure). (also called Recovery) – What’s a failure? : System that cannot meet its goals => faults – Faults can be: Transient, Intermittent, Permanent
  • 273. Masking Failures by Redundancy • Strategy: hide the occurrence of failure from other processes using redundancy. 1. Information Redundancy – add extra bits to allow for error detection/recovery (e.g., Hamming codes and the like). 2. Time Redundancy – perform operation and, if needs be, perform it again. Think about how transactions work (BEGIN/END/COMMIT/ABORT). 3. Physical Redundancy – add extra (duplicate) hardware and/or software to the system.
  • 274. Masking Failures by Redundancy Triple modular redundancy in a circuit (b) A,B,C are circuit elements and V* are voters
  • 275. Lecture Outline • Real Systems (are often unreliable) – We ignored failures till now – Fault Tolerance basic concepts • Fault Tolerance – Recovery using Check pointing • Fault Tolerance – Logging and Recovery 275
  • 276. Achieving Fault Tolerance in DS  Process Resilience (when processes fail) T8.2 ◦ Have multiple processes (redundancy) ◦ Group them (flat, hierarchically), voting  Reliable RPCs (communication failures) T8.3 ◦ Several cases to consider (lost reply, client crash, …) ◦ Several potential solutions for each case  Distributed Commit Protocols ◦ Perform operations by all group members, or not at all ◦ 2 phase commit, … (last lecture)  Today: A failure has occurred, can we recover? 276
  • 277. Recovery Strategies  When a failure occurs, we need to bring the system into an error free state (recovery). This is fundamental to Fault Tolerance. 1. Backward Recovery: return the system to some previous correct state (using checkpoints), then continue executing. Example? ◦ Packet retransmit in case of lost packet 2. Forward Recovery: bring the system into a correct new state, from which it can then continue to execute. Example? ◦ Erasure coding, (n,k) where k < n <= 2k
  • 278. Forward and Backward Recovery  Major disadvantage of Backward Recovery: ◦ Checkpointing can be very expensive (especially when errors are very rare). ◦ [Despite the cost, backward recovery is implemented more often. The “logging” of information can be thought of as a type of checkpointing.].  Major disadvantage of Forward Recovery: ◦ In order to work, all potential errors need to be accounted for up-front. ◦ When an error occurs, the recovery mechanism then knows what to do to bring the system forward to a correct state.
  • 279. Checkpointing A recovery line to detect the correct distributed snapshot This becomes challenging if checkpoints are un-coordinated
  • 280. Independent Checkpointing The domino effect – Cascaded rollback P2 crashes, roll back, but 2 checkpoints inconsistent (P2 shows m received, but P1 does not show m sent)
  • 281. Coordinated Checkpointing  Key idea: each process takes a checkpoint after a globally coordinated action. (why is this good?)  Simple Solution: 2-phase blocking protocol ◦ Co-ordinator multicast checkpoint_REQUEST message ◦ Participants receive message, takes a checkpoint, stops sending (application) messages, and sends back checkpoint_ACK ◦ Once all participants ACK, coordinator sends checkpoint_DONE to allow blocked processes to go on  Optimization: consider only processes that depend on the recovery of the coordinator (those it sent a message since last checkpoint) 281
  • 282. Recovery – Stable Storage (a) Stable storage. (b) Crash after drive 1 is updated. (c) Bad spot.
  • 283. Goal: Make transactions Reliable  …in the presence of failures ◦ Machines can crash. Disk Contents (OK), Memory (volatile), Machines don’t misbehave ◦ Networks are flaky, packet loss, handle using timeouts  If we store database state in memory, a crash will cause loss of “Durability”.  May violate atomicity, i.e. recover such that uncommited transactions COMMIT or ABORT.  General idea: store enough information to disk to determine global state (in the form of a LOG) 283
  • 284. Challenges:  Disk performance is poor (vs memory) ◦ Cannot save all transactions to disk ◦ Memory typically several orders of magnitude faster  Writing to disk to handle arbitrary crash is hard ◦ Several reasons, but HDDs and SSDs have buffers  Same general idea: store enough data on disk so as to recover to a valid state after a crash: ◦ Shadow pages and Write-ahead Logging (WAL) 284
  • 285. Shadow Paging Vs WAL  Shadow Pages ◦ Provide Atomicity and Durability, “page” = unit of storage ◦ Idea: When writing a page, make a “shadow” copy  No references from other pages, edit easily! ◦ ABORT: discard shadow page ◦ COMMIT: Make shadow page “real”. Update pointers to data on this page from other pages (recursive). Can be done atomically ◦ Essentially “copy-on-write” to avoid in-place page update 285
  • 286. Shadow Paging vs WAL  Write-Ahead-Logging ◦ Provide Atomicity and Durability ◦ Idea: create a log recording every update to database ◦ Updates considered reliable when stored on disk ◦ Updated versions are kept in memory (page cache) ◦ Logs typically store both REDO and UNDO operations ◦ After a crash, recover by replaying log entries to reconstruct correct state ◦ WAL is more common, fewer disk operations, transactions considered committed once log written. 286
  • 287. Write-Ahead Logging  View as sequence of entries, sequential number ◦ Log-Sequence Number (LSN) ◦ Database: fixed size PAGES, storage at page level  Pages on disk, some also in memory (page cache) ◦ “Dirty pages”: page in memory differs from one on disk  Reconstruction of global consistent state ◦ Log files + disk contents + (page cache)  Logs consist of sequence of records ◦ Begin LSN, TID #Begin TXN ◦ End LSN, TID, PrevLSN #Finish TXN (abort or commit) ◦ Update LSN, TID, PrevLSN, pageID, offset, old value, new value 287
  • 288. Write-Ahead Logging  Logs consist of sequence of records ◦ To record an update to state ◦ Update LSN, TID, PrevLSN, pageID, offset, old value, new value ◦ PrevLSN forms a backward chain of operations for each TID ◦ Storing “old” and “new” values allow REDO operations to bring a page up to date, or UNDO an update reverting to an earlier version  Transaction Table (TT): All TXNS not written to disk ◦ Including Seq Num of the last log entry they caused  Dirty Page Table (DPT): all dirty pages in memory ◦ Modified pages, but not written back to disk. 288
  • 289. Write-Ahead-Logging  Commit a transaction ◦ Log file up to date until commit entry ◦ Don't update actual disk pages, log file has information ◦ Keep "tail" of log file in memory => not commits ◦ If the tail gets wiped out (crash), then partially executed transactions will lost. Can still recover to reliable state  Abort a transaction ◦ Locate last entry from TT, undo all updates so far ◦ Use PrevLSN to revert in-memory pages to start of TXN ◦ If page on disk needs undo, wait (come back to this) 289
  • 290. Recovery using WAL – 3 passes  Analysis Pass ◦ Reconstruct TT and DPT (from start or last checkpoint) ◦ Get copies of all pages at the start  Recovery Pass (redo pass) ◦ Replay log forward, make updates to all dirty pages ◦ Bring everything to a state at the time of the crash  Undo Pass ◦ Replay log file backward, revert any changes made by transactions that had not committed (use PrevLSN) ◦ For each write Compensation Log Record (CLR) ◦ Once you reach BEGIN TXN, write an END TXN entry 290
  • 291. WAL can be integrated with 2PC • WAL can integrate with 2PC – Have additional log entries that capture 2PC operation – Coordinator: Include list of participants – Participant: Indicates coordinator – Votes to commit or abort – Indication from coordinator to Commit/Abort 291
  • 292. Optimizing WAL  As described earlier: ◦ Replay operations back to the beginning of time ◦ Log file would be kept forever, (entire Database)  In practice, we can do better with CHECKPOINT ◦ Periodically save DPT, TT ◦ Store any dirty pages to disk, indicate in LOG file ◦ Prune initial portion of log file: All transactions upto checkpoint have been committed or aborted. 292
  • 293. Summary  Real Systems (are often unreliable) ◦ Introduced basic concepts for Fault Tolerant Systems including redundancy, process resilience, RPC  Fault Tolerance – Backward recovery using check pointing, both Independent and coordinated  Fault Tolerance –Recovery using Write-Ahead- Logging, balances the overhead of check pointing and ability to recover to a consistent state 293
  • 294. Transactions: ACID Properties Atomicity: Each transaction completes in its entirely, or is aborted. If aborted, should not have have effect on the shared global state. ◦ Example: Update account balance on multiple servers Consistency: Each transaction preserves a set of invariants about global state. (exact nature is system dependent). ◦ Example: in a bank system, law of conservation of $$ 295
  • 295.  Isolation: Also means serializability. Each transaction executes as if it were the only one with the ability to RD/WR shared global state.  Durability: Once a transaction has been completed, or “committed” there is no going back. In other words there is no “undo”.  Transactions can also be nested  “Atomic Operations” => Atomicity + Isolation 296 Transactions: ACID Properties
  • 297. Overview • Introduction to the DNS • DNS Components • DNS Structure and Hierarchy • The DNS in Context
  • 298. The DNS is… • The “Domain Name System” • What Internet users use to reference anything by name on the Internet • The mechanism by which Internet software translates names to attributes such as addresses
  • 299. The DNS is also… • A globally distributed, scalable, reliable database • Comprised of three components – A “name space” – Servers making that name space available – Resolvers (clients) which query the servers about the name space
  • 300. DNS as a Lookup Mechanism • Users generally prefer names to numbers • Computers prefer numbers to names • DNS provides the mapping between the two – I have “x”, give me “y”
  • 301. Global Distribution • Data is maintained locally, but retrievable globally – No single computer has all DNS data • DNS lookups can be performed by any device • Remote DNS data is locally cachable to improve performance
  • 302. Loose Coherency • Each version of a subset of the database (a zone) has a serial number – The serial number is incremented on each database change • Changes to the master copy of the database are propagated to replicas according to timing set by the zone administrator • Cached data expires according to timeout set by zone administrator
  • 303. Domain Names • A domain name is the sequence of labels from a node to the root, separated by dots (“.”s), read left to right – The name space has a maximum depth of 127 levels – Domain names are limited to 255 characters in length • A node’s domain name identifies its position in the name space dakota west tornado east www nominum metainfo com berkeley nwu edu gov nato int army mil uu net org ""
  • 304. Subdomains • One domain is a subdomain of another if its domain name ends in the other’s domain name – So sales.nominum.com is a subdomain of • nominum.com & com – nominum.com is a subdomain of com
  • 305. Overview • Introduction to the DNS • DNS Components – The name space – The servers – The resolvers • DNS Structure and Hierarchy • The DNS in Context
  • 306. Name Servers • Name servers store information about the name space in units called “zones” – The name servers that load a complete zone are said to “have authority for” or “be authoritative for” the zone • Usually, more than one name server are authoritative for the same zone – This ensures redundancy and spreads the load • Also, a single name server may be authoritative for many zones
  • 307. Name Servers and Zones 128.8.10.5 nominum.com 204.152.187.11 202.12.28.129 Name Servers isc.org Zones 128.8.10.5 serves data for both nominum.com and isc.org zones 202.12.28.12 9 serves data for nominum.co m zone only 204.152.187.11 serves data for isc.org zone only
  • 308. Types of Name Servers • Two main types of servers – Authoritative – maintains the data • Master – where the data is edited • Slave – where data is replicated to – Caching – stores data obtained from an authoritative server • No special hardware necessary
  • 309. Name Server Architecture • You can think of a name server as part of: – database server, answering queries about the parts of the name space it knows about (i.e., is authoritative for), – cache, temporarily storing data it learns from other name servers, and – agent, helping resolvers and other name servers find data
  • 310. Name Server Architecture Master server Zone transfer Zone data file From disk Authoritative Data (primary master and slave zones) Agent (looks up queries on behalf of resolvers) Cache Data (responses from other name servers) Name Server Process
  • 311. Authoritative Data Resolver Query Response Authoritative Data (primary master and slave zones) Agent (looks up queries on behalf of resolvers) Cache Data (responses from other name servers) Name Server Process
  • 312. Using Other Name Servers Another name server Response Resolver Query Query Authoritative Data (primary master and slave zones) Agent (looks up queries on behalf of resolvers) Cache Data (responses from other name servers) Name Server Process Response
  • 313. Cached Data Query Response Authoritative Data (primary master and slave zones) Agent (looks up queries on behalf of resolvers) Cache Data (responses from other name servers) Name Server Process Resolver
  • 314. Overview • Introduction to the DNS • DNS Components – The name space – The servers – The resolvers • DNS Structure and Hierarchy • The DNS in Context
  • 315. ping www.nominum.com. The Resolution Process • Let’s look at the resolution process step-by- step: annie.west.sprockets.com
  • 316. What’s the IP address of www.nominum.com? The Resolution Process • The workstation annie asks its configured name server, dakota, for www.nominum.com’s address ping www.nominum.com. annie.west.sprockets.com dakota.west.sprockets.com
  • 317. The Resolution Process • The name server dakota asks a root name server, m, for www.nominum.com’s address ping www.nominum.com. annie.west.sprockets.com m.root-servers.net dakota.west.sprockets.com What’s the IP address of www.nominum.com?
  • 318. The Resolution Process • The root server m refers dakota to the com name servers • This type of response is called a “referral” ping www.nominum.com. annie.west.sprockets.com m.root-servers.net dakota.west.sprockets.com Here’s a list of the com name servers. Ask one of them.
  • 319. The Resolution Process • The name server dakota asks a com name server, f, for www.nominum.com’s address ping www.nominum.com. annie.west.sprockets.com m.root-servers.net dakota.west.sprockets.com What’s the IP address of www.nominum.com? f.gtld-servers.net
  • 320. The Resolution Process • The com name server f refers dakota to the nominum.com name servers ping www.nominum.com. annie.west.sprockets.com f.gtld-servers.net m.root-servers.net dakota.west.sprockets.com Here’s a list of the nominum.com name servers. Ask one of them.
  • 321. ping ftp.nominum.com. Resolution Process (Caching) • After the previous query, the name server dakota now knows: – The names and IP addresses of the com name servers – The names and IP addresses of the nominum.com name servers – The IP address of www.nominum.com • Let’s look at the resolution process again annie.west.sprockets.com
  • 322. Overview • Introduction to the DNS • DNS Components • DNS Structure and Hierarchy • The DNS in Context
  • 323. DNS Structure and Hierarchy • The DNS imposes no constraints on how the DNS hierarchy is implemented except: – A single root – The label restrictions – So, can we create a host with a name a.wonderful.world? • If a site is not connected to the Internet, it can use any domain hierarchy it chooses – Can make up whatever TLDs (top level domains) you want • Connecting to the Internet implies use of the existing DNS hierarchy
  • 324. Registries, Registrars, and Registrants • A classification of roles in the operation of a domain name space • Registry – the name space’s database – the organization which has edit control of that database – the organization which runs the authoritative name servers for that name space • Registrar – the agent which submits change requests to the registry on behalf of the registrant • Registrant – the entity which makes use of the domain name
  • 325. Overview • Introduction to the DNS • DNS Components • DNS Hierarchy • The DNS in Context
  • 328. What is a Distributed File System?? • Allows transparent access to remote files over a network. Examples: • Network File System (NFS) by Sun Microsystems. • Remote File Sharing System (RFS) from AT&T. • Andrew File System (AFS) from CMU. Centralized File System Vs. Distributed File System
  • 329. Properties of Distributed File Systems • Network transparency. • Location transparency. • Location independence. • User mobility. • Fault tolerance. • Scalability. • File Mobility.
  • 330. Design Considerations Different Distributed File Systems can be compared according to how they deal with these issues: • Name Space. • Stateful or stateless operation. • Semantics of sharing. • Remote access methods.
  • 331. Network File Systems (NFS) • The architecture is based on the Client-Server model. • Clients and servers communicate via Remote Procedure Calls (RPC). • An NFS server exports one or more filesystems. • Clients mount such a file system. - Hard and Soft mounts. e.g: mount –t nfs nfssrv:/usr /usr
  • 332. Design Goals • NFS should not be restricted to UNIX. • The protocol should not be dependent on any particular hardware. • Simple recovery mechanisms. • Remote files should be accessible transparently. • NFS performance should be comparable to that of local disk. • Implementation must be transport independent. • Unix file system semantics must be maintained for UNIX clients.
  • 333. NFS Components • The NFS protocol • The Remote Procedure Call (RPC) protocol. • The Extended Data Representation (XDR). • The NFS Server Code. • The NFS Client Code. • The Mount protocol. • Daemon processes. • The Network Lock Manager (NLM).
  • 334. NFS Implementation • Control flow: When a process on the client makes a system call that operates on an NFS file, the file-system independent code identifies the vnode of the file and invokes the relevant Vnode operation. • File handles: The NFS protocol associates an object called the file handle with each file or directory. • The mount operation: •Pathname Lookup
  • 335. UNIX Semantics • Open file permissions. • Deletion of open files. • Reads and writes. NFS Performance • Performance Bottlenecks. • Client-Side Caching. • Deferral of writes. • The Retransmissions Cache.
  • 336. Remote File Sharing (RFS) • Introduced by AT&T. • RFS uses the client-server model. • The design goal is to provide transparent access to remote files by preserving UNIX semantics. • RFS is a completely stateful architecture. • RFS uses a reliable, virtual circuit transport service such as TCP/IP. A virtual circuit is established between a client and server during the first mount operation. • Network independence is achieved. •There is a name server.
  • 337. RFS Implementations • Remote mount: An RFS server can advertise a directory using the advfs system call along with some arguments. • RFS clients and servers: The client can access an RFS file either through its pathname or through a file descriptor. • Crash Recovery: Stateful systems need elaborate crash recovery mechanisms.
  • 338. Client-Side Caching: Client caching is activated at mount time. The cache is strictly write through and the data is written to server immediately after the local cache copy is written to and thus the consistency is maintained. Cache Consistency: Any modification of a file, either by user or client, invalidates the cached copy on all other clients.
  • 339. Andrew File System (AFS) This is a distributed file system capable of scaling to thousands of users like in a university campus. • Developed by Carnegie-Melon University and IBM. • AFS is UNIX compatible. • It provides a uniform, location independent name space for shared files. • AFS is fault tolerant in case a server fails. • AFS provides security without trusting clients or n/w. • The performance should be comparable to time-sharing system.
  • 340. The Andrew File System Scalable Architecture: Storage and Name space organization: Session semantics:
  • 341. AFS Implementation Caching and Consistency: The cache manager implements the vnode operations for AFS files on clients. Pathname Lookup: This is a CPU intensive operation and AFS handles it directly on clients. Security: AFS considers the collection of servers as the boundary of secutriy. It uses the Kerberos authentication system.
  • 342. The DCE Distributed File System In 1989 the Transarc Corporation took over the development and production of AFS. DFS is similar to AFS in several respects. It improves upon AFS in following ways: • It allows a single machine to be both a server and client. • It provides stronger, UNIX like sharing semantics and consistency guarantees. • It allows greater interoperability with other file systems.