Technical Stream Session 3: Design of Distributed Systems - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

Technical Stream Session 3: Design of Distributed Systems

Description:

Focus is then on coordination of co-operating elements. Application. Database. User Int. ... Lightweight units of concurrency operating in a single address ... – PowerPoint PPT presentation

Number of Views:62
Avg rating:3.0/5.0
Slides: 14
Provided by: Francoi95
Category:

less

Transcript and Presenter's Notes

Title: Technical Stream Session 3: Design of Distributed Systems


1
Technical Stream Session 3Design of Distributed
Systems
Distributed Systems
  • CSC 253
  • Gordon Blair, François Taïani

2
Overview of the Session
  • Applying the client-server model
  • Application layering
  • Two-tiered vs three-tiered architectures
  • More general multi-tiered architectures
  • Introducing threads
  • Multi-threaded clients
  • Multi-threaded servers
  • Stateful vs. stateless servers
  • Patterns for distributed systems programming

Associated Reading Tanenbaum and van Steen, pp.
42-53, 135-152
3
Application Levels
  • Distributed applications commonly feature three
    levels
  • The user-interface level
  • Maintaining the interaction between the user and
    the application
  • The processing level
  • Often referred to as the business logic of the
    application
  • The data level
  • Managing the persistent state of the application
  • Also responsible for consistency of data
  • Often realised by a (generic) database supporting
    meta-data, queries, optimisation, etc

4
Two-Tiered Architectures
  • Levels split between the a client and a server in
    various ways

5
Three-Tiered Architectures
  • Same levels mapped on to three machines, for
    example

Application logic
(CF business logic)
Thin Client
Database Server
Application Server
6
2-Tiered vs 3-Tiered Architectures
  • Advantages of 2-tiered approaches
  • Advantages of three-tiered approaches

7
Multi-Tiered Approaches
  • Take a given functional decomposition such as
    considered so far (user interface, processing,
    data)
  • Vertical distribution
  • Map the logical decomposition on to different
    machines
  • Each machine then has its own distinct role
  • Horizontal distribution
  • Client or server functionality is physically
    split into logically equivalent units executing
    on different machines
  • Very useful for load balancing and scalability
  • Focus is then on coordination of co-operating
    elements

8
Introducing Threads
  • What are threads?
  • Lightweight units of concurrency operating in a
    single address space
  • The multi-threaded client
  • Latencies in a distributed system can be large,
    esp. in geographically large scale systems
  • Threads can be used to hide such latencies
  • A given thread blocks on an invocation
  • One or more other threads can then proceed with
    computation or indeed other communication
    activity
  • The multi-threaded server
  • Assign threads to incoming invocations
  • Supports the concurrent processing of requests
  • Different thread-assignment policies possible
  • Thread per request, tread per client, thread
    pool, etc
  • Cf. object adapters

9
Example Policy
A multithreaded server organized in a
dispatcher/worker model
10
Stateless vs. Stateful Servers
  • Stateless servers
  • Do not keep state on clients and can change their
    own state without informing the client
  • Web servers are the classic example of stateless
    servers
  • Simplifies recovery after crashes
  • Can lead to improved scalability (w.r.t. number
    of clients)
  • Stateful servers
  • Maintain state on each of their clients
  • For example file servers are often (but not
    always) stateful in terms of maintaining
    information on clients (caching status,etc)
  • Makes crash recovery more complex
  • Can lead to performance optimisation

11
Patterns for Distributed Systems Programming
  • The proxy pattern
  • We have already seen the proxy pattern in the
    context of RPC/ RMI
  • A proxy resides in the local address space and
    pretends to be the target (potentially remote)
    object
  • In this way, the proxy can take steps to mask out
    location, access protocol, etc (i.e. implements
    basic distribution transparencies)
  • Smart proxies
  • A smart proxy extends this concept and allows
    arbitrary processing to be carried out, e.g.
    caching
  • This effectively extends the range of
    transparencies that can be supported

12
Patterns (continued)
  • Other key distributed systems patterns
  • Interception
  • Containment
  • Other software patterns with applicability in
    distributed systems, for example
  • Observer (cf. publish-subscribe)
  • Façade (single object simplifying the interface
    to a set of objects)
  • Mediator (provides a unified interface to a set
    of interfaces in a subsystem )
  • Strategy (algorithms can be selected on-the-fly
    at runtime depending on conditions)
  • Pipeline (cf. pipe and filter) consists of a
    chain of elements arranged so that the output of
    each element of the chain is the input of the
    next

See lectures on Aspects and EJB
13
Expected Learning Outcomes
  • At the end of this third unit
  • You should appreciate many of the subtleties and
    possibilities in distributed system design
  • You should have at your disposal a plethora of
    techniques when approaching a distributed systems
    design
  • You should understand the relative benefits of
    2-tiered, 3-tiered and multi-tiered architectures
  • You should understand the potential of
    multi-threaded architectures in the
    implementation of clients and servers
  • You should be able to compare and contrast
    stateless vs. stateful approaches to server
    design
  • You should be aware of a range of patterns as
    applicable to distributed system design
Write a Comment
User Comments (0)
About PowerShow.com