1 Programming systems for distributed applications Seif Haridi KTH/SICS.

Slides:



Advertisements
Similar presentations
DISTRIBUTED COMPUTING PARADIGMS
Advertisements

Mobile Agents Mouse House Creative Technologies Mike OBrien.
A component- and message-based architectural style for GUI software
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 9 Distributed Systems Architectures Slide 1 1 Chapter 9 Distributed Systems Architectures.
Distributed Systems 1 Topics  What is a Distributed System?  Why Distributed Systems?  Examples of Distributed Systems  Distributed System Requirements.
28.2 Functionality Application Software Provides Applications supply the high-level services that user access, and determine how users perceive the capabilities.
Distributed components
Network Operating Systems Users are aware of multiplicity of machines. Access to resources of various machines is done explicitly by: –Logging into the.
Distributed Systems Architectures
Jacob Boston Josh Pfeifer. Definition of HyperText Transfer Protocol How HTTP works How Websites work GoDaddy.com OSI Model Networking.
OCT1 Principles From Chapter One of “Distributed Systems Concepts and Design”
Tcl Agent : A flexible and secure mobile-agent system Paper by Robert S. Gray Dartmouth College Presented by Vipul Sawhney University of Pennsylvania.
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
Software Issues Derived from Dr. Fawcett’s Slides Phil Pratt-Szeliga Fall 2009.
Distributed Systems Architecture Presentation II Presenters Rose Kit & Turgut Tezir.
DISTRIBUTED COMPUTING
C++ fundamentals.
Protocols and the TCP/IP Suite Chapter 4. Multilayer communication. A series of layers, each built upon the one below it. The purpose of each layer is.
Computer System Architectures Computer System Software
Introduction to Distributed Programming Per Brand.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 12 Slide 1 Distributed Systems Architectures.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
Parallel Programming Models Jihad El-Sana These slides are based on the book: Introduction to Parallel Computing, Blaise Barney, Lawrence Livermore National.
Chapter 6 Operating System Support. This chapter describes how middleware is supported by the operating system facilities at the nodes of a distributed.
B.Ramamurthy9/19/20151 Operating Systems u Bina Ramamurthy CS421.
TRƯỜNG ĐẠI HỌC CÔNG NGHỆ Bộ môn Mạng và Truyền Thông Máy Tính.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
Distributed Systems: Concepts and Design Chapter 1 Pages
 Protocols used by network systems are not effective to distributed system  Special requirements are needed here.  They are in cases of: Transparency.
1 Introduction to Middleware. 2 Outline What is middleware? Purpose and origin Why use it? What Middleware does? Technical details Middleware services.
Advanced Computer Networks Topic 2: Characterization of Distributed Systems.
Chapter 15 – Part 2 Networks The Internal Operating System The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
Multiprossesors Systems.. What are Distributed Databases ? “ A Logically interrelated collection of shared data ( and a description of this data) physically.
1 Distributed Programming in Mozart Per Brand. 2 Programming system for distributed applications Design a programming system from the start that is suitable.
OPERATING SYSTEM SUPPORT DISTRIBUTED SYSTEMS CHAPTER 6 Lawrence Heyman July 8, 2002.
CSC 480 Software Engineering Lecture 18 Nov 6, 2002.
DISTRIBUTED COMPUTING. Computing? Computing is usually defined as the activity of using and improving computer technology, computer hardware and software.
Distributed Computing A Programmer’s Perspective.
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
CORBA1 Distributed Software Systems Any software system can be physically distributed By distributed coupling we get the following:  Improved performance.
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture.
1 Client-Server Interaction. 2 Functionality Transport layer and layers below –Basic communication –Reliability Application layer –Abstractions Files.
Definition of a Distributed System (1) A distributed system is: A collection of independent computers that appears to its users as a single coherent system.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
Distributed System Architectures Yonsei University 2 nd Semester, 2014 Woo-Cheol Kim.
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB Markus.
CSC 480 Software Engineering Lecture 17 Nov 4, 2002.
©Ian Sommerville 2000, Tom Dietterich 2001 Slide 1 Distributed Systems Architectures l Architectural design for software that executes on more than one.
Distributed Systems Ryan Chris Van Kevin. Kinds of Systems Distributed Operating System –Offers Transparent View of Network –Controls multiprocessors.
Background Computer System Architectures Computer System Software.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
Operating Systems Distributed-System Structures. Topics –Network-Operating Systems –Distributed-Operating Systems –Remote Services –Robustness –Design.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
CORBA Antonio Vasquez, John Shelton, Nidia, Ruben.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
Distributed Systems Architectures Chapter 12. Objectives  To explain the advantages and disadvantages of different distributed systems architectures.
Distributed Systems Architectures. Topics covered l Client-server architectures l Distributed object architectures l Inter-organisational computing.
Last Class: Introduction
03 – Remote invoaction Request-reply RPC RMI Coulouris 5
Definition of Distributed System
CSC 480 Software Engineering
#01 Client/Server Computing
Client-Server Interaction
Ch > 28.4.
Distributed Systems Bina Ramamurthy 11/30/2018 B.Ramamurthy.
Distributed Systems Bina Ramamurthy 12/2/2018 B.Ramamurthy.
#01 Client/Server Computing
Presentation transcript:

1 Programming systems for distributed applications Seif Haridi KTH/SICS

2 A distributed system is set of processes, linked by a network No global information, no global time Unpredictable communication delays Concurrency and nondeterminism Large probability of localized faults Easy access by unauthorized users What are the properties of global distributed systems?

3 Additional Properties of the Internet A global network that is partitioned into several protection domains (Firewalls) Private sub networks with multiple reassignment of IP addresses across networks Dynamic reassignment of IP addresses -- ISP’s reuse a pool of IP addresses among customers

4 Middleware for distributed global applications The middleware abstracts the complexity of the underlying system and provides the services of the OS to the application programmer. The middleware should support the distribution structure, scalability, openness, failure handling and security issues. Provides transparency (network and location) as much as possible or as desirable. The Network The operating system The middleware The applications

5 The middleware as a programming system for distributed applications Design a programming system from the start that is suitable for distributed applications (Oz language and its system Mozart) Extend an existing programming system with libraries to support distributed computing (JAVA) Provide an distribution layer that is language independent (CORBA), this layer might be needed anyway for communication with foreign software.

6 Programming system for distributed applications The programming language by design provides abstractions necessary for distributed applications: –Concurrency and various communication abstraction –Mobility of code (or more generally closures) and other entities –Mechanisms for security at the language level -- the programming language by construction support all the concept needed for allowing arbitrary security levels (no holes) –Notion of sited resources, how to plug and unplug resources –Notion of a distributed/mobile component (for mobility of applications) –Dynamic connectivity, transfer of entities and modification of various applications at runtime –Abstraction of the network transport media

7 Programming system for distributed applications The programming system (runtime system) by design provides mechanisms to support: –Network transparency –Well defined and extended distributed behavior for all language entities -- part of network awareness. –Mechanisms for guaranteeing security on untrusted sites (fake implementations) –Mechanism for limiting resource (memory and processor time) consumption by foreign computations at runtime –Network layer that supports location transparency (mobile applications) (multiple) IP independent addressing –Configurable and scalable network layer (multiple protocols, TCP, TTCP, Reliable UDP, …) –Dynamic connectivity, fault/ connectivity detection –Firewall enabled

8 The programming system (runtime system) Network layer Memory management layer Protocol layer Extended engine } Shared computation space Distributed garbage collection } Distribution protocols } Local execution is here Network Transport Level Messages between distributed nodes Messages between threads and nodes Structured Messages Raw byte sequence

9 The issues in distributed programming Functionality Fault tolerance Distribution Openness Resource Control Security Scalability

10 The issues in distributed programming Functionality Fault tolerance Part of problem Interaction Distribution Openness Resource Control Security Scalability

11 The issues in distributed programming Functionality Fault tolerance Part of problem Interaction Distribution Security Openness Resource Control Functionality Distribution Openness Security Resource Control Fault tolerance Scalability

12 Network transparency It means: –If you develop an application on a single machine, you can distribute the entities to different sites without changing the logical behavior (functionality/semantics) of the application –If you connect to independent applications together they will logically behave as if they were running on a single machine. It does not means that you loose control over your applications However network transparency breaks when faults (network partitioning) occurs. Therefore awareness is also needed. The role of fault detection is to reflect abstracted failure to allow the programmer to develop fault tolerance mechanisms.

13 Application Logic Graphic Entities BS DB CMWMCMWM Board Server Display Broadcaster CM - Client Manager WM- Window Manager

14 Transparent distribution Graphic Entities BS DB CMWMCMWM Board Server Display Broadcaster CM - Client Manager WM- Window Manager

15 Network-transparency and scalability Distributed servers Services User Connector User

16 Programming systems for distributed applications The programming language by design provides abstractions necessary for distributed applications: –Concurrency and various communication abstractions –Mobility of code (or more generally closures) and other entities –Mechanisms for security at the language level -- the programming language by construction support all the concept needed for allowing arbitrary security levels (no holes) –Notion of sited resources, how to plug and unplug resources –Notion of a distributed/mobile component (for mobility of applications) –Dynamic connectivity, transfer of entities and modification of various applications at runtime –Abstraction of the network transport media

17 Language Entities records, procedures, classes objects single-assignment variable cells ports, threads functors, components Concurrency and asynchronous communication abstractions are important to hide latency in distributed applications Cheap light weight threads are necessary combined with dataflow synchronization to overlap computation and communication time T 1 : m(X) T 0 : …X… T0T0 X=Value Object

18 Language Entities records, procedures, classes objects single-assignment variable cells ports, threads functors, components Concurrency and asynchronous communication abstractions are important to hide latency in distributed applications Just use Ports for asynchronous communication, no thread creation time T 0 : send m(X) to P T 0 : …X… T0T0 X=Value receive m invoke Object

19 JAVA’s remote method invocation JAVA’s basic mechanism for communication is extending the sequential method invocation into invocation on remote objects It is possible to create a thread, but it is both expensive and synchronization with the main thread is awkard A future abstraction has to programmed explicitly combined with the call-back in a separate thread time T 0 : invoke m(X) to object T 0 : …X… T0T0 X=Value Object

20 Language Entities records, procedures, classes objects single-assignment variable cells ports, threads functors, components Mobility of code (or more generally closures) and other entities Every entity in the language is a runtime value (access by reference not by a string) In particular procedures and classes are values that can be sent in a message, or given as a parameter to remote invocation No name collision at remote site C variable send m(.) to O

21 Distributed Lexical Scoping/ Mobility C variable send m(.) to site 2 E2 E1E1 E1E1 C variable E2 E1E1 E1E1 Site 1 Site 2

22 Advantages of distributed lexical scoping Distribution transparency under procedure/class/object mobility –programs can be tested and understood on one site, and behave the same when distributed on different sites Security, given correct implementation: –a procedure transferred to a site will not accidentally acquire unauthorized access to entities residing on the site. –Can easily implement capability based security, allowing subset of possible operations on an entity Example a procedure referring to a file object, only allowing reads

23 Programming system for distributed applications The programming system (runtime system) by design provides mechanisms to support: –Network transparency –Well defined and extended distributed behavior for all language entities -- part of network awareness. –Mechanisms for guaranteeing security on untrusted sites (fake implementations) –Mechanism for limiting resource (memory and processor time) consumption by foreign computations at runtime –Network layer that supports location transparency (mobile applications) (multiple) IP independent addressing –Configurable and scalable network layer (multiple protocols, TCP, TTCP, Reliable UDP, …) –Dynamic connectivity, fault/ connectivity detection –Firewall enabled

24 Distributed behavior StatelessReplicationEager Lazy record, procedure, class object-record Single assignment Eager elimination single assign. variable StatefulLocalizationMobile Stationary cell, object-state port, thread resourcesPrivate

25 System support Object could not be copied by value as in JAVA because this will loose transperancy Object could be either stationary, or mobile with a consistency protocol that is fault tolerant. Mozart support both.

26 Resource Security with distributed components requires Open.file Open New Module Manager I do not trust you You can only read/write in TEMP Imported to site

27 Conclusions I have shown that making a programming language distributed (Internet ready!) is not just a taking a centralized language and extending it with a distribution layer. The design should take distribution into account from scratch. I have just touched upon the subject, the topic I did not cover are just as important. Look at the mozart demo, where you would also see the distributed component architecture where new functionality can be added on the fly and make available to all participants in a Mozart instant messenger (ICQ like) Internet service.