Thinking reactive. Who is speaking? Software developer at Seavus Member of JugMK coffee - code - pizza - repeat.

Slides:



Advertisements
Similar presentations
Chapter 10: Execution Models Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005.
Advertisements

Architecture and Measured Characteristics of a Cloud Based Internet of Things May 22, 2012 The 2012 International Conference.
Towards a Practical Composition Language Oscar Nierstrasz Software Composition Group University of Bern.
Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
Software Frame Simulator (SFS) Technion CS Computer Communications Lab (236340) in cooperation with ECI telecom Uri Ferri & Ynon Cohen January 2007.
@jamie_allen Reactive Applications2 This is an era of profound change.
7-1 INTRODUCTION: SoA Introduced SoA in Chapter 6 Service-oriented architecture (SoA) - perspective that focuses on the development, use, and reuse of.
Mesos A Platform for Fine-Grained Resource Sharing in Data Centers Benjamin Hindman, Andy Konwinski, Matei Zaharia, Ali Ghodsi, Anthony D. Joseph, Randy.
Programming in the Many Software Engineering Paradigm for the 21 st Century Nenad Medvidovic Center for Software Engineering Computer Science Department.
Software Architecture Design Instructor: Dr. Jerry Gao.
CS 501: Software Engineering Fall 2000 Lecture 16 System Architecture III Distributed Objects.
Active Messages: a Mechanism for Integrated Communication and Computation von Eicken et. al. Brian Kazian CS258 Spring 2008.
Computer Science Lecture 2, page 1 CS677: Distributed OS Last Class: Introduction Distributed Systems – A collection of independent computers that appears.
1 New Architectures Need New Languages A triumph of optimism over experience! Ian Watson 3 rd July 2009.
Stanford hci group / cs376 research topics in human-computer interaction I/O Toolkits Scott Klemmer 29 November 2005.
CSCI-383 Object-Oriented Programming & Design Lecture 15.
Resource Fabrics: The Next Level of Grids and Clouds Lei Shi.
Monads Technion – Institute of Technology Software Design (236700) Author: Gal Lalouche - Technion 2015 © 1.
Objective 1.2 Cloud Computing, Internet of Services and Advanced Software Engineering Arian Zwegers European Commission Information Society and Media Directorate.
Reactive Extensions Ye olde introduction and walk-through, with plenty o’ code.
Python Mini-Course University of Oklahoma Department of Psychology Day 2 – Lesson 6 Program Design 4/18/09 Python Mini-Course: Day 2 - Lesson 6 1.
© 2010 IBM Corporation IBM InfoSphere Streams Enabling a smarter planet Roger Rea InfoSphere Streams Product Manager Sept 15, 2010.
OPERATING SYSTEMS Goals of the course Definitions of operating systems Operating system goals What is not an operating system Computer architecture O/S.
Presented by Daniel Ortiz Esquivel R&D Software Engineer YAPC::Europe September 2015 Site:
International Symposium on Distributed Objects and Applications (DOA 2002) MetaSockets MetaSockets Run-Time Support for Adaptive Communication Services.
TTCN-3 MOST Challenges Maria Teodorescu
CS 345: Programming Language Paradigms Chris Brooks HR 510 MWF 11:00-12:05.
The ERA of API in the World of IoT Jing Zhang-Lee November, 2015.
Service Oriented Architecture + SOAP -Robin John.
Internet of Things. IoT Novel paradigm – Rapidly gaining ground in the wireless scenario Basic idea – Pervasive presence around us a variety of things.
Computer Simulation of Networks ECE/CSC 777: Telecommunications Network Design Fall, 2013, Rudra Dutta.
1 5/18/2007ã 2007, Spencer Rugaber Architectural Styles and Non- Functional Requirements Jan Bosch. Design and Use of Software Architectures. Addison-Wesley,
Matei Zaharia, in collaboration with Mosharaf Chowdhury, Tathagata Das, Ankur Dave, Haoyuan Li, Justin Ma, Murphy McCauley, Joshua Rosen, Reynold Xin,
CS223: Software Engineering
Fundamentals of Visual Modeling with UML Module 1: Introduction to Object Technology.
RxJava and SWT: Out with Events, in with FRP Ned Twigg All code examples available here.
Gerhard Dueck -- CS3013Architecture 1 Architecture-Centric Process  There is more to software development then going blindly through the workflows driven.
Robert Potočnik, Microsoft Pripeljite košček Azure sveta v vaš datacenter (WAP)
Two New UML Diagram Types Component Diagram Deployment Diagram.
High-level language programming paradigms. Programming languages come in many forms or 'paradigms'. Each form of language offers advantages over other.
RxJava and SWT: Out with Events, in with FRP
ORACLE SOA 11g ONLINE TRAINING
Chapter 13: I/O Systems.
CCL.
SERVICE ORIENTED ARCHITECTURE
Last Class: Introduction
Parallel Patterns.
Data Flow Architecture
IoT at the Edge Technical guidance deck.
Software Design and Architecture
Programming Models for SimMillennium
Get code and architecture on GitHub
Eng Computation & Data Science.
IoT at the Edge Technical guidance deck.
Chapter 1: Object-Oriented Thinking
Computer Simulation of Networks
Unit I Flash Cards Start.
Reactive microservice end to end from RxJava to the wire with gRPC
Computation Abstraction Going beyond programming language glue, or what we've missed from FP for so long in mainstream  googlewave.com!w+PgcakhgiA 
Mobile Agents M. L. Liu.
Android Topics UI Thread and Limited processing resources
Software Engineering with Reusable Components
Service Oriented Architecture + SOAP
Reactive Android Development
LECTURE 2: The Object Model
I/O Toolkits Scott Klemmer · 16 November 2006.
TELE3119: Trusted Networks Week 10
How to allow the program to know when to stop a loop.
Research Software Group
ONAP Architecture Principle Review
Presentation transcript:

Thinking reactive

Who is speaking? Software developer at Seavus Member of JugMK coffee - code - pizza - repeat

Agenda Reactive applications Reactive programming Demo

Reactive applications

Why reactive? End of the single-core, start of the multi-core era Everything is distributed - distribution across networked machines - cloud IoT around the corner with 26 billion devices Our traditional approach doesn’t work here, we need tooling to work with this type of distribution

Clarification Reactive application Reactive programming Functional reactive programming Responsive web-application

Clarification Reactive application => architectural pattern Reactive programming => async data flows Functional reactive programming => async data flows + FP Responsive web-application => Twitter Bootstrap

Spreadsheet as example of reactivity

Reactive: how? - In a pony = 5, maxNodes = = true) public class PaymentController = 500, timeUnit = = Provider.AKKA) public PaymentConfirmation makePayment(CreditCard card) = 800, timeUnit = TimeUnit.MILLISECONDS) public PaymentHistory getPastPayments() {... } }

Principles for Reactive Application ( Reactive Manifesto ) Reactive applications are: - Responsive - Resilient - Elastic - Message Driven

Reactive applications - summary Distributed in nature Need to be resilient to failure and adapt to changes Asynchronous all the way down

Reactive programming

Why do we need yet another programming model? Blocking is evil! We need (reactive/parallelizable/compossible/readable) asynchronous code. Async code is ugly! What about Callbacks? - no composition, have you heard of Callback Hell? What about Future ? - too easy to block with get() - complex beyond first level of composition

mApi.login(request, new Callback () public void success(LoginResponse s, Response response) { mApi.getRoutes(request, new Callback () public void success(RoutesResponses, Response response) {... public void failure(RetrofitError error) {} public void failure(RetrofitError error) {} }); Callback hell

Back to the Future

Future Non-blocking, asynchronous computation Holds a value which may become available at some point Either completes with success or failure Makes latency and asynchrony explicit

So what is reactive programming? In computing, reactive programming is a programming paradigm oriented around data flows and the propagation of change. Wikipedia Reactive programming is programming with asynchronous data streams.

Reactive mantra

Reactive Stream

Push model VS Pull model Producer in chargeConsumer in charge

Functional reactive programming Functional reactive programming is a programming paradigm for reactive programming using the building blocks of functional programming FRP uses functional utilities like map, filter, and reduce to create and process data streams which propagate changes through the system

Functions portable and re-usable behavior data changes, behavior can be reused functions as data transformation pipelines

Functions = data transformation pipelines List addresses = users.filter( user -> user.age > 18).map(user -> user.address).sortBy(user-> user.city).collect(toList()) Build increasingly complex behavior through a series of transformations driven by composing functions

Imperative vs Functional

Reactive programming tools Reactive extensions

Reactive programming tools Bacon.js Kefir.js Sodium - Functional Reactive Programming in C#, C++, Java, Haskell and Scala Scala.react etc..

Demo time – Smart home

Any questions?