Distributed Computing & Middleware Background on the golang stuff that Jeromy presented Info on CptS 464.

Slides:



Advertisements
Similar presentations
COM vs. CORBA.
Advertisements

CSE 486/586 Distributed Systems Remote Procedure Call
RPC Robert Grimm New York University Remote Procedure Calls.
Jaringan Informasi Pengantar Sistem Terdistribusi oleh Ir. Risanuri Hidayat, M.Sc.
Tam Vu Remote Procedure Call CISC 879 – Spring 03 Tam Vu March 06, 03.
Remote Procedure CallCS-4513, D-Term Remote Procedure Call CS-4513 Distributed Computing Systems (Slides include materials from Operating System.
INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 9 Prof. Crista Lopes.
The road to reliable, autonomous distributed systems
Objektorienteret Middleware Presentation 2: Distributed Systems – A brush up, and relations to Middleware, Heterogeneity & Transparency.
Remote Method Invocation Chin-Chih Chang. Java Remote Object Invocation In Java, the object is serialized before being passed as a parameter to an RMI.
Tutorials 2 A programmer can use two approaches when designing a distributed application. Describe what are they? Communication-Oriented Design Begin with.
CORBA Case Study By Jeffrey Oliver March March 17, 2003CORBA Case Study by J. T. Oliver2 History The CORBA (Common Object Request Broker Architecture)
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 5: Distributed Objects.
Distributed Systems & Networks i206 Fall 2010 John Chuang Some slides adapted from Coulouris, Dollimore and Kindberg.
.NET Mobile Application Development Remote Procedure Call.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
CORBA Celsina Bignoli Enterprise Computing Corporation have similar computing environments: –mixed set of HW platforms –a mixed set.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Other Topics RPC & Middleware.
1 Chapter 38 RPC and Middleware. 2 Middleware  Tools to help programmers  Makes client-server programming  Easier  Faster  Makes resulting software.
CSE 486/586 CSE 486/586 Distributed Systems Remote Procedure Call Steve Ko Computer Sciences and Engineering University at Buffalo.
Communication Tran, Van Hoai Department of Systems & Networking Faculty of Computer Science & Engineering HCMC University of Technology.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
11 September 2008CIS 340 # 1 Topics To examine the variety of approaches to handle the middle- interaction (continued) 1.RPC-based systems 2.TP monitors.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W. Grundke.
1 Introduction to Middleware. 2 Outline What is middleware? Purpose and origin Why use it? What Middleware does? Technical details Middleware services.
CORBA/IDL Common Object Resource Broker Architecture (CORBA) Interface Definition Language (IDL) Object Management Group (OMG) ( Specification.
Systems Prog. & Script. - Heriot Watt Univ 1 Systems Programming & Scripting Lecture 11: The Distributed Object Model.
1 Lecture 5 (part2) : “Interprocess communication” n reasons for process cooperation n types of message passing n direct and indirect message passing n.
RMI Remote Method Invocation Distributed Object-based System and RPC Together 2-Jun-16.
Distributed Objects and Middleware. Sockets and Ports Source: G. Coulouris et al., Distributed Systems: Concepts and Design.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved RPC Tanenbaum.
CSE 451: Operating Systems Winter 2015 Module 22 Remote Procedure Call (RPC) Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
Presented By:- Sudipta Dhara Roll Table of Content Table of Content 1.Introduction 2.How it evolved 3.Need of Middleware 4.Middleware Basic 5.Categories.
CS 501: Software Engineering Fall 1999 Lecture 12 System Architecture III Distributed Objects.
Shuman Guo CSc 8320 Advanced Operating Systems
G.v. Bochmann, revised Jan Comm Systems Arch 1 Different system architectures Object-oriented architecture (only objects, no particular structure)
Remote Method Invocation A Client Server Approach.
Middleware Department of Computer Science Southern Illinois University Edwardsville Spring, 2016 Dr. Hiroshi Fujinoki Middleware/001.
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
Distributed Computing
CSE 486/586 Distributed Systems Remote Procedure Call
CORBA Alegria Baquero.
#01 Client/Server Computing
Distributed Computing & Middleware
Middleware in Context Prof. Dave Bakken Cpt. S 464/564 Lecture
CSE 451: Operating Systems Winter 2006 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CORBA Alegria Baquero.
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
CSE 451: Operating Systems Autumn 2003 Lecture 16 RPC
Inventory of Distributed Computing Concepts
Component--based development
CSE 451: Operating Systems Winter 2007 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
CSE 451: Operating Systems Winter 2004 Module 19 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Spring 2012 Module 22 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Autumn 2009 Module 21 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Middleware in Context Prof. Dave Bakken Cpt. S 464/564 Lecture
Lecture 6: RPC (exercises/questions)
CSE 451: Operating Systems Autumn 2010 Module 21 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Middleware and ORB CS 314 Operating Systems
Lecture 6: RPC (exercises/questions)
Lecture 7: RPC (exercises/questions)
CSE 451: Operating Systems Winter 2003 Lecture 16 RPC
Middleware and ORB CS 314 Operating Systems
CSE 451: Operating Systems Messaging and Remote Procedure Call (RPC)
#01 Client/Server Computing
Presentation transcript:

Distributed Computing & Middleware Background on the golang stuff that Jeromy presented Info on CptS 464

Introduction A distributed system is “one in which hardware or software components located at networked computers communicate and coordinate their actions only by message passing”  Very broad definition  Lots of examples  Lots of kinds Abbreviations  “Distributed System” by “DS”,  “Distributed Computing” is “DC” “You know you have one when the crash of a computer you’ve never heard of stops you from getting any work done.” Leslie Lamport

Example Local Call Caller: // declare and init stuff x = new int [100]; y = new util; // create and rtn ref flag = y.sort(x, 100); Callee: // declare and init stuff (not shown) int util:sort(int [] a, int max) { // implementation of sort... bubble sort, quicksort, … return status; }

Example Local Call (BACKUP SLIDE) Potential assumptions:  Object Invocation conventions between caller (“client”) and callee  In same address space (on same computer)  In same programming language (usually)  Written by same programmer (often, not always)  Same operating system for both caller and callee  Same CPU type for both caller and callee  Can transfer data and control quickly, effectively in zero time  Both fail, or neither do (for the most part) None of these assumptions are always true in a distributed system! Caller: // declare and init stuff x = new int [100]; y = new util; flag = y.sort(x, 100); Callee: // declare and init stuff int util:sort(int [] a, int max) { // implementation of sort... return status; }

Reminder: Assembler Example C-like call X = 4 + ((Y * 4) / (A + B)); Equivalent assembler (vars on stack) ldr r1, [sp, Y] !load Y mul r1, r1, #4 !Y * 4 ldr r2, [sp, A] !load A ldr r3, [sp, B] !load B add r2, r2, r3 !A + B div r1, r1, r2 !divide the two add r1, r1, #4 !add four to result str r1, [sp, X] !store result in ! X on stack

Reminder: Calling Conventions int myFunc(int x, int y) { return x + y } int main() { int x = 1; int y = 2; int z = myFunc(x,y); } To call a function or routine you need to push arguments on the stack (in the right order), push the return address on the stack, ….., branch to the routine, …. Calling conventions define this for a given compiler/language High-level language compilers do all this for you Have to program yourself if using assembler Calling myFunc() in C:

Reminder: Calling Conventions myFunc: movl%edi, -4(%rbp) !grab x off stack movl%esi, -8(%rbp) !grab y off stack add %esi, %edi !add x and y movl%esi, %eax !return x + y ret.globl main main: movl$1, -4(%rbp) !x = 1 movl$2, -8(%rbp) !y = 2 callmyFunc ret

Example Local Call (2) Potential assumptions between caller and callee:  Assembler calling conventions  In same address space (on same computer)  In same programming language (usually)  Same operating system  Same CPU type  Can transfer data and control quickly, effectively in zero time  Both fail, or neither do (for the most part) None of these assumptions are always true in a distributed system!

Example Remote Call Caller: // declare and init stuff x = new int [100]; Y = new util.lookup(…); Flag = y.sort(x, 100); … Callee: // declare and init stuff int util_impl:sort(int[] a, int max){ // implementation of sort return status; } // wait: message w/ struct // copy from struct to a[], // status return status; } // “proxy” or “stub” // generated by middleware int util:sort(int [] a, int max){ // put a[], max into struct // send message with struct // “skeleton” generated // by middleware compiler … // receive message with struct // copy from struct to a[], max flag = z.sort(a, max) // copy a[], flag into struct // send message with struct

Many Local Call Assumptions don’t Hold! Not a local object Invocation, so need more help  Need remote equivalent of local (assembler) calling conventions  In this class we will come to understand this “plumbing” much better Not in same programming language (can’t assume) Not written by same programmer Not running same operating system for caller and callee Not same CPU type for caller and callee …

Not always in the same administrative domain Latency for transfer of control and data can be large and, worse, unpredictable Partial failures Membership of the system (the computers in its collection) can change Unreliable or insecure communication Many Local Call Assumptions don’t Hold! (2)

Middleware Perspective “Middleware is like underwear: it is absolutely essential, but it should never be seen in public.” unknown witticist Background info (only first page required):

CptS 464/564Middleware in Context: © 2011 David E. Bakken Context: (Most) Technology Marches On Hardware technology’s progress phenomenal in last few decades  Moore’s Law  Metcalf’s Law  Graphics processing power Software technology’s progress is much more spotty  “Software crisis”  Yet SW is a large and increasing part of complex apps/systems! Apps and systems are rapidly becoming (more) networked  Oops, distributed software is much harder yet to get right… Middleware a promising technology for programmability of distributed systems 13

CptS 464/564Middleware in Context: © 2011 David E. Bakken Why Middleware? Middleware == “A layer of software above the operating system but below the application program that provides a common programming abstraction across a distributed system” Middleware exists to help manage the complexity and heterogeneity inherent in distributed systems Middleware provides higher-level building blocks (“abstractions”) for programmers than the OS provides  Can make code much more portable  Can make them much more productive  Can make the resulting code have fewer errors  Analogy — MW:sockets ≈ HOL:assembler Middleware sometimes is informally called “plumbing”  Connects parts of a distributed application with “data pipes” and passes data between them 14

CptS 464/564 Middleware in Context: © 2011 David E. Bakken Middleware Middleware in Context Distributed Application OS Comm.ProcessingStorage Distributed Application Network Host 1 Host 2 Middleware Operating System API OS Comm.ProcessingStorage Operating System API Middleware API Client Server 15

CptS 464/564Middleware in Context: © 2011 David E. Bakken Middleware Benefit: Masking Heterogeneity Middleware’s programming building blocks mask heterogeneity  Makes programmer’s life much easier!! Kinds of heterogeneity masked by middleware (MW) frameworks  All MW masks heterogeneity in network technology  All MW masks heterogeneity in host CPU  Almost all MW masks heterogeneity in operating system (or family thereof) –Notable exception: Microsoft middleware (de facto; not de jure or de fiat)  Almost all MW masks heterogeneity in programming language –Noteable exception: Java RMI  Some MW masks heterogeneity in vendor implementations –Object Management Group (omg.org) best here: CORBA (object- oriented), DDS (publish-subscribe) 16

CptS 464/564Middleware in Context: © 2011 David E. Bakken Middleware Benefit: Transparency Middleware can provide useful transparencies:  Access Transparency  Location transparency  Concurrency transparency  Replication transparency  Failure transparency  Mobility transparency Masking heterogeneity and providing transparency makes programming distributed systems much easier to do! 17

Middleware Perspective “Middleware is like underwear: it is absolutely essential, but it should never be seen in public.” unknown witticist Background info (only first page required):

CptS 464/564Middleware in Context: © 2011 David E. Bakken Context: (Most) Technology Marches On Hardware technology’s progress phenomenal in last few decades  Moore’s Law  Metcalf’s Law  Graphics processing power Software technology’s progress is much more spotty  “Software crisis”  Yet SW is a large and increasing part of complex apps/systems! Apps and systems are rapidly becoming (more) networked  Oops, distributed software is much harder yet to get right… Middleware a promising technology for programmability of distributed systems 19

CptS 464/564Middleware in Context: © 2011 David E. Bakken Why Middleware? Middleware == “A layer of software above the operating system but below the application program that provides a common programming abstraction across a distributed system” Middleware exists to help manage the complexity and heterogeneity inherent in distributed systems Middleware provides higher-level building blocks (“abstractions”) for programmers than the OS provides  Can make code much more portable  Can make them much more productive  Can make the resulting code have fewer errors  Analogy — MW:sockets ≈ HOL:assembler Middleware sometimes is informally called “plumbing”  Connects parts of a distributed application with “data pipes” and passes data between them 20

CptS 464/564 Middleware in Context: © 2011 David E. Bakken Middleware Middleware in Context Distributed Application OS Comm.ProcessingStorage Distributed Application Network Host 1 Host 2 Middleware Operating System API OS Comm.ProcessingStorage Operating System API Middleware API Client Server 21

CptS 464/564Middleware in Context: © 2011 David E. Bakken Middleware Benefit: Masking Heterogeneity Middleware’s programming building blocks mask heterogeneity  Makes programmer’s life much easier!! Kinds of heterogeneity masked by middleware (MW) frameworks  All MW masks heterogeneity in network technology  All MW masks heterogeneity in host CPU  Almost all MW masks heterogeneity in operating system (or family thereof) –Notable exception: Microsoft middleware (de facto; not de jure or de fiat)  Almost all MW masks heterogeneity in programming language –Noteable exception: Java RMI  Some MW masks heterogeneity in vendor implementations –Object Management Group (omg.org) best here: CORBA (object- oriented), DDS (publish-subscribe) 22

CptS 464/564Middleware in Context: © 2011 David E. Bakken Middleware Benefit: Transparency Middleware can provide useful transparencies:  Access Transparency  Location transparency  Concurrency transparency  Replication transparency  Failure transparency  Mobility transparency Masking heterogeneity and providing transparency makes programming distributed systems much easier to do! 23

Middleware and Legacy Systems Legacy systems are a huge problem (and asset) in industry and military domains! Middleware often called a “glue” technology: integrated “legacy” components  Much distributed programming involves integrating components, not building them from scratch! Middleware’s abstractions are general enough to allow legacy systems to be “wrapped”  Distributed objects are best here because more general  End result: a very high-level “lowest common denominator” of interoperability 24

Middleware vs. Sockets Middleware is much easier to program! Example interface from CORBA (OMG) IDL: module HelloApp { interface Hello { bool MyFunction(in float a, in string b, in int c, in string d, in float e, out double ret); }; 25

Middleware vs. Sockets(2) Calling that interface in C++ with CORBA boolean success = helloImpl. MyFunction (3.3, “hello”, 2345, “bakken!”, 67.34, doubleBox); 26

Middleware vs. Sockets (3) float a; char b[5]; int c;char d[7]; float e; double rval; int success //Ignore read errors. Hardcode field size, assume //all systems are same CPU arch. and bit size read(socket, &a, sizeof(float)); read(socket, b, sizeof(char) * 5); read(socket, &c, sizeof(int)); read(socket, d, sizeof(char)*7); read(socket, &e, sizeof(float)); // … continued on next slide … 27

Middleware vs. Sockets (4) // … continued from previous slide … … calculating return values etc goes here … //send back return value write(socket, &rval, sizeof(double)); //cant tell if it actually was recieved, or if socket is broken write(socket, &success, sizeof(int)); //again, no error checking 28

Middleware vs. Sockets (5) This socket code ignored all of the following: Errors with the socket Differences in CPU architecture (endianness) Differences in representation of data types between languages I/O errors Type checking of data variables All of the above (and much more) are handled by middleware Middleware’s programming building blocks (abstractions) mask heterogeneity Makes programmer’s life much easier!! 29