ch02 Architectures
ch02 Architectures
Architectural styles
2 / 28
Architectures: Architectural styles Layered architectures Architectures: Architectural styles Layered architectures
Layer 1
Architectures: Architectural styles Layered architectures Architectures: Architectural styles Layered architectures
State Object
Object Object Client Server
State
Method Same
Method call interface Method
Object Client
invokes as object
Object a method
Skeleton
Object Interface
Interface invokes
Proxy same method Skeleton
at object
Client OS Server OS
Encapsulation
Objects are said to encapsulate data and offer methods on that data without
Network
revealing the internal implementation. Marshalled invocation
is passed across network
7 / 28 8 / 28
Architectures: Architectural styles Resource-based architectures Architectures: Architectural styles Resource-based architectures
9 / 28 10 / 28
Architectures: Architectural styles Resource-based architectures Architectures: Architectural styles Resource-based architectures
On interfaces On interfaces
Issue Simplifications
Many people like RESTful approaches because the interface to a service is so Assume an interface bucket offering an operation create, requiring an input
simple. The catch is that much needs to be done in the parameter space. string such as mybucket, for creating a bucket “mybucket.”
11 / 28 12 / 28
Architectures: Architectural styles Publish-subscribe architectures Architectures: Middleware organization Wrappers
Publish
Component
Shared (persistent) data space
13 / 28 14 / 28
15 / 28 16 / 28
17 / 28 18 / 28
Architectures: System architecture Centralized organizations Architectures: System architecture Centralized organizations
Server machine
(a) (b) (c) (d) (e)
Simple client-server architecture 19 / 28 Multitiered Architectures 20 / 28
Architectures: System architecture Centralized organizations Architectures: System architecture Decentralized organizations: peer-to-peer systems
Vertical distribution
Three-tiered architecture Comes from dividing distributed applications into three logical layers, and
running the components from each layer on a different server (machine).
Client Application Database
server server
Request
operation
Request
Horizontal distribution
data A client or server may be physically split up into logically equivalent parts, but
Wait for
reply
Wait for
data
each part is operating on its own share of the complete data set.
Return
Return
data Peer-to-peer architectures
reply
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).
Multitiered Architectures 21 / 28 22 / 28
Architectures: System architecture Decentralized organizations: peer-to-peer systems Architectures: System architecture Decentralized organizations: peer-to-peer systems
Essence
It is sometimes sensible to break the symmetry in pure peer-to-peer networks: Essence
When searching in unstructured P2P systems, having index servers Systems deployed on the Internet where servers are placed at the edge of the
improves performance network: the boundary between enterprise networks and the actual Internet.
Deciding where to store data can often be done more efficiently through
brokers. Client Content provider
ISP
ISP
Super peer
Core Internet
Overlay network of super peers
Edge server
Enterprise network
Weak peer
Architectures: System architecture Hybrid Architectures Architectures: Example architectures The Network File System
Collaboration: The BitTorrent case The Network File System (NFS) for Unix Systems
Remote file service - Remote access model
Principle: search for a file F
Transparent access to a file system managed by a remote server.
Lookup file at a global directory ⇒ returns a torrent file Clients are unaware of actual location of files.
Torrent file contains reference to tracker: a server keeping an accurate
account of active nodes that have (chunks of) F . Client Server
P can join swarm, get a chunk for free, and then trade a copy of that
chunk for another one with a peer Q also in the swarm. System call layer System call layer
Network