The Rise and Rise of Dataflow in the JavaVerse

Size: px
Start display at page:

Download "The Rise and Rise of Dataflow in the JavaVerse"

Transcription

1 The Rise and Rise of Dataflow in the 1

2 The Plan for the Session Stuff. More stuff. Even more stuff possibly. Summary and conclusions maybe. Q & A Notice the flow going on here. 2

3 Some Definitions Dataflow moving data from one transformation to another. Javaverse the Java Platform: the JVM the Java compiler, and the standard library; other languages such as Kotlin, Ceylon, Groovy, Scala, Clojure, etc; other libraries from Bintray, Maven Central, etc. 3

4 More on the Term Dataflow Wikipedia: Dataflow can also be called stream processing or reactive programming. Dataflow programming is about pipelines. data flow programming promotes high-level functional style Streams, pipelines imply one-dimensional. 4

5 Some Libraries of Interest GPars Akka Quasar RxJava Apache Spark 5

6 What is a Program? n m 6

7 Example 7

8 Let s be a bit abstract for the moment. 8

9 Let Us Assume Java and public static Integer f1(final Integer i) { return i * 2; } public static Integer f2(final Integer i) { return i * 3; } public static Integer f3(final Integer i) { return i * 4; } All this in a class. 9

10 Compute a Value Given an Input public static Integer statementsequence(final Integer i) { final Integer i1 = f1(i); final Integer i2 = f2(i1); final Integer i3 = f3(i2); return i3; } Relatively declarative style. Quite dataflow oriented. 10

11 Diagrammatically 11

12 Compute a Value Given an Input public static Integer statementsequence(final Integer i) { final Integer i1 = f1(i); final Integer i2 = f2(i1); final Integer i3 = f3(i2); return i3; } Relatively declarative style. Quite dataflow oriented. 12

13 Compute a Value Given an Input public static Integer statementsequence(final Integer i) { Integer x = f1(i); x = f2(x); x = f3(x); return x; } Very traditional Imperative style. 13

14 State change vs. Data flow 14

15 Compute a Value Given an Input public static Integer functionapplication(final Integer i) { return f3(f2(f1(i))); } A more functional and declarative approach. 15

16 Diagrammatically 16

17 Compilers deal in dataflow analysis, let us not forget this view of a program. 17

18 That is all very Java, how about doing it with Frege? 18

19 The Frege Transforms f1 = (* 2) f2 = (* 3) f3 = (* 4) Pointfree definition Frege has top-level functions. of functions using partial evaluation. 19

20 Compute a Value Given an Input bindingsequencescalar i = f3 i3 where i2 = f1 i i3 = f2 i2 An Imperative style functional approach. 20

21 Diagrammatically 21

22 Compute a Value Given an Input functionapplicationscalarexplicit i = f3 (f2 (f1 i)) A more functional and declarative approach. 22

23 Compute a Value Given an Input functionapplicationscalar i = f3 $ f2 $ f1 $ i A more functional and declarative approach. 23

24 Compute a Value Given an Input functioncompositionscalar i = f3. f2. f1 $ i A more functional and declarative approach. 24

25 Diagrammatically 25

26 Let s do the maths 26

27 Function Composition f 3 (f 2 (f 1 ( x))) = (f 3 f 2 f 1 )( x) It s only a bit of maths, do not be afraid. 27

28 Compute a Value Given an Input functionsavedcompositionscalar i = f i where f = f3. f2. f1 A more functional and declarative approach. 28

29 This example is seriously unrealistic. 29

30 Make it a wee bit more realistic by switching to a potentially infinite dataset 30

31 let s stage this by doing a finite sequence first 31

32 let s go (statically compiled) Groovy Do not have to have classes, top-level functions are allowed. 32

33 The fs but Groovy Integer f1(final Integer i) { i * 2 } Integer f2(final Integer i) { i * 3 } Integer f3(final Integer i) { i * 4 } 33

34 Compute a Value Given an Input List<Integer> statementsequence(final List<Integer> l) { final result = new ArrayList<Integer>() for (final Integer i: l) { final i1 = f1(i) final i2 = f2(i1) final i3 = f3(i2) result.add(i3) } result } 34

35 Compute a Value Given an Input List<Integer> statementsequence(final List<Integer> l) { final result = new ArrayList<Integer>() for (final Integer i: l) { def x = f1(i) x = f2(x) x = f3(x) result.add(x) } result } 35

36 Compute a Value Given an Input List<Integer> functionapplication(final List<Integer> l) { final result = new ArrayList<Integer>() for (final Integer i : l) { result.add(f3(f2(f1(i)))) } result } 36

37 But this is all about state, no real dataflow. So 37

38 Compute a Value Given an Input List<Integer> usingstream(final List<Integer> l) { l.stream().map(this.&f1).map(this.&f2).map(this.&f3).collect(collectors.tolist()) } This is using Streams from the Java Platform library. 38

39 Diagrammatically 39

40 Diagrammatically 40

41 Compute a Value Given an Input List<Integer> usingstream(final List<Integer> l) { l.stream().map(this.&f1) Intermediate.map(this.&f2).map(this.&f3) Terminal.collect(Collectors.toList()) } This is using Streams from the Java Platform library. 41

42 Do this with explicit composition? 42

43 Frege functioncompositionsequence l = map (f3. f2. f1) l 43

44 Let s introduce a new language: Kotlin Do not have to have classes, top-level functions are allowed. 44

45 The Three Functions fun f1(i:int):int = i * 2 fun f2(i:int):int = i * 3 fun f3(i:int):int = i * 4 We can already tell that Kotlin will be lots of fun. 45

46 Using Streams fun usingstream(l:list<int>):list<int> = l.stream().map(::f1).map(::f2).map(::f3).collect(collectors.tolist<int>()) 46

47 Kotlin version fun usingmap(l:list<int>):list<int> = l.map(::f1).map(::f2).map(::f3) 47

48 Using composition fun usingcomposedmap(l:list<int>):list<int > = l.map(::f1 compose ::f2 compose ::f3) 48

49 Kotlin Compose infix fun<v, T, R> Function1<T, R>.compose(before: (V) -> T): (V) -> R { return { v: V -> this(before(v)) } } t b (i) = t (b(i)) 49

50 But this is still finite, what about potentially infinite? 50

51 Cannot do collect. Map is another name for collect in most circumstances. 51

52 Infinite Data With an infinite data sequence you can: Do some form of reduction Or windowing. Perform a side-effect, e.g. output. 52

53 New (more realistic) problem 53

54 Cumulative mean and Standard deviation. 54

55 Equation warning: please do not be afraid. 55

56 1 n x = i=0 x i n n 1 2 s= (x x ) i i=0 n 1 56

57 1 n x = i=0 x i n n s= (( i=0 x i ) n x ) n 1 57

58 58

59 I only do equations after being fed 59

60 Code? 60

61 A little architecture first. 61

62 62

63 Code. 63

64 What s the Message? Small, single threaded, communicating processes are easy to program. (Communicating Sequential Processes, CSP) Threadpools and processpools make parallelism easy to realize, without manual locks. Most calculations and dataset are now very big, hence Big Data. 64

65 Parallelism is mandatory For Big Data. 65

66 Dataflow not state is required for parallelism. 66

67 The Rise and Rise of Dataflow in the 67

68 But before I go 68

69 69

70 Q & A 70

71 The Rise and Rise of Dataflow in the 71

GPars. Russel Winder. The concurrency and parallelism framework for Groovy and Java applications.

GPars. Russel Winder. The concurrency and parallelism framework for Groovy and Java applications. GPars The concurrency and parallelism framework for Groovy and Java applications Russel Winder @russel_winder russel@winder.org.uk http://www.russel.org.uk Aims and Goals Convince people that they: Can

More information

Tales from the Workshops

Tales from the Workshops Tales from the Workshops Dr Russel Winder email: russel@winder.org.uk twitter: @russel_winder Web: http://www.russel.org.uk 1 Agile is the new black. 2 Aims, goals, objectives 3 Aims, goals, objectives

More information

JVM Survival Guide. Hadi Hariri

JVM Survival Guide. Hadi Hariri JVM Survival Guide Hadi Hariri This talk For What For Who 20 years of Java The Sun and The Oracle Java The Language Java The Virtual Machine Java The Ecosystem The Community Community Driven Not Vendor-Driven

More information

Stop coding Pascal. Saturday, April 6, 13

Stop coding Pascal. Saturday, April 6, 13 Stop coding Pascal...emotional sketch about past, present and future of programming languages, Python, compilers, developers, Life, Universe and Everything Alexey Kachayev CTO at KitApps Inc. Open source

More information

Refactoring to Functional. Hadi Hariri

Refactoring to Functional. Hadi Hariri Refactoring to Functional Hadi Hariri Functional Programming In computer science, functional programming is a programming paradigm, a style of building the structure and elements of computer programs,

More information

Foundations of Dataflow Analysis

Foundations of Dataflow Analysis Foundations of Dataflow Analysis 15-745 Optimizing Compilers Spring 2006 Peter Lee Ingredients of a dataflow analysis direction: forward or backward flow/transfer function combining ( meet ) operator dataflow

More information

Processing of big data with Apache Spark

Processing of big data with Apache Spark Processing of big data with Apache Spark JavaSkop 18 Aleksandar Donevski AGENDA What is Apache Spark? Spark vs Hadoop MapReduce Application Requirements Example Architecture Application Challenges 2 WHAT

More information

Functional Programming Patterns And Their Role Instructions

Functional Programming Patterns And Their Role Instructions Functional Programming Patterns And Their Role Instructions In fact, the relabelling function is precisely the same as before! Phil Wadler's Chapter 7 of The Implementation of Functional Programming Languages.

More information

Reactive Programming in Java. Copyright - Syncogni Consulting Pvt Ltd. All rights reserved.

Reactive Programming in Java. Copyright - Syncogni Consulting Pvt Ltd. All rights reserved. Reactive Programming in Java Copyright - Syncogni Consulting Pvt Ltd. All rights reserved. Prerequisites: Core Java Lambda Expressions Method references Functional Programming Web - application development

More information

Concurrency: what, why, how

Concurrency: what, why, how Concurrency: what, why, how Oleg Batrashev February 10, 2014 what this course is about? additional experience with try out some language concepts and techniques Grading java.util.concurrent.future? agents,

More information

Shared state model. April 3, / 29

Shared state model. April 3, / 29 Shared state April 3, 2012 1 / 29 the s s limitations of explicit state: cells equivalence of the two s programming in limiting interleavings locks, monitors, transactions comparing the 3 s 2 / 29 Message

More information

Declarative concurrency. March 3, 2014

Declarative concurrency. March 3, 2014 March 3, 2014 (DP) what is declarativeness lists, trees iterative comutation recursive computation (DC) DP and DC in Haskell and other languages 2 / 32 Some quotes What is declarativeness? ness is important

More information

Distributed Programming

Distributed Programming Distributed Programming Marcel Heinz & Ralf Lämmel Software Languages Team University of Koblenz-Landau Motivation How can we achieve better performance? How can we distribute computations? How can we

More information

Ohua: Implicit Dataflow Programming for Concurrent Systems

Ohua: Implicit Dataflow Programming for Concurrent Systems Ohua: Implicit Dataflow Programming for Concurrent Systems Sebastian Ertel Compiler Construction Group TU Dresden, Germany Christof Fetzer Systems Engineering Group TU Dresden, Germany Pascal Felber Institut

More information

Apache Flink. Alessandro Margara

Apache Flink. Alessandro Margara Apache Flink Alessandro Margara alessandro.margara@polimi.it http://home.deib.polimi.it/margara Recap: scenario Big Data Volume and velocity Process large volumes of data possibly produced at high rate

More information

Fundamentals of Stream Processing with Apache Beam (incubating)

Fundamentals of Stream Processing with Apache Beam (incubating) Google Docs version of slides (including animations): https://goo.gl/yzvlxe Fundamentals of Stream Processing with Apache Beam (incubating) Frances Perry & Tyler Akidau @francesjperry, @takidau Apache

More information

Introduction to Functional Programming

Introduction to Functional Programming A Level Computer Science Introduction to Functional Programming William Marsh School of Electronic Engineering and Computer Science Queen Mary University of London Aims and Claims Flavour of Functional

More information

Concurrency: what, why, how

Concurrency: what, why, how Concurrency: what, why, how May 28, 2009 1 / 33 Lecture about everything and nothing Explain basic idea (pseudo) vs. Give reasons for using Present briefly different classifications approaches models and

More information

Spring MVC 4.x Spring 5 Web Reactive

Spring MVC 4.x Spring 5 Web Reactive Part 1 Spring MVC 4.x Spring 5 Web Reactive Rossen Stoyanchev @rstoya05 Spring MVC 4.3 Reactive programming for Java devs Spring 5 Web Reactive Shortcut Annotations @RequestMapping @GetMapping @PostMapping

More information

UI-Testing, Reactive Programming and some Kotlin.

UI-Testing, Reactive Programming and some Kotlin. UI-Testing, Reactive Programming and some Kotlin anders.froberg@liu.se Load up your guns, and bring your friends This is the end, My only Friend, the end Äntligen stod prästen i predikstolen I ll be back

More information

Compact and safely: static DSL on Kotlin. Dmitry Pranchuk

Compact and safely: static DSL on Kotlin. Dmitry Pranchuk Compact and safely: static DSL on Kotlin Dmitry Pranchuk 1 About me Dmitry Pranchuk Developer at Back-end + a little bit of devops @cortwave at gitter d.pranchuk@gmail.com 2 Problem 1. Some libraries have

More information

Lecture 8: Summary of Haskell course + Type Level Programming

Lecture 8: Summary of Haskell course + Type Level Programming Lecture 8: Summary of Haskell course + Type Level Programming Søren Haagerup Department of Mathematics and Computer Science University of Southern Denmark, Odense October 31, 2017 Principles from Haskell

More information

Building a (resumable and extensible) DSL with Apache Groovy Jesse Glick CloudBees, Inc.

Building a (resumable and extensible) DSL with Apache Groovy Jesse Glick CloudBees, Inc. Building a (resumable and extensible) DSL with Apache Groovy Jesse Glick CloudBees, Inc. Introduction About Me Longtime Jenkins core contributor Primary developer on Jenkins Pipeline Meet Jenkins Pipeline

More information

Seminar on Languages for Scientific Computing Aachen, 6 Feb Navid Abbaszadeh.

Seminar on Languages for Scientific Computing Aachen, 6 Feb Navid Abbaszadeh. Scientific Computing Aachen, 6 Feb 2014 navid.abbaszadeh@rwth-aachen.de Overview Trends Introduction Paradigms, Data Structures, Syntax Compilation & Execution Concurrency Model Reference Types Performance

More information

1B1a Arrays. Arrays. Indexing. Naming arrays. Why? Using indexing. 1B1a Lecture Slides. Copyright 2003, Graham Roberts 1

1B1a Arrays. Arrays. Indexing. Naming arrays. Why? Using indexing. 1B1a Lecture Slides. Copyright 2003, Graham Roberts 1 Ba Arrays Arrays A normal variable holds value: An array variable holds a collection of values: 4 Naming arrays An array has a single name, so the elements are numbered or indexed. 0 3 4 5 Numbering starts

More information

Cords and gumballs. Mike Hearn.

Cords and gumballs. Mike Hearn. Cords and gumballs Mike Hearn mike@r3.com Who what why huh?! Who am I? Kotlin early adopter: first patch to Kotlin website Sept 2014, introduced to my first product Feb 2015. Lead Platform Engineer on

More information

Apache Spark is a fast and general-purpose engine for large-scale data processing Spark aims at achieving the following goals in the Big data context

Apache Spark is a fast and general-purpose engine for large-scale data processing Spark aims at achieving the following goals in the Big data context 1 Apache Spark is a fast and general-purpose engine for large-scale data processing Spark aims at achieving the following goals in the Big data context Generality: diverse workloads, operators, job sizes

More information

Using Scala for building DSL s

Using Scala for building DSL s Using Scala for building DSL s Abhijit Sharma Innovation Lab, BMC Software 1 What is a DSL? Domain Specific Language Appropriate abstraction level for domain - uses precise concepts and semantics of domain

More information

JVM ByteCode Interpreter

JVM ByteCode Interpreter JVM ByteCode Interpreter written in Haskell (In under 1000 Lines of Code) By Louis Jenkins Presentation Schedule ( 15 Minutes) Discuss and Run the Virtual Machine first

More information

CSE 444: Database Internals. Lecture 23 Spark

CSE 444: Database Internals. Lecture 23 Spark CSE 444: Database Internals Lecture 23 Spark References Spark is an open source system from Berkeley Resilient Distributed Datasets: A Fault-Tolerant Abstraction for In-Memory Cluster Computing. Matei

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Fall 2017 Lecture 7b Andrew Tolmach Portland State University 1994-2017 Type Inference Some statically typed languages, like ML (and to a lesser extent Scala), offer alternative

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

A Survey of Concurrency Constructs. Ted Leung Sun

A Survey of Concurrency Constructs. Ted Leung Sun A Survey of Concurrency Constructs Ted Leung Sun Microsystems ted.leung@sun.com @twleung 16 threads 128 threads Today s model Threads Program counter Own stack Shared Memory Locks Some of the problems

More information

Kotlin for the Pragmatic Functionalist

Kotlin for the Pragmatic Functionalist Kotlin for the Pragmatic Functionalist Paco Estevez Kotlin logo: 2015-present - JetBrains KotlinConf logo: 2017 - JetBrains Kategory logo: 2017 present - The Kategory maintainers ReasonML logo: 2015 present

More information

Types II. Hwansoo Han

Types II. Hwansoo Han Types II Hwansoo Han Arrays Most common and important composite data types Homogeneous elements, unlike records Fortran77 requires element type be scalar Elements can be any type (Fortran90, etc.) A mapping

More information

Reactive Programming in Java. Copyright - Syncogni Consulting Pvt Ltd. All rights reserved.

Reactive Programming in Java. Copyright - Syncogni Consulting Pvt Ltd. All rights reserved. Reactive Programming in Java Copyright - Syncogni Consulting Pvt Ltd. All rights reserved. Prerequisites: Functional Programming as in Java 8 Streams of Java 8 Lambda expressions Method references Expectations

More information

Lambda Calculus and Type Inference

Lambda Calculus and Type Inference Lambda Calculus and Type Inference Björn Lisper Dept. of Computer Science and Engineering Mälardalen University bjorn.lisper@mdh.se http://www.idt.mdh.se/ blr/ October 13, 2004 Lambda Calculus and Type

More information

CSE373: Data Structures & Algorithms Lecture 23: Course Victory Lap. Kevin Quinn Fall 2015

CSE373: Data Structures & Algorithms Lecture 23: Course Victory Lap. Kevin Quinn Fall 2015 CSE373: Data Structures & Algorithms Lecture 23: Course Victory Lap Kevin Quinn Fall 2015 Today Rest-of-course logistics: exam, etc. Review of main course themes Course evaluations Thoughtful and constructive

More information

An Introduction to The Beam Model

An Introduction to The Beam Model An Introduction to The Beam Model Apache Beam (incubating) Slides by Tyler Akidau & Frances Perry, April 2016 Agenda 1 Infinite, Out-of-order Data Sets 2 The Evolution of the Beam Model 3 What, Where,

More information

The Haskell HOP: Higher-order Programming

The Haskell HOP: Higher-order Programming The Haskell HOP: Higher-order Programming COS 441 Slides 6 Slide content credits: Ranjit Jhala, UCSD Agenda Haskell so far: First-order functions This time: Higher-order functions: Functions as data, arguments

More information

Who am I? Harlan Iverson. Programming enthusiast. Seeker of truth. Imperfect. I'll be wrong about some things. Please correct me if you can.

Who am I? Harlan Iverson. Programming enthusiast. Seeker of truth. Imperfect. I'll be wrong about some things. Please correct me if you can. Who am I? Harlan Iverson. Programming enthusiast. Seeker of truth. Imperfect. I'll be wrong about some things. Please correct me if you can. P.S... I hate boring presentations. Please, engage and stay

More information

Chapter 8 :: Composite Types

Chapter 8 :: Composite Types Chapter 8 :: Composite Types Programming Language Pragmatics, Fourth Edition Michael L. Scott Copyright 2016 Elsevier 1 Chapter08_Composite_Types_4e - Tue November 21, 2017 Records (Structures) and Variants

More information

Spark 2. Alexey Zinovyev, Java/BigData Trainer in EPAM

Spark 2. Alexey Zinovyev, Java/BigData Trainer in EPAM Spark 2 Alexey Zinovyev, Java/BigData Trainer in EPAM With IT since 2007 With Java since 2009 With Hadoop since 2012 With EPAM since 2015 About Secret Word from EPAM itsubbotnik Big Data Training 3 Contacts

More information

Reactive programming: origins & ecosystem. Jonas Chapuis, Ph.D.

Reactive programming: origins & ecosystem. Jonas Chapuis, Ph.D. Reactive programming: origins & ecosystem Jonas Chapuis, Ph.D. Timeline Functional Reactive Animation (Fran Library, Haskell) Rx 1.0 for.net, Erik Meijer & team at Microsoft Elm language Rx for Java, Netflix

More information

Futures. Prof. Clarkson Fall Today s music: It's Gonna be Me by *NSYNC

Futures. Prof. Clarkson Fall Today s music: It's Gonna be Me by *NSYNC Futures Prof. Clarkson Fall 2017 Today s music: It's Gonna be Me by *NSYNC Review Previously in 3110: Functional programming Modular programming Interpreters Formal methods Final unit of course: Advanced

More information

CS 112 Introduction to Computing II. Wayne Snyder Computer Science Department Boston University

CS 112 Introduction to Computing II. Wayne Snyder Computer Science Department Boston University 9/5/6 CS Introduction to Computing II Wayne Snyder Department Boston University Today: Arrays (D and D) Methods Program structure Fields vs local variables Next time: Program structure continued: Classes

More information

LOGIC in computer science, engineering, industry (and, time permitting, math) Yuri Gurevich Microsoft Research

LOGIC in computer science, engineering, industry (and, time permitting, math) Yuri Gurevich Microsoft Research LOGIC in computer science, engineering, industry (and, time permitting, math) Yuri Gurevich Microsoft Research 1 ALL MAJOR LOGIC IDEAS OF PRE-COMPUTER AGE FOUND APPLICATIONS IN CS 2 Types Frege; Russell

More information

Architecture using Functional Programming concepts < + >

Architecture using Functional Programming concepts < + > Architecture using Functional Programming concepts < + > Jorge Castillo @JorgeCastilloPr 1 2 Kotlin and Functional Programming FP means concern separation (declarative computations vs runtime execution),

More information

Going Reactive with Spring 5. JavaSkop 18

Going Reactive with Spring 5. JavaSkop 18 Going Reactive with Spring 5 JavaSkop 18 Who am I? Java Technical Lead at Seavus 17 years in the industry Spring Certified Professional You can find me at: drazen.nikolic@seavus.com @drazenis programminghints.com

More information

Functional programming in C#

Functional programming in C# Functional programming in C# A quick approach to another paradigm Nacho Iborra IES San Vicente This work is licensed under the Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International License.

More information

Parallel Computing Prof. Subodh Kumar Department of Computer Science & Engineering Indian Institute of Technology Delhi

Parallel Computing Prof. Subodh Kumar Department of Computer Science & Engineering Indian Institute of Technology Delhi Parallel Computing Prof. Subodh Kumar Department of Computer Science & Engineering Indian Institute of Technology Delhi Module No # 01 Lecture No # 02 Parallel Programming Paradigms (Refer Slide Time:

More information

Data Processing with Apache Beam (incubating) and Google Cloud Dataflow

Data Processing with Apache Beam (incubating) and Google Cloud Dataflow Data Processing with Apache Beam (incubating) and Google Cloud Dataflow Jelena Pjesivac-Grbovic Staff software engineer Cloud Big Data In collaboration with Frances Perry, Tayler Akidau, and Dataflow team

More information

HOW WE MOVED FROM JAVA TO SCALA

HOW WE MOVED FROM JAVA TO SCALA HOW WE MOVED FROM JAVA TO SCALA Graham Tackley guardian.co.uk @tackers mostly HOW WE MOVED FROM ^ JAVA TO SCALA Graham Tackley guardian.co.uk @tackers History Java shop since 2006 guardian.co.uk: java

More information

Kotlin for Android Developers

Kotlin for Android Developers Kotlin for Android Developers Learn Kotlin the easy way while developing an Android App Antonio Leiva This book is for sale at http://leanpub.com/kotlin-for-android-developers This version was published

More information

Mixed projects: Java + Kotlin. Svetlana Isakova

Mixed projects: Java + Kotlin. Svetlana Isakova Mixed projects: Java + Kotlin Svetlana Isakova Compilation of a mixed project *.kt kotlinc *.class *.jar *.java javac *.class Nullability Nullability Type =? Java Kotlin Nullability annotations @Nullable

More information

18-642: Code Style for Compilers

18-642: Code Style for Compilers 18-642: Code Style for Compilers 9/6/2018 2017-2018 Philip Koopman Programming can be fun, so can cryptography; however they should not be combined. Kreitzberg and Shneiderman 2017-2018 Philip Koopman

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Fall 2017 Lecture 2a Andrew Tolmach Portland State University 1994-2017 Review: Expressions Inspired by familiar mathematical notation Usually have recursive (tree-like) structure

More information

Processing Data Like Google Using the Dataflow/Beam Model

Processing Data Like Google Using the Dataflow/Beam Model Todd Reedy Google for Work Sales Engineer Google Processing Data Like Google Using the Dataflow/Beam Model Goals: Write interesting computations Run in both batch & streaming Use custom timestamps Handle

More information

Introduction to Functional Programming and Haskell. Aden Seaman

Introduction to Functional Programming and Haskell. Aden Seaman Introduction to Functional Programming and Haskell Aden Seaman Functional Programming Functional Programming First Class Functions Expressions (No Assignment) (Ideally) No Side Effects Different Approach

More information

Metadata for Component Optimisation

Metadata for Component Optimisation Metadata for Component Optimisation Olav Beckmann, Paul H J Kelly and John Darlington ob3@doc.ic.ac.uk Department of Computing, Imperial College London 80 Queen s Gate, London SW7 2BZ United Kingdom Metadata

More information

Functional Programming Lecture 1: Introduction

Functional Programming Lecture 1: Introduction Functional Programming Lecture 1: Introduction Viliam Lisý Artificial Intelligence Center Department of Computer Science FEE, Czech Technical University in Prague viliam.lisy@fel.cvut.cz Acknowledgements

More information

General Overview of Mozart/Oz

General Overview of Mozart/Oz General Overview of Mozart/Oz Peter Van Roy pvr@info.ucl.ac.be 2004 P. Van Roy, MOZ 2004 General Overview 1 At a Glance Oz language Dataflow concurrent, compositional, state-aware, object-oriented language

More information

Error Processing: An Exercise in Functional Design

Error Processing: An Exercise in Functional Design Error Processing: An Exercise in Functional Design COS 326 Andrew Appel This lecture from a great blog on F#: http://fsharpforfunandprofit.com/posts/recipe-part1/ slides copyright 2013-2015 David Walker

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Winter 2018 Lecture 7b Andrew Tolmach Portland State University 1994-2018 Dynamic Type Checking Static type checking offers the great advantage of catching errors early And

More information

Programming Languages

Programming Languages Programming Languages Tevfik Koşar Lecture - XVIII March 23 rd, 2006 1 Roadmap Arrays Pointers Lists Files and I/O 2 1 Arrays Two layout strategies for arrays Contiguous elements Row pointers Row pointers

More information

CS243 Homework 1. Winter Due: January 23, 2019 at 4:30 pm

CS243 Homework 1. Winter Due: January 23, 2019 at 4:30 pm CS243 Homework 1 Winter 2019 Due: January 23, 2019 at 4:30 pm Directions: Submit via Gradescope. You may use up to two of your remaining late days for this assignment, for a late deadline of January 25,

More information

Google Cloud Dataflow

Google Cloud Dataflow Google Cloud Dataflow A Unified Model for Batch and Streaming Data Processing Jelena Pjesivac-Grbovic STREAM 2015 Agenda 1 Data Shapes 2 Data Processing Tradeoffs 3 Google s Data Processing Story 4 Google

More information

CSC312 Principles of Programming Languages : Functional Programming Language. Copyright 2006 The McGraw-Hill Companies, Inc.

CSC312 Principles of Programming Languages : Functional Programming Language. Copyright 2006 The McGraw-Hill Companies, Inc. CSC312 Principles of Programming Languages : Functional Programming Language Overview of Functional Languages They emerged in the 1960 s with Lisp Functional programming mirrors mathematical functions:

More information

Reactive App using Actor model & Apache Spark. Rahul Kumar Software

Reactive App using Actor model & Apache Spark. Rahul Kumar Software Reactive App using Actor model & Apache Spark Rahul Kumar Software Developer @rahul_kumar_aws About Sigmoid We build realtime & big data systems. OUR CUSTOMERS Agenda Big Data - Intro Distributed Application

More information

CPL 2016, week 10. Clojure functional core. Oleg Batrashev. April 11, Institute of Computer Science, Tartu, Estonia

CPL 2016, week 10. Clojure functional core. Oleg Batrashev. April 11, Institute of Computer Science, Tartu, Estonia CPL 2016, week 10 Clojure functional core Oleg Batrashev Institute of Computer Science, Tartu, Estonia April 11, 2016 Overview Today Clojure language core Next weeks Immutable data structures Clojure simple

More information

1007 Imperative Programming Part II

1007 Imperative Programming Part II Agenda 1007 Imperative Programming Part II We ve seen the basic ideas of sequence, iteration and selection. Now let s look at what else we need to start writing useful programs. Details now start to be

More information

Distributed Systems. 22. Spark. Paul Krzyzanowski. Rutgers University. Fall 2016

Distributed Systems. 22. Spark. Paul Krzyzanowski. Rutgers University. Fall 2016 Distributed Systems 22. Spark Paul Krzyzanowski Rutgers University Fall 2016 November 26, 2016 2015-2016 Paul Krzyzanowski 1 Apache Spark Goal: generalize MapReduce Similar shard-and-gather approach to

More information

Microservices. Webservices with Scala (II) Microservices

Microservices. Webservices with Scala (II) Microservices Microservices Webservices with Scala (II) Microservices 2018 1 Content Deep Dive into Play2 1. Database Access with Slick 2. Database Migration with Flyway 3. akka 3.1. overview 3.2. akka-http (the http

More information

ARM 64-bit Register File

ARM 64-bit Register File ARM 64-bit Register File Introduction: In this class we will develop and simulate a simple, pipelined ARM microprocessor. Labs #1 & #2 build some basic components of the processor, then labs #3 and #4

More information

Developing Technology for Ratchet and Clank Future: Tools of Destruction

Developing Technology for Ratchet and Clank Future: Tools of Destruction Developing Technology for Ratchet and Clank Future: Tools of Destruction Mike Acton, Engine Director with Eric Christensen, Principal Programmer Sideline:

More information

Chuck Cartledge, PhD. 24 September 2017

Chuck Cartledge, PhD. 24 September 2017 Introduction Amdahl BD Processing Languages Q&A Conclusion References Big Data: Data Analysis Boot Camp Serial vs. Parallel Processing Chuck Cartledge, PhD 24 September 2017 1/24 Table of contents (1 of

More information

Clojure is. A dynamic, LISP-based. programming language. running on the JVM

Clojure is. A dynamic, LISP-based. programming language. running on the JVM (first '(Clojure.)) Clojure is A dynamic, LISP-based programming language running on the JVM Origin 2007, Rich Hickey.. 1958, John McCarthy Features Functional Homoiconic Immutability (persistent data

More information

CHAPTER 8. Copyright Cengage Learning. All rights reserved.

CHAPTER 8. Copyright Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS Copyright Cengage Learning. All rights reserved. SECTION 8.3 Equivalence Relations Copyright Cengage Learning. All rights reserved. The Relation Induced by a Partition 3 The Relation

More information

Functions. Def. Let A and B be sets. A function f from A to B is an assignment of exactly one element of B to each element of A.

Functions. Def. Let A and B be sets. A function f from A to B is an assignment of exactly one element of B to each element of A. Functions functions 1 Def. Let A and B be sets. A function f from A to B is an assignment of exactly one element of B to each element of A. a A! b B b is assigned to a a A! b B f ( a) = b Notation: If

More information

State and DStreams. Big Data Analysis with Scala and Spark Heather Miller

State and DStreams. Big Data Analysis with Scala and Spark Heather Miller State and DStreams Big Data Analysis with Scala and Spark Heather Miller State? So far, we ve approached Spark Streaming in the same way we have approached regular Spark. Assumption so far: Functional

More information

Welcome to. Instructor Marc Pomplun CS 470/670. Introduction to Artificial Intelligence 1/26/2016. Spring Selectivity in Complex Scenes

Welcome to. Instructor Marc Pomplun CS 470/670. Introduction to Artificial Intelligence 1/26/2016. Spring Selectivity in Complex Scenes Welcome to CS 470/670 Introduction to Artificial Intelligence Office: Lab: Instructor Marc Pomplun S-3-171 S-3-135 Office Hours: Tuesdays 4:00pm 5:30pm Thursdays 7:00pm 8:30pm Spring 2016 Instructor: Marc

More information

Math-2. Lesson 3-1. Equations of Lines

Math-2. Lesson 3-1. Equations of Lines Math-2 Lesson 3-1 Equations of Lines How can an equation make a line? y = x + 1 x -4-3 -2-1 0 1 2 3 Fill in the rest of the table rule x + 1 f(x) -4 + 1-3 -3 + 1-2 -2 + 1-1 -1 + 1 0 0 + 1 1 1 + 1 2 2 +

More information

Using the SDACK Architecture to Build a Big Data Product. Yu-hsin Yeh (Evans Ye) Apache Big Data NA 2016 Vancouver

Using the SDACK Architecture to Build a Big Data Product. Yu-hsin Yeh (Evans Ye) Apache Big Data NA 2016 Vancouver Using the SDACK Architecture to Build a Big Data Product Yu-hsin Yeh (Evans Ye) Apache Big Data NA 2016 Vancouver Outline A Threat Analytic Big Data product The SDACK Architecture Akka Streams and data

More information

Optimizing High-Performance Trading Solutions: An Engineering Perspective

Optimizing High-Performance Trading Solutions: An Engineering Perspective Optimizing High-Performance Trading Solutions: An Engineering Perspective Matt Davey, CTO Lab49 http://mdavey.wordpress.com April 2011 About Lab49 Lab49 is a strategy, design and technology consulting

More information

Scala Concurrency and Parallel Collections

Scala Concurrency and Parallel Collections Scala Concurrency and Parallel Collections Concurrent Programming Keijo Heljanko Department of Computer Science University School of Science November 23rd, 2016 Slides by Keijo Heljanko Scala Scala Originally

More information

Lab 1 Introduction to R

Lab 1 Introduction to R Lab 1 Introduction to R Date: August 23, 2011 Assignment and Report Due Date: August 30, 2011 Goal: The purpose of this lab is to get R running on your machines and to get you familiar with the basics

More information

It's All About Processes Communicating

It's All About Processes Communicating It's All About Processes Communicating Russel Winder email: russel@winder.org.uk xmpp: russel@winder.org.uk twitter: russel_winder 1 Aims, Goals and Objects Show that shared memory multi-threading should

More information

Operating Systems CMPSCI 377, Lec 2 Intro to C/C++ Prashant Shenoy University of Massachusetts Amherst

Operating Systems CMPSCI 377, Lec 2 Intro to C/C++ Prashant Shenoy University of Massachusetts Amherst Operating Systems CMPSCI 377, Lec 2 Intro to C/C++ Prashant Shenoy University of Massachusetts Amherst Department of Computer Science Why C? Low-level Direct access to memory WYSIWYG (more or less) Effectively

More information

Chapter 4 Java Language Fundamentals

Chapter 4 Java Language Fundamentals Chapter 4 Java Language Fundamentals Develop code that declares classes, interfaces, and enums, and includes the appropriate use of package and import statements Explain the effect of modifiers Given an

More information

16/10/2008. Today s menu. PRAM Algorithms. What do you program? What do you expect from a model? Basic ideas for the machine model

16/10/2008. Today s menu. PRAM Algorithms. What do you program? What do you expect from a model? Basic ideas for the machine model Today s menu 1. What do you program? Parallel complexity and algorithms PRAM Algorithms 2. The PRAM Model Definition Metrics and notations Brent s principle A few simple algorithms & concepts» Parallel

More information

Big data systems 12/8/17

Big data systems 12/8/17 Big data systems 12/8/17 Today Basic architecture Two levels of scheduling Spark overview Basic architecture Cluster Manager Cluster Cluster Manager 64GB RAM 32 cores 64GB RAM 32 cores 64GB RAM 32 cores

More information

Building a Scalable Recommender System with Apache Spark, Apache Kafka and Elasticsearch

Building a Scalable Recommender System with Apache Spark, Apache Kafka and Elasticsearch Nick Pentreath Nov / 14 / 16 Building a Scalable Recommender System with Apache Spark, Apache Kafka and Elasticsearch About @MLnick Principal Engineer, IBM Apache Spark PMC Focused on machine learning

More information

CSE341: Programming Languages Lecture 9 Function-Closure Idioms. Dan Grossman Winter 2013

CSE341: Programming Languages Lecture 9 Function-Closure Idioms. Dan Grossman Winter 2013 CSE341: Programming Languages Lecture 9 Function-Closure Idioms Dan Grossman Winter 2013 More idioms We know the rule for lexical scope and function closures Now what is it good for A partial but wide-ranging

More information

IntelliJ IDEA, the most intelligent Java IDE

IntelliJ IDEA, the most intelligent Java IDE IntelliJ IDEA, the most intelligent Java IDE IntelliJ IDEA, JetBrains flagship Java IDE, provides high-class support and productivity boosts for enterprise, mobile and web development in Java, Scala and

More information

What is it? CMSC 433 Programming Language Technologies and Paradigms Spring Approach 1. Disadvantage of Approach 1

What is it? CMSC 433 Programming Language Technologies and Paradigms Spring Approach 1. Disadvantage of Approach 1 CMSC 433 Programming Language Technologies and Paradigms Spring 2007 Singleton Pattern Mar. 13, 2007 What is it? If you need to make sure that there can be one and only one instance of a class. For example,

More information

Functional Languages. Hwansoo Han

Functional Languages. Hwansoo Han Functional Languages Hwansoo Han Historical Origins Imperative and functional models Alan Turing, Alonzo Church, Stephen Kleene, Emil Post, etc. ~1930s Different formalizations of the notion of an algorithm

More information

COSC 2P91. Introduction Part Deux. Week 1b. Brock University. Brock University (Week 1b) Introduction Part Deux 1 / 14

COSC 2P91. Introduction Part Deux. Week 1b. Brock University. Brock University (Week 1b) Introduction Part Deux 1 / 14 COSC 2P91 Introduction Part Deux Week 1b Brock University Brock University (Week 1b) Introduction Part Deux 1 / 14 Source Files Like most other compiled languages, we ll be dealing with a few different

More information

Semantics of programming languages

Semantics of programming languages Semantics of programming languages Informatics 2A: Lecture 27 John Longley School of Informatics University of Edinburgh jrl@inf.ed.ac.uk 21 November, 2011 1 / 19 1 2 3 4 2 / 19 Semantics for programming

More information

Fun facts about recursion

Fun facts about recursion Outline examples of recursion principles of recursion review: recursive linked list methods binary search more examples of recursion problem solving using recursion 1 Fun facts about recursion every loop

More information

The Reactive Landscape Clement Escoffier, Vert.x Core Developer, Red Hat

The Reactive Landscape   Clement Escoffier, Vert.x Core Developer, Red Hat The Reactive Landscape http://bit.ly/jfokus-reactive Clement Escoffier, Vert.x Core Developer, Red Hat Reactive all the things??? Elasticity Manifesto Actor System Asynchrony Programming Events 2 Message

More information