Distributed Computing: Concepts, Environments, and Technologies - CMSC 433 by Alan Sussman, Study notes of Programming Languages

A collection of notes from the cmsc 433: programming language technology and paradigms course taught by alan sussman at the university of maryland during the fall 2001 semester. The notes cover various topics related to distributed computing, including different types of distributed computing environments, addressing objects, latency, partial failure, concurrency, and technologies like rmi and corba.

Typology: Study notes

Pre 2010

Uploaded on 02/13/2009

koofers-user-oz9
koofers-user-oz9 🇺🇸

5

(1)

10 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CMSC 433, Alan Sussman, U. Maryland (via
Bill Pugh) 1
CMSC433, Spring 2001
Programming Language
Technology and Paradigms
Distributed Computing
Alan Sussman
October 30, 2001
CMSC 433, Fall 2001 -Alan Sussman 2
Administrivia
Grading info for Project 2 posted today
Commentary for Project 3 due Wednesday,
November 14
programs sent out yesterday
questions about Project 3 design?
Project 4
due next Wednesday, November 7
Read Ch. 15, pages 980-989, in Eckel
Readings web page also has additional distributed
computing and CORBA readings
CMSC 433, Fall 2001 -Alan Sussman 3
Last time
RMI
Stubs
Remote objects and interfaces
RMIregistry
for bootstrapping (Naming.lookup(), Naming.bind())
CMSC 433, Fall 2001 -Alan Sussman 4
Is distributing computing
different?
What kinds of distributed computing
environments exist?
Ways in which distributed computing is
different
Addressing objects
Latency
Partial failure
Concurrency
CMSC 433, Fall 2001 -Alan Sussman 5
Distributed computing
environments
Usually refers to multiple CPUs
Interprocessor communication via shared
address space or message passing?
On same chip, in same room, or across the
Internet?
latency, failure modes
CMSC 433, Fall 2001 -Alan Sussman 6
Existing environments
Seti @ Home, Entropia
Server for search engine
My laptop, PDA, cell phone, MP3 player,
digital camera,
pf3
pf4
pf5

Partial preview of the text

Download Distributed Computing: Concepts, Environments, and Technologies - CMSC 433 by Alan Sussman and more Study notes Programming Languages in PDF only on Docsity!

CMSC 433, Alan Sussman, U. Maryland (via

CMSC433, Spring 2001

Programming Language

Technology and Paradigms

Distributed Computing

Alan Sussman

October 30, 2001

CMSC 433, Fall 2001 - Alan Sussman 2

Administrivia

  • Grading info for Project 2 posted today
  • Commentary for Project 3 due Wednesday, November 14 - programs sent out yesterday - questions about Project 3 design?
  • Project 4
    • due next Wednesday, November 7
  • Read Ch. 15, pages 980-989, in Eckel
    • Readings web page also has additional distributed computing and CORBA readings

CMSC 433, Fall 2001 - Alan Sussman 3

Last time

  • RMI
    • Stubs
    • Remote objects and interfaces
    • RMIregistry
      • for bootstrapping (Naming.lookup(), Naming.bind())

CMSC 433, Fall 2001 - Alan Sussman 4

Is distributing computing

different?

  • What kinds of distributed computing

environments exist?

  • Ways in which distributed computing is

different

  • Addressing objects
  • Latency
  • Partial failure
  • Concurrency

CMSC 433, Fall 2001 - Alan Sussman 5

Distributed computing

environments

  • Usually refers to multiple CPU’s
  • Interprocessor communication via shared

address space or message passing?

  • On same chip, in same room, or across the

Internet?

  • latency, failure modes

CMSC 433, Fall 2001 - Alan Sussman 6

Existing environments

  • Seti @ Home, Entropia
  • Server for search engine
  • My laptop, PDA, cell phone, MP3 player,

digital camera, …

CMSC 433, Alan Sussman, U. Maryland (via

CMSC433, Spring 2001

Programming Language

Technology and Paradigms

Distributed Computing

Alan Sussman

November 1, 2001

CMSC 433, Fall 2001 - Alan Sussman 8

Administrivia

  • Project 4
    • due Wednesday, November 7
    • servers also running on hyena.cs.umd.edu and candida.cs.umd.edu
    • Issues
      • MessageListener
      • Synchronization on callbacks
      • Duplicate messages
  • 2nd^ midterm date to be moved back, to either Nov. 13 or 15 - new date will be posted today, and practice exam will be posted next week

CMSC 433, Fall 2001 - Alan Sussman 9

Last time

  • RMI Chat Server example
  • Distributed Computing issues
    • addressing/naming objects
    • latency
    • partial failure
    • concurrency

CMSC 433, Fall 2001 - Alan Sussman 10

Types of failure

  • Machine sleeps
    • wakes up, recovers state
  • Machine crash or failure
    • machine may reboot and rejoin
  • Network partition
    • network may heal

CMSC 433, Fall 2001 - Alan Sussman 11

Uniform view of distributed

objects

  • Some objects are remote, some are local
    • Doesn’t really matter to user of object
    • Objects might transparently migrate
  • Design doesn’t have to take object distribution into account
  • Failure and performance issues don’t belong in the design
  • The interface doesn’t change if an object is remote

CMSC 433, Fall 2001 - Alan Sussman 12

Uniform view

  • Not appropriate for
    • wide area networks,
    • consumer electronics,
    • portable devices
  • Appropriate for some local area networks
    • but robust distributed applications plan for failure
    • even if all objects local
    • means in interfaces, not just implementation

CMSC 433, Alan Sussman, U. Maryland (via

CMSC 433, Fall 2001 - Alan Sussman 19

Latency

  • Making a call to an object on a remote

machine is much more expensive than a

local call

  • several orders of magnitude
  • Leading to overall system performance

problems if there are “too many” remote

calls

CORBA

CMSC 433, Fall 2001 - Alan Sussman 21

RPC

  • CORBA provides language-independent remote procedure call (RPC) capability - e.g., client/server implemented in Java/C++
  • Not a language feature
    • an integration technology
    • software systems can be implemented to be CORBA- compliant
  • Very complex spec
    • current architecture and specification document is 712 pages – see www.omg.org CMSC 433, Fall 2001 - Alan Sussman 22

Fundamentals

  • Object Management Architecture (OMA)
    • spec for object interoperability
    • Core Object Model
      • what is an object, an interface, an operation, etc.
    • OMA Reference Architecture
      • underlying infrastructure to allow objects to interoperate
      • includes Object Request Broker (ORB), Object Services

CMSC 433, Fall 2001 - Alan Sussman 23

ORB

  • Communication process through which

objects request services from other objects

  • provides location independence
  • naming service
  • everything needed to set up and then perform an RPC - to connect the client to the server

CMSC 433, Fall 2001 - Alan Sussman 24

Interface Definition Language

  • IDL is a language-independent way to

specify data types, attributes, operations

(methods), interfaces, etc.

  • syntax similar to C++ or Java
  • includes inheritance (with : , like C++)
  • IDL compiled by language-specific compiler into stubs and skeletons for that language - to marshal/unmarshal arguments and return values, and implement the remote call

CMSC 433, Alan Sussman, U. Maryland (via

CMSC 433, Fall 2001 - Alan Sussman 25

IDL (cont.)

Method Method Member function

Interface Interface Pure abstract class

Module Package Namespace

CORBA IDL Java C++

CMSC 433, Fall 2001 - Alan Sussman 26

Naming service

  • Like the registry in RMI
    • a component of the OMA
  • CORBA objects accessed through references, just as in Java
  • Naming service provides a way to map a string to an object reference (and vice versa) - like java.rmi.Naming.lookup () - runs as a separate process, like RMIregistry
  • CORBA example in Eckel

CMSC 433, Fall 2001 - Alan Sussman 27

CORBA vs. RMI

  • Both support RPC
  • But CORBA makes possible RPC between objects implemented in any language - that has an IDL compiler implemented
  • An alternative to CORBA is to wrap a Java object around the non-Java code, then use RMI - requires wrapper to be able to connect to the non-Java code, for example via JNI (Java Native Interface) - then don’t need ORB CMSC 433, Fall 2001 - Alan Sussman 28

Using an IDL

  • Some types are straightforward
    • e.g., int
    • Sizes of ints defined
  • Others are more complicated
    • Hash-table
    • Union types

CMSC 433, Fall 2001 - Alan Sussman 29

Methods in IDL

  • Each parameter can be
    • in
    • out
    • in/out

CMSC 433, Fall 2001 - Alan Sussman 30

IDL Features

  • modules (e.g., packages/namespaces)
  • interfaces
  • methods
  • attributes
  • inheritance (i.e., subtyping?)
  • arrays
  • sequence
  • struct, enum, union, typedef
  • consts
  • exceptions