[go: up one dir, main page]

0% found this document useful (0 votes)
19 views16 pages

Chapter02 - Part 02

Uploaded by

socialdanish1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views16 pages

Chapter02 - Part 02

Uploaded by

socialdanish1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Architectures Middleware and distributed systems

Middleware: the OS of distributed systems

What does it contain?


Commonly used components and functions that need not be implemented by
applications separately.
Architectures Middleware and distributed systems

Using legacy to build middleware


Problem
The interfaces offered by a legacy component are most likely not suitable for all
applications.

Solution
A wrapper or adapter offers an interface acceptable to a client application. Its
functions are transformed into those available at the component.

Middleware organization
Architectures Middleware and distributed systems

Organizing wrappers
Two solutions: 1-on-1 or through a broker

Complexity with N applications


• 1-on-1: requires N × ( N − 1) = O(N2) wrappers
• broker: requires 2N = O(N) wrappers

Middleware organization
Architectures Middleware and distributed systems

Developing adaptable middleware


Problem
Middleware contains solutions that are good for most applications you may
want to adapt its behavior for specific applications.

Middleware organization
Architectures Middleware and distributed systems

Intercept the usual flow of control

Middleware organization
Architectures Layered-system architectures

Centralized system architectures


Basic Client–Server Model
Characteristics:
• There are processes offering services (servers)
• There are processes that use services (clients)
• Clients and servers can be on different machines
• Clients follow request/reply model regarding using services

Simple client-server architecture


Architectures Layered-system architectures

Multi-tiered centralized system architectures


Some traditional organizations
• Single-tiered: dumb terminal/mainframe configuration
• Two-tiered: client/single server configuration
• Three-tiered: each layer on separate machine

Traditional two-tiered configurations

(a) (b) (c) (d) (e)

Multitiered Architectures
Architectures Layered-system architectures

Being client and server at the same time


Three-tiered architecture

Multitiered Architectures
Architectures Layered-system architectures

Example: The Network File System


Foundations
Each NFS server provides a standardized view of its local file system: each
server supports the same model, regardless the implementation of the file
system.

The NFS remote access model

Remote access Upload/download


Note
FTP is a typical upload/download model. The same can be said for systems
like Dropbox.

Example: The Network File System


Architectures Layered-system architectures

NFS architecture

Example: The Network File System


Architectures Layered-system architectures

Example: Simple Web servers


Back in the old days...

...life was simple:


• A website consisted as a collection of HTML files
• HTML files could be referred to each other by a hyperlink
• A Web server essentially needed only a hyperlink to fetch a file
• A browser took care of properly rendering the content of a file

Example: The Web


Architectures Layered-system architectures

Example (cnt’d): Less simple Web servers


Still back in the old days...

...life became a bit more complicated:


• A website was built around a database with content
• A Webpage could still be referred to by a hyperlink
• A Web server essentially needed only a hyperlink to fetch a file
• A separate program (Common Gateway Interface) composed a page
• A browser took care of properly rendering the content of a file

Example: The Web


Architectures Symmetrically distributed system architectures

Alternative organizations
Vertical distribution
Comes from dividing distributed applications into three logical layers, and
running the components from each layer on a different server (machine).

Horizontal distribution
A client or server may be physically split up into logically equivalent parts, but
each part is operating on its own share of the complete data set.

Peer-to-peer architectures
Processes are all equal: the functions that need to be carried out are
represented by every process each process will act as a client and a server
at the same time (i.e., acting as a servant).
Architectures Symmetrically distributed system architectures

Structured P2P
Essence
Make use of a semantic-free index: each data item is uniquely associated with
a key, in turn used as an index. Common practice: use a hash function
key(data item) = hash(data item’s value).
P2P system now responsible for storing (key,value) pairs.

Simple example: hypercube

Looking up d with key k {0, 1,2,..., 24 − 1} means routing request to node


with identifier k.

Structured peer-to-peer systems


Architectures Symmetrically distributed system architectures

Example: Chord
Principle
• Nodes are logically organized in a ring. Each node has an m-bit identifier.
• Each data item is hashed to an m-bit key.
• Data item with key k is stored at node with smallest identifier id ≥ k,
called the successor of key k.
• The ring is extended with various shortcut links to other nodes.

Structured peer-to-peer systems


Architectures Symmetrically distributed system architectures

Example: Chord

lookup(3)@9 : 28 → 1 → 4
Structured peer-to-peer systems

You might also like