Swift 5, ABI Stability and

Size: px
Start display at page:

Download "Swift 5, ABI Stability and"

Transcription

1 Swift 5, ABI Stability and

2 Important Documents Concurrency Manifesto by Chris Lattner https: /gist.github.com/lattner/ 31ed37682ef1576b16bca1432ea9f782 Kicking off Concurrency Discussions by Ted Kremeneck https: /lists.swift.org/pipermail/swift-evolution/week-of- Mon / html Async/Await Proposal for Swift by Lattner https: /gist.github.com/lattner/ 429b f25b714dcfc7619

3 Prototype for Async/Await by Lattner https: /github.com/apple/swift/pull/11501 Swift Evolution Goals for Swift 5 https: /github.com/apple/swift-evolution/blob/master/readme.md Swift ABI Stability Manifesto https: /github.com/apple/swift/blob/master/docs/ ABIStabilityManifesto.md#what-is-abi-stability Swift Unwrapped Podcast https: /spec.fm/podcasts/swift-unwrapped/84323

4 Goals for Swift 5

5 Primary Focus: ABI Stability What is ABI Stability? At runtime Swift binaries interact with other libraries and components through an ABI (Application Binary Interfaces). It defines low level details like how to call a function, how data is represented in memory and where metadata is and how to access it. Currently Swift is not ABI stable, so each binary (App), bundles its own version of the Swift Dynamic Library. Swift doesn t live on the ios Operating System, it lives within each App.

6 That means Sephora Color IQ is using Swift 3.1, so it bundles Swift 3.1 s Dynamic Library (containing the 3.1 ABI) inside. But the Gap app is using Swift 2.3, so it bundles Swift 2.3 and it s 2.3 ABI. If Swift becomes ABI Stable, Swift will live within the ios Operating System and it s ABI will be compatible with every version of Swift. i.e Sephora Color iq is using Swift 5.0, but Gap is using Swift 4.3, and their both consuming Swift ABI embedded in the Operating System.

7 Why does ABI Stability matter? Bundle size is reduced Language changes smaller / Less frequent Less Migration Developers can create Pre-compiled Frameworks in Swift (currently frameworks are compiled when compiling your app) because no need to embed Swift

8 Drawbacks? Limits changes to the Public Interfaces and Symbols Restricts the ways Swift can grow and evolve

9 String Ergonomics Aim to complete more work outlined in the String Manifesto Language level support for Regular Expressions? Performance Improvements to the internal implementation of String

10 Standard Library Improvements Only making minor changes to improve Standard Library where needed

11 Foundation Improvements Improvements Foundation that make using the Cocoa SDK with Swift more seamless

12 Syntactic Additions Syntactic changes add complexity to the language May be made but only if well motivated, under intense scrutiny

13 Groundwork/Discussion for new Concurrency Model Finalizing the model is a non-goal for Swift 5 Key focus area is designing language affordances for creating and using asynchronous APIs and problems caused by callback-heavy code

14 Changes to the Swift Evolution Process for Swift 5 Unlike Swift 4, there will not be Stage 1, Stage 2 etc for accepting proposals Proposals are welcome until March 1, 2018 To mitigate the risks of proposals distracting from ABI Stability, EVERY evolution proposal will need a working implementation with test cases before it can be considered for review.

15 How to Submit a Proposal Step 1 Write Proposal, submit via Pull Request to swift-evolution repository Step 2 Core Team provides feedback Step 3 If positive feedback, author must provide an implementation prior to proposal being formally reviewed.

16 Concurrency Manifesto by Chris Lattner

17 Introduction Focuses on Task-Based Concurrency Abstractions (common in Event-Driven, Client-Server Applications i.e responding to UI events or requests) Swift 1 4 has avoided Concurrency, relied on OS/Library level abstractions (GCD, pthreads, NSThread, etc) to manage tasks. It s already possible to use GCD..etc, so the Goal is to make the Concurrency experience far better than it is today Improve the concurrency story with Swift s values - Design, Maintenance, Safety, Scalability, Performance and Excellence

18 Why a First Class Concurrency Model?

19 Asynchronous APIs are difficult to work Error Handling, Callbacks, when performing multiple operations creates complicated control flows Made worse with Swift s guard let syntax throughout callback closures

20 Hard to know what Queue/Thread you re on Swift closures don t make it obvious which background thread or queue a task is being executed on Leads to race conditions, and unexpected results

21 Shared mutable state Is bad for Software Developers Data being mutated while someone else is reading from it Typically solved using mutexes or locks, but this introduces a number of problems: ensuring you re using the right locks, granularity of locks, avoid deadlocks and other issues. Mutexes are inefficient Techniques like Objective C read/copy/update are complex, unsafe and fragile

22 4 Major Abstractions in Computation Traditional Control Flow Asynchronous Control Flow Message Passing and Data Isolation Distributed Data and Compute (1) Already exists in Swift (2) Asynchrony is the next step towards Concurrency model. Fundamental to machines talking to other machines, slow devices and multiple operations. (3) Next step is to define a programmer abstraction to define and

23 Current Asynchronous Solution in Swift Passing Completion handlers using closures Completion handlers stack up to a pyramid of doom Make error handling awkward Make control flow extremely difficult

24 Part 1 - Async/Await Pattern

25 Async Well known solution used in other popular programming languages - C, C#, Python, Javascript, Scala with great success. Async keyword used similar to the existing throws keyword Declare a function as async to indicate function is a Coroutine. Definition: Coroutines Functions that may return a value normally, or may suspend themselves and internally return a continuation.

26 Await Similar to the existing try keyword. Indicates that non-local control flow can happen at that point.

27 Before: func loadwebresource(_ path: String, completionblock: (result: Resource) -> Void) {... } func decodeimage(_ r1: Resource, _ r2: Resource, completionblock: (result: Image) -> Void) func dewarpandcleanupimage(_ i : Image, completionblock: (result: Image) -> Void) func processimagedata1(completionblock: (result: Image) -> Void) { loadwebresource("dataprofile.txt") { dataresource in loadwebresource("imagedata.dat") { imageresource in decodeimage(dataresource, imageresource) { imagetmp in dewarpandcleanupimage(imagetmp) { imageresult in completionblock(imageresult) } } } } }

28 After: func loadwebresource(_ path: String) async -> Resource func decodeimage(_ r1: Resource, _ r2: Resource) async -> Image func dewarpandcleanupimage(_ i : Image) async -> Image func processimagedata1() async -> Image { let dataresource = await loadwebresource("dataprofile.txt") let imageresource = await loadwebresource("imagedata.dat") let imagetmp = await decodeimage(dataresource, imageresource) let imageresult = await dewarpandcleanupimage(imagetmp) return imageresult }

29 Part 2 - Actors

30 What is an Actor? Actors represent real world concepts like a document, a device, a network request Well suited to event driven architectures like UI applications and servers An actor is a combination of a DispatchQueue, the data that queue protects and messages that can be run on the queue An Actor would be a new type in Swift, like class, struct or protocol

31 Allows programmer to define internal variables and functions to manage that data and perform operations on it Actors can t return values, throw errors or have inout parameters

32 Main Thread? UIKit and AppKit would model something like the Main Thread using a MainActor Programmers could define extensions to the MainActor in order to run their code on the main thread. Actors are shutdown when their reference count reaches 0 and the last queued message is completed.

33 actor TableModel { let mainactor : TheMainActor var thelist : [String] = [] { didset { mainactor.updatetableview(thelist) } } init(mainactor: TheMainActor) { self.mainactor = mainactor } // this checks to see if all the entries in the list are capitalized: // if so, it capitalize the string before returning it to encourage // capitalization consistency in the list. func prettify(_ x : String) -> String { // Details omitted: it inspects thelist, adjusting the // string before returning it if necessary. } } actor func add(entry: String) { } thelist.append(prettify(entry))

34 Part 3 - Fault Isolation

35 Far more complex and low level than Part 1 and Part 2 Most important thing to note is that by using the Actor model, state is no longer global Therefore if a crash was to occur in a particular Actor, it could be possible to terminate just the Actor that had an issue instead of the whole process This also has possible downsides such as if some other Actor or piece of code is awaiting that Actor to finish a task but it has terminated and will never return

36 Part 4 - System Architecture

37 Wayyyy more complex than everything else Interprocess Communication and managing basic async operations is similar in many ways Independent tasks communicating with each using by sending structured data using asynchronous messages But there s also a lot of things not similar A Swift Developer shouldn t have to worry about IPC if they don t care about it Actors can opt in to distribution using the distributed keyword Requires that actors conform to a few different requirements in order to allow them to work with distributed systems.

38 Part 5 - The crazy and brilliant future

39 Room to extend upon Actors and asynchrony to improve longstanding Software Community divides (that are all way to complicated for me to mention here)

40 FIN

JS Event Loop, Promises, Async Await etc. Slava Kim

JS Event Loop, Promises, Async Await etc. Slava Kim JS Event Loop, Promises, Async Await etc Slava Kim Synchronous Happens consecutively, one after another Asynchronous Happens later at some point in time Parallelism vs Concurrency What are those????

More information

Executive Summary. It is important for a Java Programmer to understand the power and limitations of concurrent programming in Java using threads.

Executive Summary. It is important for a Java Programmer to understand the power and limitations of concurrent programming in Java using threads. Executive Summary. It is important for a Java Programmer to understand the power and limitations of concurrent programming in Java using threads. Poor co-ordination that exists in threads on JVM is bottleneck

More information

Introduction to Concurrent Software Systems. CSCI 5828: Foundations of Software Engineering Lecture 08 09/17/2015

Introduction to Concurrent Software Systems. CSCI 5828: Foundations of Software Engineering Lecture 08 09/17/2015 Introduction to Concurrent Software Systems CSCI 5828: Foundations of Software Engineering Lecture 08 09/17/2015 1 Goals Present an overview of concurrency in software systems Review the benefits and challenges

More information

Programming Safe Agents in Blueprint. Alex Muscar University of Craiova

Programming Safe Agents in Blueprint. Alex Muscar University of Craiova Programming Safe Agents in Blueprint Alex Muscar University of Craiova Programmers are craftsmen, and, as such, they are only as productive as theirs tools allow them to be Introduction Agent Oriented

More information

Grand Central Dispatch and NSOperation. CSCI 5828: Foundations of Software Engineering Lecture 28 12/03/2015

Grand Central Dispatch and NSOperation. CSCI 5828: Foundations of Software Engineering Lecture 28 12/03/2015 Grand Central Dispatch and NSOperation CSCI 5828: Foundations of Software Engineering Lecture 28 12/03/2015 1 Credit Where Credit Is Due Most of the examples in this lecture were inspired by example code

More information

Introduction to Concurrent Software Systems. CSCI 5828: Foundations of Software Engineering Lecture 12 09/29/2016

Introduction to Concurrent Software Systems. CSCI 5828: Foundations of Software Engineering Lecture 12 09/29/2016 Introduction to Concurrent Software Systems CSCI 5828: Foundations of Software Engineering Lecture 12 09/29/2016 1 Goals Present an overview of concurrency in software systems Review the benefits and challenges

More information

Operating System. Operating System Overview. Structure of a Computer System. Structure of a Computer System. Structure of a Computer System

Operating System. Operating System Overview. Structure of a Computer System. Structure of a Computer System. Structure of a Computer System Overview Chapter 1.5 1.9 A program that controls execution of applications The resource manager An interface between applications and hardware The extended machine 1 2 Structure of a Computer System Structure

More information

September 15th, Finagle + Java. A love story (

September 15th, Finagle + Java. A love story ( September 15th, 2016 Finagle + Java A love story ( ) @mnnakamura hi, I m Moses Nakamura Twitter lives on the JVM When Twitter realized we couldn t stay on a Rails monolith and continue to scale at the

More information

CS 241 Honors Concurrent Data Structures

CS 241 Honors Concurrent Data Structures CS 241 Honors Concurrent Data Structures Bhuvan Venkatesh University of Illinois Urbana Champaign March 27, 2018 CS 241 Course Staff (UIUC) Lock Free Data Structures March 27, 2018 1 / 43 What to go over

More information

Thread Safety. Review. Today o Confinement o Threadsafe datatypes Required reading. Concurrency Wrapper Collections

Thread Safety. Review. Today o Confinement o Threadsafe datatypes Required reading. Concurrency Wrapper Collections Thread Safety Today o Confinement o Threadsafe datatypes Required reading Concurrency Wrapper Collections Optional reading The material in this lecture and the next lecture is inspired by an excellent

More information

Message Passing. Advanced Operating Systems Tutorial 7

Message Passing. Advanced Operating Systems Tutorial 7 Message Passing Advanced Operating Systems Tutorial 7 Tutorial Outline Review of Lectured Material Discussion: Erlang and message passing 2 Review of Lectured Material Message passing systems Limitations

More information

CMSC 330: Organization of Programming Languages

CMSC 330: Organization of Programming Languages CMSC 330: Organization of Programming Languages Multithreading Multiprocessors Description Multiple processing units (multiprocessor) From single microprocessor to large compute clusters Can perform multiple

More information

Multithreading and Interactive Programs

Multithreading and Interactive Programs Multithreading and Interactive Programs CS160: User Interfaces John Canny. Last time Model-View-Controller Break up a component into Model of the data supporting the App View determining the look of the

More information

How Rust views tradeoffs. Steve Klabnik

How Rust views tradeoffs. Steve Klabnik How Rust views tradeoffs Steve Klabnik 03.04.2019 What is a tradeoff? Bending the Curve Overview Design is about values Case Studies BDFL vs Design By Committee Stability Without Stagnation Acceptable

More information

An Async Primer. By Bill Wagner August Introduction

An Async Primer. By Bill Wagner August Introduction An Async Primer By Bill Wagner August 2012 Introduction The C# 5.0 release might seem small, given that the single major feature is the addition of async / await keywords to support asynchronous programming.

More information

Concurrency Analysis of Asynchronous APIs

Concurrency Analysis of Asynchronous APIs Concurrency Analysis of Asynchronous APIs Anirudh Santhiar and Aditya Kanade April 2, 2016 Computer Science and Automation, IISc Introduction Asynchronous Programming Model1 A way to organize programs

More information

Kotlin/Native concurrency model. nikolay

Kotlin/Native concurrency model. nikolay Kotlin/Native concurrency model nikolay igotti@jetbrains What do we want from concurrency? Do many things concurrently Easily offload tasks Get notified once task a task is done Share state safely Mutate

More information

ios Performance and Concurrency Patrick Thomson

ios Performance and Concurrency Patrick Thomson ios Performance and Concurrency Patrick Thomson Performance Matters ios devices are resource-constrained Users will notice performance issues The deciding factor between a good and an awful app Demo Obligatory

More information

Asynchronous I/O: A Case Study in Python

Asynchronous I/O: A Case Study in Python Asynchronous I/O: A Case Study in Python SALEIL BHAT A library for performing await -style asynchronous socket I/O was written in Python. It provides an event loop, as well as a set of asynchronous functions

More information

CS 450 Exam 2 Mon. 11/7/2016

CS 450 Exam 2 Mon. 11/7/2016 CS 450 Exam 2 Mon. 11/7/2016 Name: Rules and Hints You may use one handwritten 8.5 11 cheat sheet (front and back). This is the only additional resource you may consult during this exam. No calculators.

More information

The Essence of Node JavaScript on the Server Asynchronous Programming Module-driven Development Small Core, Vibrant Ecosystem The Frontend Backend

The Essence of Node JavaScript on the Server Asynchronous Programming Module-driven Development Small Core, Vibrant Ecosystem The Frontend Backend The Essence of Node The Essence of Node JavaScript on the Server Asynchronous Programming Module-driven Development Small Core, Vibrant Ecosystem The Frontend Backend JavaScript on the Server there is

More information

Design and Implementation of Modern Programming Languages (Seminar)

Design and Implementation of Modern Programming Languages (Seminar) Design and Implementation of Modern Programming Languages (Seminar) Outline Administrivia Intro Schedule Topics GENERAL INFORMATION Intro Introduce students to the core techniques of scientific work Give

More information

Swift, functional programming, and does it matter? Alexis

Swift, functional programming, and does it matter? Alexis Swift, functional programming, and does it matter? Alexis Gallagher @alexisgallagher Questions What s new in Swift? Is Swift a functional programming language? And what is functional anyway? How useful

More information

Duration 5 days (For basic crowd 5+3days needed)

Duration 5 days (For basic crowd 5+3days needed) There's never been a better time to develop for Apple Platforms It is now much easier to develop ios apps than ever with Swift and Xcode. This ios apps development course guides you systematically from

More information

This is a talk given by me to the Northwest C++ Users Group on May 19, 2010.

This is a talk given by me to the Northwest C++ Users Group on May 19, 2010. This is a talk given by me to the Northwest C++ Users Group on May 19, 2010. 1 I like this picture because it clearly shows what is private and what is shared. In the message-passing system, threads operate

More information

Using Automated Network Management at Fiserv. June 2012

Using Automated Network Management at Fiserv. June 2012 Using Automated Network Management at Fiserv June 2012 Brought to you by Join Group Vivit Network Automation Special Interest Group (SIG) Leaders: Chris Powers & Wendy Wheeler Your input is welcomed on

More information

Foundational Design Patterns for Moving Beyond One Loop

Foundational Design Patterns for Moving Beyond One Loop Foundational Design Patterns for Moving Beyond One Loop Raja Pillai Technical Consultant Agenda Why move beyond one loop? What is a design pattern? Why learn communication mechanisms? Functional global

More information

Welcome to CS50 section! This is Week 10 :(

Welcome to CS50 section! This is Week 10 :( Welcome to CS50 section! This is Week 10 :( This is our last section! Final project dates Official proposals: due this Friday at noon Status report: due Monday, Nov 28 at noon Hackathon: Thursday, Dec

More information

SOFTWARE MAINTENANCE AND EVOLUTION --- REFACTORING FOR ASYNC --- CS563 WEEK 3 - THU

SOFTWARE MAINTENANCE AND EVOLUTION --- REFACTORING FOR ASYNC --- CS563 WEEK 3 - THU SOFTWARE MAINTENANCE AND EVOLUTION --- REFACTORING FOR ASYNC --- CS563 WEEK 3 - THU Danny Dig Course Objectives: Project Practice a research or novel-industrial project through all its stages: - formulate

More information

Finding Bugs Using Xcode Runtime Tools

Finding Bugs Using Xcode Runtime Tools Session Developer Tools #WWDC17 Finding Bugs Using Xcode Runtime Tools 406 Kuba Mracek, Program Analysis Engineer Vedant Kumar, Compiler Engineer 2017 Apple Inc. All rights reserved. Redistribution or

More information

Architectural Design. CSCE Lecture 12-09/27/2016

Architectural Design. CSCE Lecture 12-09/27/2016 Architectural Design CSCE 740 - Lecture 12-09/27/2016 Architectural Styles 2 Today s Goals Define what architecture means when discussing software development. Discuss methods of documenting and planning

More information

Models of concurrency & synchronization algorithms

Models of concurrency & synchronization algorithms Models of concurrency & synchronization algorithms Lecture 3 of TDA383/DIT390 (Concurrent Programming) Carlo A. Furia Chalmers University of Technology University of Gothenburg SP3 2016/2017 Today s menu

More information

1: Introduction to Object (1)

1: Introduction to Object (1) 1: Introduction to Object (1) 김동원 2003.01.20 Overview (1) The progress of abstraction Smalltalk Class & Object Interface The hidden implementation Reusing the implementation Inheritance: Reusing the interface

More information

Capriccio: Scalable Threads for Internet Services

Capriccio: Scalable Threads for Internet Services Capriccio: Scalable Threads for Internet Services Rob von Behren, Jeremy Condit, Feng Zhou, Geroge Necula and Eric Brewer University of California at Berkeley Presenter: Cong Lin Outline Part I Motivation

More information

Honours/Master/PhD Thesis Projects Supervised by Dr. Yulei Sui

Honours/Master/PhD Thesis Projects Supervised by Dr. Yulei Sui Honours/Master/PhD Thesis Projects Supervised by Dr. Yulei Sui Projects 1 Information flow analysis for mobile applications 2 2 Machine-learning-guide typestate analysis for UAF vulnerabilities 3 3 Preventing

More information

STARCOUNTER. Technical Overview

STARCOUNTER. Technical Overview STARCOUNTER Technical Overview Summary 3 Introduction 4 Scope 5 Audience 5 Prerequisite Knowledge 5 Virtual Machine Database Management System 6 Weaver 7 Shared Memory 8 Atomicity 8 Consistency 9 Isolation

More information

Introduction to Asynchronous Programming Fall 2014

Introduction to Asynchronous Programming Fall 2014 CS168 Computer Networks Fonseca Introduction to Asynchronous Programming Fall 2014 Contents 1 Introduction 1 2 The Models 1 3 The Motivation 3 4 Event-Driven Programming 4 5 select() to the rescue 5 1

More information

Unifer Documentation. Release V1.0. Matthew S

Unifer Documentation. Release V1.0. Matthew S Unifer Documentation Release V1.0 Matthew S July 28, 2014 Contents 1 Unifer Tutorial - Notes Web App 3 1.1 Setting up................................................. 3 1.2 Getting the Template...........................................

More information

Read & Download (PDF Kindle) Python Parallel Programming Cookbook

Read & Download (PDF Kindle) Python Parallel Programming Cookbook Read & Download (PDF Kindle) Python Parallel Programming Cookbook Master efficient parallel programming to build powerful applications using Python About This Book Design and implement efficient parallel

More information

Software Architecture

Software Architecture Software Architecture Lecture 5 Call-Return Systems Rob Pettit George Mason University last class data flow data flow styles batch sequential pipe & filter process control! process control! looping structure

More information

AUTOBEST: A United AUTOSAR-OS And ARINC 653 Kernel. Alexander Züpke, Marc Bommert, Daniel Lohmann

AUTOBEST: A United AUTOSAR-OS And ARINC 653 Kernel. Alexander Züpke, Marc Bommert, Daniel Lohmann AUTOBEST: A United AUTOSAR-OS And ARINC 653 Kernel Alexander Züpke, Marc Bommert, Daniel Lohmann alexander.zuepke@hs-rm.de, marc.bommert@hs-rm.de, lohmann@cs.fau.de Motivation Automotive and Avionic industry

More information

Asynchronous Programming Demystified

Asynchronous Programming Demystified Asynchronous Programming Demystified http://submain.com/webcasts/asynchronous-programming-demystified/ for the webcast recording, slides and demo code download 1/14/2015 Webcast Housekeeping Audio Connect

More information

CS 160: Interactive Programming

CS 160: Interactive Programming CS 160: Interactive Programming Professor John Canny 3/8/2006 1 Outline Callbacks and Delegates Multi-threaded programming Model-view controller 3/8/2006 2 Callbacks Your code Myclass data method1 method2

More information

App Development. Quick Guides for Masterminds. J.D Gauchat Cover Illustration by Patrice Garden

App Development. Quick Guides for Masterminds. J.D Gauchat   Cover Illustration by Patrice Garden App Development Quick Guides for Masterminds J.D Gauchat www.jdgauchat.com Cover Illustration by Patrice Garden www.smartcreativz.com Quick Guides for Masterminds Copyright 2018 by John D Gauchat All Rights

More information

Process Concepts. CSC400 - Operating Systems. 3. Process Concepts. J. Sumey

Process Concepts. CSC400 - Operating Systems. 3. Process Concepts. J. Sumey CSC400 - Operating Systems 3. Process Concepts J. Sumey Overview Concurrency Processes & Process States Process Accounting Interrupts & Interrupt Processing Interprocess Communication CSC400 - Process

More information

Sequentialising a concurrent program using continuation-passing style

Sequentialising a concurrent program using continuation-passing style Sequentialising a concurrent program using continuation-passing style Juliusz Chroboczek Université de Paris-Diderot (Paris 7) jch@pps.jussieu.fr 28 January 2012 1/44 Outline Everything you ever wanted

More information

Advance Mobile& Web Application development using Angular and Native Script

Advance Mobile& Web Application development using Angular and Native Script Advance Mobile& Web Application development using Angular and Native Script Objective:- As the popularity of Node.js continues to grow each day, it is highly likely that you will use it when you are building

More information

Frequently Asked Questions about Real-Time

Frequently Asked Questions about Real-Time FAQ: RTX64 2013 Frequently Asked Questions about Real-Time What is Real-Time? Real-time describes an application which requires a response to an event within some small upper bounded time frame. Typically,

More information

Lecture 1 Introduction to Android. App Development for Mobile Devices. App Development for Mobile Devices. Announcement.

Lecture 1 Introduction to Android. App Development for Mobile Devices. App Development for Mobile Devices. Announcement. CSCE 315: Android Lectures (1/2) Dr. Jaerock Kwon App Development for Mobile Devices Jaerock Kwon, Ph.D. Assistant Professor in Computer Engineering App Development for Mobile Devices Jaerock Kwon, Ph.D.

More information

Virtual machines (e.g., VMware)

Virtual machines (e.g., VMware) Case studies : Introduction to operating systems principles Abstraction Management of shared resources Indirection Concurrency Atomicity Protection Naming Security Reliability Scheduling Fairness Performance

More information

Igniting QuantLib on a Zeppelin

Igniting QuantLib on a Zeppelin Igniting QuantLib on a Zeppelin Andreas Pfadler, d-fine GmbH QuantLib UserMeeting, Düsseldorf, 7.12.2016 d-fine d-fine All rights All rights reserved reserved 0 Welcome Back!» An early stage of this work

More information

Backend Development. SWE 432, Fall Web Application Development

Backend Development. SWE 432, Fall Web Application Development Backend Development SWE 432, Fall 2018 Web Application Development Review: Async Programming Example 1 second each Go get a candy bar Go get a candy bar Go get a candy bar Go get a candy bar Go get a candy

More information

Microservices with Node.js

Microservices with Node.js Microservices with Node.js Objectives In this module we will discuss: Core Node.js concepts Node Package Manager (NPM) The Express Node.js package The MEAN stack 1.1 What is Node.js? Node.js [ https://nodejs.org/

More information

The Concurrency Viewpoint

The Concurrency Viewpoint The Concurrency Viewpoint View Relationships The Concurrency Viewpoint 2 The Concurrency Viewpoint Definition: The Concurrency Viewpoint: describes the concurrency structure of the system and maps functional

More information

OpenACC Course. Office Hour #2 Q&A

OpenACC Course. Office Hour #2 Q&A OpenACC Course Office Hour #2 Q&A Q1: How many threads does each GPU core have? A: GPU cores execute arithmetic instructions. Each core can execute one single precision floating point instruction per cycle

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Winter 2017 Lecture 4a Andrew Tolmach Portland State University 1994-2017 Semantics and Erroneous Programs Important part of language specification is distinguishing valid from

More information

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

PROCESSES AND THREADS THREADING MODELS. CS124 Operating Systems Winter , Lecture 8 PROCESSES AND THREADS THREADING MODELS CS124 Operating Systems Winter 2016-2017, Lecture 8 2 Processes and Threads As previously described, processes have one sequential thread of execution Increasingly,

More information

Erlang and Go (CS262a, Berkeley Fall 2016) Philipp Moritz

Erlang and Go (CS262a, Berkeley Fall 2016) Philipp Moritz Erlang and Go (CS262a, Berkeley Fall 2016) Philipp Moritz The Problem Distributed computation is hard! State Hard to do recovery, dependency on order of execution Concurrency and Synchronization Hard to

More information

Extreme Java Productivity with Spring Roo and Spring 3.0

Extreme Java Productivity with Spring Roo and Spring 3.0 Extreme Java Productivity with Spring Roo and Spring 3.0 Rod Johnson Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Agenda Motivation

More information

Microservices, Messaging and Science Gateways. Review microservices for science gateways and then discuss messaging systems.

Microservices, Messaging and Science Gateways. Review microservices for science gateways and then discuss messaging systems. Microservices, Messaging and Science Gateways Review microservices for science gateways and then discuss messaging systems. Micro- Services Distributed Systems DevOps The Gateway Octopus Diagram Browser

More information

Department of Computer Science. COS 122 Operating Systems. Practical 3. Due: 22:00 PM

Department of Computer Science. COS 122 Operating Systems. Practical 3. Due: 22:00 PM Department of Computer Science COS 122 Operating Systems Practical 3 Due: 2018-09-13 @ 22:00 PM August 30, 2018 PLAGIARISM POLICY UNIVERSITY OF PRETORIA The Department of Computer Science considers plagiarism

More information

Simplifying Asynchronous Code with

Simplifying Asynchronous Code with Simplifying Asynchronous Code with Scala Async JASON ZAUGG PHILIPP HALLER The Problem Asynchronous code ubiquitous Intrinsic to programming models like actors Required for performance and scalability See

More information

CS 498RK FALL RESTFUL APIs

CS 498RK FALL RESTFUL APIs CS 498RK FALL 2017 RESTFUL APIs Designing Restful Apis blog.mwaysolutions.com/2014/06/05/10-best-practices-for-better-restful-api/ www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api Resources

More information

Erlang 101. Google Doc

Erlang 101. Google Doc Erlang 101 Google Doc Erlang? with buzzwords Erlang is a functional concurrency-oriented language with extremely low-weight userspace "processes", share-nothing messagepassing semantics, built-in distribution,

More information

Java Concurrency in practice Chapter 9 GUI Applications

Java Concurrency in practice Chapter 9 GUI Applications Java Concurrency in practice Chapter 9 GUI Applications INF329 Spring 2007 Presented by Stian and Eirik 1 Chapter 9 GUI Applications GUI applications have their own peculiar threading issues To maintain

More information

Mock Objects and Distributed Testing

Mock Objects and Distributed Testing Mock Objects and Distributed Testing Making a Mockery of your Software Brian Gilstrap Once, said the Mock Turtle at last, with a deep sigh, I was a real Turtle. (Alice In Wonderland, Lewis Carroll) The

More information

CSE 333 Lecture 1 - Systems programming

CSE 333 Lecture 1 - Systems programming CSE 333 Lecture 1 - Systems programming Hal Perkins Department of Computer Science & Engineering University of Washington Welcome! Today s goals: - introductions - big picture - course syllabus - setting

More information

Android Ecosystem and. Revised v4presenter. What s New

Android Ecosystem and. Revised v4presenter. What s New Android Ecosystem and Revised v4presenter What s New Why Mobile? 5B 4B 3B 2B 1B Landlines PCs TVs Bank users Mobiles 225M AOL 180M 135M 90M 45M 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Quarters

More information

1 Build Your First App. The way to get started is to quit talking and begin doing. Walt Disney

1 Build Your First App. The way to get started is to quit talking and begin doing. Walt Disney 1 Build Your First App The way to get started is to quit talking and begin doing. Walt Disney Copyright 2015 AppCoda Limited All rights reserved. Please do not distribute or share without permission. No

More information

Science-as-a-Service

Science-as-a-Service Science-as-a-Service The iplant Foundation Rion Dooley Edwin Skidmore Dan Stanzione Steve Terry Matthew Vaughn Outline Why, why, why! When duct tape isn t enough Building an API for the web Core services

More information

Erlang. Joe Armstrong.

Erlang. Joe Armstrong. Erlang Joe Armstrong joe.armstrong@ericsson.com 1 Who is Joe? Inventor of Erlang, UBF, Open Floppy Grid Chief designer of OTP Founder of the company Bluetail Currently Software Architect Ericsson Current

More information

Outline. Introduction Concepts and terminology The case for static typing. Implementing a static type system Basic typing relations Adding context

Outline. Introduction Concepts and terminology The case for static typing. Implementing a static type system Basic typing relations Adding context Types 1 / 15 Outline Introduction Concepts and terminology The case for static typing Implementing a static type system Basic typing relations Adding context 2 / 15 Types and type errors Type: a set of

More information

PRE-CON WORKSHOP 5. Add intelligence to your solutions with AI, bots, and more. Brian Randell FROBISHER 5

PRE-CON WORKSHOP 5. Add intelligence to your solutions with AI, bots, and more. Brian Randell FROBISHER 5 MONDAY 14 th MAY WORKSHOP 1 WORKSHOP 2 WORKSHOP 3 WORKSHOP 4 WORKSHOP 5 WORKSHOP 6 WORKSHOP 7 WORKSHOP 8 WORKSHOP 9 Accelerated C# fundamentals Cloudbased with Microsoft Azure best practices Microservices

More information

Registering for the Apple Developer Program

Registering for the Apple Developer Program It isn t necessary to be a member of the Apple Developer Program if you don t intend to submit apps to the App Stores, or don t need the cloud-dependent features. We strongly recommend joining, though,

More information

Spot: A Programming Language for Verified Flight Software

Spot: A Programming Language for Verified Flight Software Spot: A Programming Language for Verified Flight Software Rob Bocchino (bocchino@jpl.nasa.gov) Ed Gamble (ed.gamble@jpl.nasa.gov) Kim Gostelow Jet Propulsion Laboratory Califor nia Institute of Technology

More information

Designing for Scalability. Patrick Linskey EJB Team Lead BEA Systems

Designing for Scalability. Patrick Linskey EJB Team Lead BEA Systems Designing for Scalability Patrick Linskey EJB Team Lead BEA Systems plinskey@bea.com 1 Patrick Linskey EJB Team Lead at BEA OpenJPA Committer JPA 1, 2 EG Member 2 Agenda Define and discuss scalability

More information

Cloud-Native Applications. Copyright 2017 Pivotal Software, Inc. All rights Reserved. Version 1.0

Cloud-Native Applications. Copyright 2017 Pivotal Software, Inc. All rights Reserved. Version 1.0 Cloud-Native Applications Copyright 2017 Pivotal Software, Inc. All rights Reserved. Version 1.0 Cloud-Native Characteristics Lean Form a hypothesis, build just enough to validate or disprove it. Learn

More information

Agile Development

Agile Development Agile Development 12-04-2013 Many flavors: Waterfall, Spiral Rapid Application Development (DSDM) Xtreme Programming (XP, an agile methodology) Usability Engineering Model, Star Iteration is done throughout

More information

HPX. High Performance ParalleX CCT Tech Talk Series. Hartmut Kaiser

HPX. High Performance ParalleX CCT Tech Talk Series. Hartmut Kaiser HPX High Performance CCT Tech Talk Hartmut Kaiser (hkaiser@cct.lsu.edu) 2 What s HPX? Exemplar runtime system implementation Targeting conventional architectures (Linux based SMPs and clusters) Currently,

More information

CSE 374 Programming Concepts & Tools

CSE 374 Programming Concepts & Tools CSE 374 Programming Concepts & Tools Hal Perkins Fall 2017 Lecture 22 Shared-Memory Concurrency 1 Administrivia HW7 due Thursday night, 11 pm (+ late days if you still have any & want to use them) Course

More information

Asynchronous Functions in C#

Asynchronous Functions in C# Asynchronous Functions in C# Asynchronous operations are methods and other function members that may have most of their execution take place after they return. In.NET the recommended pattern for asynchronous

More information

PROCESS VIRTUAL MEMORY. CS124 Operating Systems Winter , Lecture 18

PROCESS VIRTUAL MEMORY. CS124 Operating Systems Winter , Lecture 18 PROCESS VIRTUAL MEMORY CS124 Operating Systems Winter 2015-2016, Lecture 18 2 Programs and Memory Programs perform many interactions with memory Accessing variables stored at specific memory locations

More information

What is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read)

What is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read) 1 For the remainder of the class today, I want to introduce you to a topic we will spend one or two more classes discussing and that is source code control or version control. What is version control?

More information

Introducing Shared-Memory Concurrency

Introducing Shared-Memory Concurrency Race Conditions and Atomic Blocks November 19, 2007 Why use concurrency? Communicating between threads Concurrency in Java/C Concurrency Computation where multiple things happen at the same time is inherently

More information

Parallel Programming: Background Information

Parallel Programming: Background Information 1 Parallel Programming: Background Information Mike Bailey mjb@cs.oregonstate.edu parallel.background.pptx Three Reasons to Study Parallel Programming 2 1. Increase performance: do more work in the same

More information

Parallel Programming: Background Information

Parallel Programming: Background Information 1 Parallel Programming: Background Information Mike Bailey mjb@cs.oregonstate.edu parallel.background.pptx Three Reasons to Study Parallel Programming 2 1. Increase performance: do more work in the same

More information

Why I still develop synchronous web in the asyncio era. April 7th, 2017 Giovanni Barillari - pycon otto - Firenze, Italy

Why I still develop synchronous web in the asyncio era. April 7th, 2017 Giovanni Barillari - pycon otto - Firenze, Italy Why I still develop synchronous web in the asyncio era April 7th, 2017 Giovanni Barillari - pycon otto - Firenze, Italy Who am I? I m Gio! pronounced as Joe trust me, I m a physicist :) code principally

More information

GAVIN KING RED HAT CEYLON SWARM

GAVIN KING RED HAT CEYLON SWARM GAVIN KING RED HAT CEYLON SWARM CEYLON PROJECT A relatively new programming language which features: a powerful and extremely elegant static type system built-in modularity support for multiple virtual

More information

Notes from a Short Introductory Lecture on Scala (Based on Programming in Scala, 2nd Ed.)

Notes from a Short Introductory Lecture on Scala (Based on Programming in Scala, 2nd Ed.) Notes from a Short Introductory Lecture on Scala (Based on Programming in Scala, 2nd Ed.) David Haraburda January 30, 2013 1 Introduction Scala is a multi-paradigm language that runs on the JVM (is totally

More information

MRI Internals. Koichi Sasada.

MRI Internals. Koichi Sasada. MRI Internals Koichi Sasada ko1@heroku.com MRI Internals towards Ruby 3 Koichi Sasada ko1@heroku.com Today s talk Koichi is working on improving Ruby internals Introduce my ideas toward Ruby 3 Koichi Sasada

More information

Lifehack #1 - Automating Twitter Growth without Being Blocked by Twitter

Lifehack #1 - Automating Twitter Growth without Being Blocked by Twitter Lifehack #1 - Automating Twitter Growth without Being Blocked by Twitter Intro 2 Disclaimer 2 Important Caveats for Twitter Automation 2 Enter Azuqua 3 Getting Ready 3 Setup and Test your Connection! 4

More information

Asynchronous Interactions and Managing Modeless UI with Autodesk Revit API

Asynchronous Interactions and Managing Modeless UI with Autodesk Revit API Asynchronous Interactions and Managing Modeless UI with Autodesk Revit API Arnošt Löbel Sr. Principal Software Engineer, Autodesk, Inc. Class Summary In this class we will explore the realms of challenging

More information

Google Plugin for Eclipse

Google Plugin for Eclipse Google Plugin for Eclipse Not just for newbies anymore Miguel Mendez Tech Lead - Google Plugin for Eclipse 1 Overview Background AJAX Google Web Toolkit (GWT) App Engine for Java Plugin Design Principles

More information

SDC 2015 Santa Clara

SDC 2015 Santa Clara SDC 2015 Santa Clara Volker Lendecke Samba Team / SerNet 2015-09-21 (2 / 17) SerNet Founded 1996 Offices in Göttingen and Berlin Topics: information security and data protection Specialized on Open Source

More information

Using the Singularity Research Development Kit

Using the Singularity Research Development Kit Using the Research Development Kit James Larus & Galen Hunt Microsoft Research ASPLOS 08 Tutorial March 1, 2008 Outline Overview (Jim) Rationale & key decisions architecture Details (Galen) Safe Languages

More information

CSE 333 Lecture 1 - Systems programming

CSE 333 Lecture 1 - Systems programming CSE 333 Lecture 1 - Systems programming Steve Gribble Department of Computer Science & Engineering University of Washington Welcome! Today s goals: - introductions - big picture - course syllabus - setting

More information

Concurrency, Thread. Dongkun Shin, SKKU

Concurrency, Thread. Dongkun Shin, SKKU Concurrency, Thread 1 Thread Classic view a single point of execution within a program a single PC where instructions are being fetched from and executed), Multi-threaded program Has more than one point

More information

IBM s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM s sole discretion.

IBM s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM s sole discretion. Please note Copyright 2018 by International Business Machines Corporation (IBM). No part of this document may be reproduced or transmitted in any form without written permission from IBM IBM s statements

More information

Optimising large dynamic code bases.

Optimising large dynamic code bases. Optimising large dynamic code bases. Who am I? Duncan MacGregor Lead Software Engineer on the Magik on Java project at General Electric in Cambridge Aardvark179 on twitter 2 What is Magik? Dynamic, weakly

More information

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2004

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2004 CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2004 Lecture 9: Readers-Writers and Language Support for Synchronization 9.1.2 Constraints 1. Readers can access database

More information