How To Write A Network Operating System For A Network (Networking) System (Netware)



Similar documents
Code and Process Migration! Motivation!

Communication. Layered Protocols. Topics to be covered. PART 1 Layered Protocols Remote Procedure Call (RPC) Remote Method Invocation (RMI)

A distributed system is defined as

Chapter 2: Remote Procedure Call (RPC)

Virtual machine interface. Operating system. Physical machine interface

COMMMUNICATING COOPERATING PROCESSES

CHAPTER 2 MODELLING FOR DISTRIBUTED NETWORK SYSTEMS: THE CLIENT- SERVER MODEL

CS550. Distributed Operating Systems (Advanced Operating Systems) Instructor: Xian-He Sun

2.1 What are distributed systems? What are systems? Different kind of systems How to distribute systems? 2.2 Communication concepts

Client/Server Computing Distributed Processing, Client/Server, and Clusters

How To Understand The Concept Of A Distributed System

SOFT 437. Software Performance Analysis. Ch 5:Web Applications and Other Distributed Systems

Distributed Operating Systems

Distributed Systems. REK s adaptation of Prof. Claypool s adaptation of Tanenbaum s Distributed Systems Chapter 1

Agenda. Distributed System Structures. Why Distributed Systems? Motivation

Middleware Lou Somers

Chapter 11 Distributed File Systems. Distributed File Systems

It is the thinnest layer in the OSI model. At the time the model was formulated, it was not clear that a session layer was needed.

Distributed Systems LEEC (2005/06 2º Sem.)

Distributed Objects and Components

Chapter 16 Distributed Processing, Client/Server, and Clusters

Middleware and Distributed Systems. Introduction. Dr. Martin v. Löwis

Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme. Middleware. Chapter 8: Middleware

COMP5426 Parallel and Distributed Computing. Distributed Systems: Client/Server and Clusters

Chapter 6. CORBA-based Architecture. 6.1 Introduction to CORBA 6.2 CORBA-IDL 6.3 Designing CORBA Systems 6.4 Implementing CORBA Applications

B) Using Processor-Cache Affinity Information in Shared Memory Multiprocessor Scheduling

Dr Markus Hagenbuchner CSCI319. Distributed Systems

Network File System (NFS) Pradipta De

Socket = an interface connection between two (dissimilar) pipes. OS provides this API to connect applications to networks. home.comcast.

Infrastructure that supports (distributed) componentbased application development

Middleware: Past and Present a Comparison

Network Attached Storage. Jinfeng Yang Oct/19/2015

Basics. Topics to be covered. Definition of a Distributed System. Definition of a Distributed System

ΗΜΥ 656 ΠΡΟΧΩΡΗΜΕΝΗ ΑΡΧΙΤΕΚΤΟΝΙΚΗ ΗΛΕΚΤΡΟΝΙΚΩΝ ΥΠΟΛΟΓΙΣΤΩΝ Εαρινό Εξάμηνο 2007

A Java-based system support for distributed applications on the Internet

Chapter 3. Internet Applications and Network Programming

Lesson 4 Web Service Interface Definition (Part I)

Transparent Redirection of Network Sockets 1

How To Make A Distributed System Transparent

Web Services. Copyright 2011 Srdjan Komazec

Distribution transparency. Degree of transparency. Openness of distributed systems

Introduction CORBA Distributed COM. Sections 9.1 & 9.2. Corba & DCOM. John P. Daigle. Department of Computer Science Georgia State University

Distributed System: Definition

1.4 SOFTWARE CONCEPTS

COSC 6374 Parallel Computation. Parallel I/O (I) I/O basics. Concept of a clusters

File Transfer And Access (FTP, TFTP, NFS) Chapter 25 By: Sang Oh Spencer Kam Atsuya Takagi

First Workshop on Open Source and Internet Technology for Scientific Environment: with case studies from Environmental Monitoring

Distributed Systems Principles and Paradigms. Chapter 04: Communication. 4.1 Layered Protocols. Basic networking model.

We mean.network File System

Network Programming TDC 561

Client/Server and Distributed Computing

Report of the case study in Sistemi Distribuiti A simple Java RMI application

Amoeba Distributed Operating System

Symmetric Multiprocessing

Tier Architectures. Kathleen Durant CS 3200

Software Concepts. Uniprocessor Operating Systems. System software structures. CIS 505: Software Systems Architectures of Distributed Systems

Distributed File Systems

Introduction to Computer Networks

Motivation Definitions EAI Architectures Elements Integration Technologies. Part I. EAI: Foundations, Concepts, and Architectures

Event-based middleware services

Lecture 7: Java RMI. CS178: Programming Parallel and Distributed Systems. February 14, 2001 Steven P. Reiss

COSC 6374 Parallel Computation. Parallel I/O (I) I/O basics. Concept of a clusters

Chapter 18: Database System Architectures. Centralized Systems

APPLICATION CODE APPLICATION CODE S ERVER PROCESS STUB STUB RPC RUNTIME LIBRARY RPC RUNTIME LIBRARY ENDPOINT MAP ENDPOINT MAP

Tools Page 1 of 13 ON PROGRAM TRANSLATION. A priori, we have two translation mechanisms available:

Distributed Systems. Distributed Systems

The Service Availability Forum Specification for High Availability Middleware

Objectives of Lecture. Network Architecture. Protocols. Contents

Transparent Redirection of Network Sockets 1

Ethernet. Ethernet. Network Devices

The Service Revolution software engineering without programming languages

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

A Transport Protocol for Multimedia Wireless Sensor Networks

Module 17. Client-Server Software Development. Version 2 CSE IIT, Kharagpur

Mobile Application Languages XML, Java, J2ME and JavaCard Lesson 04 Java

Automatic load balancing and transparent process migration

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

Elements of Advanced Java Programming

Challenges and Opportunities for formal specifications in Service Oriented Architectures

Distributed File Systems. Chapter 10

Object Oriented Database Management System for Decision Support System.

Principles and characteristics of distributed systems and environments

Computer Network. Interconnected collection of autonomous computers that are able to exchange information

PERFORMANCE COMPARISON OF COMMON OBJECT REQUEST BROKER ARCHITECTURE(CORBA) VS JAVA MESSAGING SERVICE(JMS) BY TEAM SCALABLE

Chapter 2: Processes, Threads, and Agents

Chapter 11: File System Implementation. Operating System Concepts with Java 8 th Edition

Transport Layer Protocols

Distributed Systems Lecture 1 1

Client-Server Architecture

COM 440 Distributed Systems Project List Summary

Transcription:

Otwarte Studium Doktoranckie 1 Adaptable Service Oriented Architectures Krzysztof Zieliński Department of Computer Science AGH-UST Krakow Poland

Otwarte Studium Doktoranckie 2 Agenda DCS SOA WS MDA OCL ODA AC SOKU

Otwarte Studium Doktoranckie 3 Introduction to DCS

Otwarte Studium Doktoranckie 4 Definition of a Distributed System Tanenbaum & Van Renesse (1985) A distributed operating system is one that looks to its users like an ordinary centrialized operation system, but runs on multiple, independent CPUs. The key concept here is transparency, in other words, the use of multiple processors should be invisible (transparent) to the user. Another way of expressing the same idea is to say that the user views the system as a virtual uniprocessor, not as a collection of distinct machines.

Otwarte Studium Doktoranckie 5 Transparency in a Distributed System Transparency Access Location Migration Relocation Replication Concurrency Failure Persistence Description Hide differences in data representation and how a resource is accessed Hide where a resource is located Hide that a resource may move to another location Hide that a resource may be moved to another location while in use Hide that a resource may be shared by several competitive users Hide that a resource may be shared by several competitive users Hide the failure and recovery of a resource Hide whether a (software) resource is in memory or on disk Different forms of transparency in a distributed system.

Otwarte Studium Doktoranckie 6 Multicomputer Operating Systems 1.14

Otwarte Studium Doktoranckie 7 Network Operating System 1-19

Otwarte Studium Doktoranckie 8 Network Operating System Employs a client-server model Minimal OS kernel Additional functionality as user processes 1-20

Otwarte Studium Doktoranckie 9 Middleware-based Systems General structure of a distributed system as middleware. 1-22

Otwarte Studium Doktoranckie 10 Communication Protocols Protocols are agreements/rules on communication Protocols could be connection-oriented or connectionless 2-1 Socket Interface

Otwarte Studium Doktoranckie 11 Communication Issues Message-oriented communication Persistence and synchronicity

Otwarte Studium Doktoranckie 12 Persistence Persistent communication Messages are stored until (next) receiver is ready Examples: email, pony express

Otwarte Studium Doktoranckie 13 Persistence Transient communication Message is stored only so long as sending/receiving application are executing Discard message if it can t be delivered to next server/receiver Example: transport-level communication services offer transient communication Example: Typical network router discard message if it can t be delivered next router or destination

Otwarte Studium Doktoranckie 14 Synchronicity Asynchronous communication Sender continues immediately after it has submitted the message Need a local buffer at the sending host Synchronous communication Sender blocks until message is stored in a local buffer at the receiving host or actually delivered to receiver Variant: block until receiver processes the message Six combinations of persistence and synchronicity

Otwarte Studium Doktoranckie 15 Persistence and Synchronicity Combinations 2-22.1 a) Persistent asynchronous communication (e.g., email) b) Persistent synchronous communication

Otwarte Studium Doktoranckie 16 Persistence and Synchronicity Combinations 2-22.2 c) Transient asynchronous communication (e.g., UDP) d) Receipt-based transient synchronous communication

Otwarte Studium Doktoranckie 17 Persistence and Synchronicity Combinations e) Delivery-based transient synchronous communication at message delivery (e.g., asynchronous RCP) f) Response-based transient synchronous communication (RPC)

Otwarte Studium Doktoranckie 18 Issues in Client-Server Communication Addressing Blocking versus non-blocking Buffered versus unbuffered Reliable versus unreliable Server architecture: concurrent versus sequential Scalability

Otwarte Studium Doktoranckie 19 Addressing Issues Question: how is the server located? Hard-wired address Machine address and process address are known a priori Broadcast-based Server chooses address from a sparse address space Client broadcasts request Can cache response for future Locate address via name server user user NS user server server server

Otwarte Studium Doktoranckie 20 Blocking versus Non-blocking Blocking communication (synchronous) Send blocks until message is actually sent Receive blocks until message is actually received Non-blocking communication (asynchronous) Send returns immediately Return does not block either Examples:

Otwarte Studium Doktoranckie 21 Buffering Issues Unbuffered communication Server must call receive before client can call send user server Buffered communication Client send to a mailbox Server receives from a mailbox user server

Otwarte Studium Doktoranckie 22 Reliability Unreliable channel Need acknowledgements (ACKs) Applications handle ACKs User request ACK reply ACK Server ACKs for both request and reply Reliable channel Reply acts as ACK for request Explicit ACK for response Reliable communication on unreliable channels User request reply ACK Server Transport protocol handles lost messages

Otwarte Studium Doktoranckie 23 Remote Procedure Calls Goal: Make distributed computing look like centralized computing Allow remote services to be called as procedures Transparency with regard to location, implementation, language Issues How to pass parameters Bindings Semantics in face of errors Two classes: integrated into prog, language and separate

Otwarte Studium Doktoranckie 24 Conventional Procedure Call a) Parameter passing in a local procedure call: the stack before the call to read b) The stack while the called procedure is active

Otwarte Studium Doktoranckie 25 Parameter Passing Local procedure parameter passing Call-by-value Call-by-reference: arrays, complex data structures Remote procedure calls simulate this through: Stubs proxies Flattening marshalling Related issue: global variables are not allowed in RPCs

Otwarte Studium Doktoranckie 26 Client and Server Stubs Principle of RPC between a client and server program.

Otwarte Studium Doktoranckie 27 Stubs Client makes procedure call (just like a local procedure call) to the client stub Server is written as a standard procedure Stubs take care of packaging arguments and sending messages Packaging is called marshalling Stub compiler generates stub automatically from specs in an Interface Definition Language (IDL) Simplifies programmer task

Otwarte Studium Doktoranckie 28 Steps of a Remote Procedure Call 1. Client procedure calls client stub in normal way 2. Client stub builds message, calls local OS 3. Client's OS sends message to remote OS 4. Remote OS gives message to server stub 5. Server stub unpacks parameters, calls server 6. Server does work, returns result to the stub 7. Server stub packs it in message, calls local OS 8. Server's OS sends message to client's OS 9. Client's OS gives message to client stub 10. Stub unpacks result, returns to client

Otwarte Studium Doktoranckie 29 Example of an RPC 2-8

Otwarte Studium Doktoranckie 30 Marshalling Problem: different machines have different data formats Intel: little endian, SPARC: big endian Solution: use a standard representation Example: external data representation (XDR) Problem: how do we pass pointers? If it points to a well-defined data structure, pass a copy and the server stub passes a pointer to the local copy What about data structures containing pointers? Prohibit Chase pointers over network Marshalling: transform parameters/results into a byte stream

Otwarte Studium Doktoranckie 31 Binding Problem: how does a client locate a server? Use Bindings Server Export server interface during initialization Send name, version no, unique identifier, handle (address) to binder Client First RPC: send message to binder to import server interface Binder: check to see if server has exported interface Return handle and unique identifier to client

Otwarte Studium Doktoranckie 32 Binding: Comments Exporting and importing incurs overheads Binder can be a bottleneck Use multiple binders Binder can do load balancing

Otwarte Studium Doktoranckie 33 Failure Semantics Client unable to locate server: return error Lost request messages: simple timeout mechanisms Lost replies: timeout mechanisms Make operation idempotent Use sequence numbers, mark retransmissions Server failures: did failure occur before or after operation? At least once semantics (SUNRPC) At most once No guarantee Exactly once: desirable but difficult to achieve

Otwarte Studium Doktoranckie 34 Failure Semantics Client failure: what happens to the server computation? Referred to as an orphan Extermination: log at client stub and explicitly kill orphans Overhead of maintaining disk logs Reincarnation: Divide time into epochs between failures and delete computations from old epochs Gentle reincarnation: upon a new epoch broadcast, try to locate owner first (delete only if no owner) Expiration: give each RPC a fixed quantum T; explicitly request extensions Periodic checks with client during long computations

Otwarte Studium Doktoranckie 35 Asynchronous RPC 2-12 a) The interconnection between client and server in a traditional RPC b) The interaction using asynchronous RPC

Otwarte Studium Doktoranckie 36 Deferred Synchronous RPC A client and server interacting through two asynchronous RPCs 2-13

Otwarte Studium Doktoranckie 37 Remote Method Invocation (RMI) RPCs applied to objects, i.e., instances of a class Class: object-oriented abstraction; module with data and operations Separation between interface and implementation Interface resides on one machine, implementation on another RMIs support system-wide object references Parameters can be object references

Otwarte Studium Doktoranckie 38 Distributed Objects When a client binds to a distributed object, load the interface ( proxy ) into client address space Proxy analogous to stubs Server stub is referred to as a skeleton

Otwarte Studium Doktoranckie 39 Proxies and Skeletons Proxy: client stub Maintains server ID, endpoint, object ID Sets up and tears down connection with the server [Java:] does serialization of local object parameters In practice, can be downloaded/constructed on the fly (why can t this be done for RPCs in general?) Skeleton: server stub Does deserialization and passes parameters to server and sends result to proxy

Otwarte Studium Doktoranckie 40 Binding a Client to an Object Distr_object* obj_ref; obj_ref = ; obj_ref-> do_something(); Distr_object obj_ref; Local_object* obj_ptr; obj_ref = ; obj_ptr = bind(obj_ref); obj_ptr -> do_something(); (a) (b) //Declare a systemwide object reference // Initialize the reference to a distributed object // Implicitly bind and invoke a method //Declare a systemwide object reference //Declare a pointer to local objects //Initialize the reference to a distributed object //Explicitly bind and obtain a pointer to the local proxy //Invoke a method on the local proxy a) (a) Example with implicit binding using only global references b) (b) Example with explicit binding using global and local references

Otwarte Studium Doktoranckie 41 Parameter Passing RMI is less restrictive than RPCs. Supports system-wide object references [Java] pass local objects by value, pass remote objects by reference

Otwarte Studium Doktoranckie 42 Code and Process Migration Motivation How does migration occur? Resource migration Agent-based system Details of process migration

Otwarte Studium Doktoranckie 43 Motivation Key reasons: performance and flexibility Process migration (aka strong mobility) Improved system-wide performance better utilization of system-wide resources Examples: Condor, DQS Code migration (aka weak mobility) Shipment of server code to client filling forms (reduce communication, no need to pre-link stubs with client) Ship parts of client application to server instead of data from server to client (e.g., databases) Improve parallelism agent-based web searches

Otwarte Studium Doktoranckie 44 Motivation Flexibility Dynamic configuration of distributed system Clients don t need preinstalled software download on demand

Otwarte Studium Doktoranckie 45 Migration models Process = code seg + resource seg + execution seg Weak versus strong mobility Weak => transferred program starts from initial state Sender-initiated versus receiver-initiated Sender-initiated (code is with sender) Client sending a query to database server Client should be pre-registered Receiver-initiated Java applets Receiver can be anonymous

Otwarte Studium Doktoranckie 46 Who executed migrated entity? Code migration: Execute in a separate process [Applets] Execute in target process Process migration Remote cloning Migrate the process

Otwarte Studium Doktoranckie 47 Models for Code Migration Alternatives for code migration.

Otwarte Studium Doktoranckie 48 Do Resources Migrate? Depends on resource to process binding By identifier: specific web site, ftp server By value: Java libraries By type: printers, local devices Depends on type of attachments Unattached to any node: data files Fastened resources (can be moved only at high cost) Database, web sites Fixed resources Local devices, communication end points

Otwarte Studium Doktoranckie 49 Resource Migration Actions Resource-to machine binding Unattached Fastened Fixed Process-toresource binding By identifier By value By type MV (or GR) CP ( or MV, GR) RB (or GR, CP) GR (or MV) GR (or CP) RB (or GR, CP) GR GR RB (or GR) Actions to be taken with respect to the references to local resources when migrating code to another machine. GR: establish global system-wide reference MV: move the resources CP: copy the resource RB: rebind process to locally available resource

Otwarte Studium Doktoranckie 50 Migration in Heterogeneous Systems Systems can be heterogeneous (different architecture, OS) Support only weak mobility: recompile code, no run time information Strong mobility: recompile code segment, transfer execution segment [migration stack] Virtual machines - interpret source (scripts) or intermediate code [Java]

Otwarte Studium Doktoranckie 51 END Lecture 1