System support for adaptation and composition of applications

Similar documents
The operating system: should there be one?

Socket Programming. #In the name of Allah. Computer Engineering Department Sharif University of Technology CE443- Computer Networks

Cake: a tool for adaptation of object code

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

Networked Applications: Sockets. End System: Computer on the Net

NLUUG, Bunnik CloudABI: safe, testable and maintainable software for UNIX Speaker: Ed Schouten,

CSE 333 SECTION 3. POSIX I/O Functions

Experiment 6 The Real World Interface

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017

CSMC 412. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala Set 2. September 15 CMSC417 Set 2 1

Basic OS Progamming Abstrac2ons

Process Creation in UNIX

Section 3: File I/O, JSON, Generics. Meghan Cowan

High-Level Language VMs

Object-Oriented Design

Computer Networks Prof. Ashok K. Agrawala

Processes often need to communicate. CSCB09: Software Tools and Systems Programming. Solution: Pipes. Recall: I/O mechanisms in C

OS COMPONENTS OVERVIEW OF UNIX FILE I/O. CS124 Operating Systems Fall , Lecture 2

Jaguar: Enabling Efficient Communication and I/O in Java

What Is Operating System? Operating Systems, System Calls, and Buffered I/O. Academic Computers in 1983 and Operating System

Repeatable execution and why operating systems should support it

Hyo-bong Son Computer Systems Laboratory Sungkyunkwan University

Remote Procedure Call (RPC) and Transparency

Basic OS Progamming Abstrac7ons

File Systems. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

COMMUNICATION PROTOCOLS: REMOTE PROCEDURE CALL (RPC)

CSE 333 Final Exam June 6, 2017 Sample Solution

Network File System (NFS)

Network File System (NFS)

CSE 333 SECTION 3. POSIX I/O Functions

Tutorial on Socket Programming

Networked Applications: Sockets. Goals of Todayʼs Lecture. End System: Computer on the ʻNet. Client-server paradigm End systems Clients and servers

Process Management! Goals of this Lecture!

Socket Programming TCP UDP

Written Presentation: JoCaml, a Language for Concurrent Distributed and Mobile Programming

Outline. OS Interface to Devices. System Input/Output. CSCI 4061 Introduction to Operating Systems. System I/O and Files. Instructor: Abhishek Chandra

CS 326: Operating Systems. Networking. Lecture 17

CSE 565 Computer Security Fall 2018

Go Circuit: Distributing the Go Language and Runtime. Petar Maymounkov

CSE 333 Section 8 - Client-Side Networking

Outline. EEC-681/781 Distributed Computing Systems. The OSI Network Architecture. Inter-Process Communications (IPC) Lecture 4

PROCESSES AND THREADS THREADING MODELS. CS124 Operating Systems Winter , Lecture 8

UNIX Sockets. Developed for the Azera Group By: Joseph D. Fournier B.Sc.E.E., M.Sc.E.E.

Applications of. Virtual Memory in. OS Design

Combined Object-Lambda Architectures

Middleware. Adapted from Alonso, Casati, Kuno, Machiraju Web Services Springer 2004

Basic OS Programming Abstractions (and Lab 1 Overview)

The MPI Message-passing Standard Practical use and implementation (I) SPD Course 2/03/2010 Massimo Coppola

File Systems Overview. Jin-Soo Kim ( Computer Systems Laboratory Sungkyunkwan University

Distributed Systems 8. Remote Procedure Calls

AMT use case: Upipe + Chrome. Christophe Massiot (EBU multicast 2014)

Distributed Systems. How do regular procedure calls work in programming languages? Problems with sockets RPC. Regular procedure calls

FILE SYSTEMS. Jo, Heeseung

Topics. Java arrays. Definition. Data Structures and Information Systems Part 1: Data Structures. Lecture 3: Arrays (1)

C 1. Recap: Finger Table. CSE 486/586 Distributed Systems Remote Procedure Call. Chord: Node Joins and Leaves. Recall? Socket API

JAVA BYTE IPC: PART 1 DERIVING NIO FROM I/O. Instructor: Prasun Dewan (FB 150,

COS 318: Operating Systems. Message Passing. Vivek Pai Computer Science Department Princeton University

Types (Protocols) Associated functions Styles We will look at using sockets in C Java sockets are conceptually quite similar

Prepared by Prof. Hui Jiang Process. Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University

Goals of this Lecture

Problem Set: Processes

OSGi on the Server. Martin Lippert (it-agile GmbH)

COMP/ELEC 429/556 Introduction to Computer Networks

Process. Prepared by Prof. Hui Jiang Dept. of EECS, York Univ. 1. Process in Memory (I) PROCESS. Process. How OS manages CPU usage? No.

1 System & Activities

I/O Management! Goals of this Lecture!

I/O Management! Goals of this Lecture!

CAS 703 Software Design

Distributed File Systems

Chapter 9. Software Testing

Process Management 1

Overload Resolution. Ansel Sermersheim & Barbara Geller Amsterdam C++ Group March 2019

CSE 333 Lecture 16 - network programming intro

Sistemi in Tempo Reale

Operating systems. Lecture 7

CS5460: Operating Systems

PYTHON TRAINING COURSE CONTENT

Communication. Communication. Distributed Systems. Networks and protocols Sockets Remote Invocation Messages Streams. Fall /10/2001 DoCS

Exception-Less System Calls for Event-Driven Servers

What run-time services could help scientific programming?

Maria Hybinette, UGA. ! One easy way to communicate is to use files. ! File descriptors. 3 Maria Hybinette, UGA. ! Simple example: who sort

DS 2009: middleware. David Evans

Distributed Memory Parallel Programming

SAI/ST course Distributed Systems

Hybrid of client-server and P2P. Pure P2P Architecture. App-layer Protocols. Communicating Processes. Transport Service Requirements

IPC. Communication. Layered Protocols. Layered Protocols (1) Data Link Layer. Layered Protocols (2)

Java Internals. Frank Yellin Tim Lindholm JavaSoft

W4118: OS Overview. Junfeng Yang

RCU. ò Walk through two system calls in some detail. ò Open and read. ò Too much code to cover all FS system calls. ò 3 Cases for a dentry:

Announcements. P4: Graded Will resolve all Project grading issues this week P5: File Systems

Microsoft SAGE and LLVM KLEE. Julian Cohen Manual and Automatic Program Analysis

VFS, Continued. Don Porter CSE 506

Emulation 2. G. Lettieri. 15 Oct. 2014

3/7/2018. Sometimes, Knowing Which Thing is Enough. ECE 220: Computer Systems & Programming. Often Want to Group Data Together Conceptually

Operating Systems. Review ENCE 360

MoonShine: Optimizing OS Fuzzer Seed Selection with Trace Distillation. Shankara Pailoor, Andrew Aday, Suman Jana Columbia University

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 22: Remote Procedure Call (RPC)

CS 351 Week 15. Course Review

Chapter 3: Client-Server Paradigm and Middleware

The Road to Object Orientation Operating Systems Object Planes. Object Planes. David Chisnall. March 25, 2010

Transcription:

System support for adaptation and composition of applications Stephen Kell Stephen.Kell@cl.cam.ac.uk Computer Laboratory University of Cambridge... adaptation and composition... p. 1

First, a video Note: not intended as a product endorsement! Question: why doesn t any old software Just Work like this?... adaptation and composition... p. 2

Getting application code talking It s hard to get arbitrary bits of application code talking: different API calls different data structures different protocols different control structures, threading models... different language-level implementation details storage management threading semantics, concurrency primitives maybe no visible programmatic interface at all... Solutions : standards; hand-written glue; don t do it. Mismatch is inevitable must do adaptation.... adaptation and composition... p. 3

Why the operating system is responsible A problem just for the app developers? Not necessarily: OS has component model, controls communication linkage / shared mem, pipes, sockets, filesystem... process/library notions are already too crude: too big for precise isolation, security, accounting... fail to capture dynamic structure below library level witness research into browser OSes would like to tackle the problem closer to root...... meaning in the OS interfaces let s rethink linker, dyn. loader, IPC interfaces simplicity, coverage, adoptability, performance... black-box adaptation interposing on communication... adaptation and composition... p. 4

Adaptation, configuration languages Glue code is tedious, fragile, error-prone. e.g. regex-based string rewriting e.g. implicit binding by name-matching Want domain for specifying what and how of composition separate from programming languages explicitly captures wiring specialised towards adaptation Goal: separation of functionality from integration details mix-and-match communication mechanisms sockets, fs, subprocess, linkage, signals,... mix-and-match data encodings, protocols...... adaptation and composition... p. 5

Concrete example diagram... adaptation and composition... p. 6

Concrete example code compound fsdbadapter { exports [ fs_srv { int open(char list, int ); int read(int, byte addr, int int write( int, byte addr, int ); void close(int ); } ]; imports [ db_client { char list list run_query(char list) } ]; link obj_elf (" C", "fs_db_adapter.o") [ xml2sql, sql2xml, realfs, heap ] { calfile = "mycalendar.xml"; rd_qstr = "SELECT FROM Calendar"; wt_qstr = "INSERT INTO Calendar VALUES "; fs_srv < realfs { val fd = realfs.open ("/ dev/null ", O_RDONLY); val inbuf = heap.newbuf(sql2xml(run_query(rd_qstr))) val outbuf = heap.newbuf(0) open( calfile, any mode) < { return fd } read(fd, any dest, any len) < { return heap.copy(inbuf, dest, len write(fd, any buf, any len) < { return outbuf.append(buf, len) } close(fd) < { run_query(wt_qstr + xml2sql(outbuf)) }... adaptation and composition... p. 7

What s cool Sounds straightforward. What s cool? many packagings, same abstract model data representation adaptations done implicitly embed language into dynamic loader dlopen() arbitrary linkage units {library, file/socket} handles unified as object handles simple in-os object model helps language runtimes: interoperability, e.g. multi-language shared heap performance, e.g. avoid GC paging interaction extensible set of binary adaptation primitives argument remapping; protocol adapter synthesis. extend static data structures, initialisation...... adaptation and composition... p. 8

Status and current work Current work extending Knit to support...... simple compositions couple of different languages/packagings e.g. share Firefox s history log with file manager Blocked by current sideline: software visualisation want to identify candidate re-usable code...... by inspection need a picture e.g. linkage graph too many edges! aggregate them by cluster... Thanks for listening. Questions?... adaptation and composition... p. 9

Linkage graph... (rox-filer) Wanted: decomposed representation with fewer edges... adaptation and composition... p. 10

ROX filer after some ad-hoc clustering After four rounds of head-scratching, it looks a bit better. This was done mostly by deleting pervasively-connected nodes, together with their edges.... adaptation and composition... p. 11

Why it s not just... done by libraries? need agreed-upon interfaces done by plug-in systems? must conform to standard; not portable done by IDL compilers? too specialized; fixed at compile-time done by component middleware? little API adaptation; requires homogeneity done by aspect-oriented programming? aspects bundle logic with interposition points tend to therefore be codebase-specific done by web services etc.? again, no API-level adaptation;... adaptation and composition... p. 12

Supporting definitions unit calendar { imports [ fs_srv { int open(char list, int ); int read(int, byte addr, int ); int write(int, byte addr, int ); void close(int ); exports [ /... / ]; files { exec_elf("c", calendar) } } unit dbms { exports [ db_client { runquery(char list) } ]; files { obj_elf (" C", odbc.o) } } unit xml2sql { exports [ xml2sql { xml2sql(char list) } ]; files { exec_generic("execve_filter ", xml2sql) }... adaptation and composition... p. 13