RxJava. and WHY you should care. Jeroen Tietema

Size: px
Start display at page:

Download "RxJava. and WHY you should care. Jeroen Tietema"

Transcription

1 RxJava and WHY you should care Jeroen Tietema

2 Overview intro of RxJava why? some tips

3 What is RxJava? Java implementation of Reactive Extensions Reactive Extensions is.net implementation of Reactive Programming

4 What is Reactive programming? Reactive programming is a programming paradigm oriented around data ᴀ밄ows and the propagation of change. This means that it should be possible to express static or dynamic data ᴀ밄ows with ease in the programming languages used, and that the underlying execution model will automatically propagate changes through the data ᴀ밄ow. Wikipedia (Reactive Programming) TLDR; something with data ᴀ밄ows?

5 What is Reactive Extensions? Using Rx, developers represent asynchronous data streams with Observables, query asynchronous data streams using LINQ operators, and parameterize the concurrency in the asynchronous data streams using Schedulers. Simply put, Rx = Observables + LINQ + Schedulers. Microsoft Reactice Extensions Homepage

6 RxJava concepts Observables and the Observable Contract Subscribing and subscriptions operators

7 Observables Observables emit data when you subscribe to them. onnext (0.. ) onerror (0..1) oncompleted (0..1) Cannot call both onerror and oncompleted. Should never do any calls after the Subscriber unsubscribes. When multiple observers subscribe to the same Observable, it is up to the Observable to decide what to do with even emission.

8 Subscribers and Subscriptions Observable<Integer> myints = Observable.just(1, 2, 3, 4, 5);

9 Subscribers and Subscriptions Observable<Integer> myints = Observable.just(1, 2, 3, 4, 5); Subscription s = myints.subscribe(new Subscriber<Integer>() { void onnext(integer i) { // your Integer has arrived void oncompleted() { // Happy Friday!!! void onerror(throwable e) { // :' ( );

10 Subscribers and Subscriptions Observable<Integer> myints = Observable.just(1, 2, 3, 4, 5); Subscription s = myints.subscribe(new Subscriber<Integer>() { void onnext(integer i) { // your Integer has arrived void oncompleted() { // Happy Friday!!! void onerror(throwable e) { // :' ( ); // boring, boring! s.unsubscribe();

11 Operators Observable<Integer> myints = Observable.just(1, 2, 3, 4, 5);

12 Operators Observable<Integer> myints = Observable.just(1, 2, 3, 4, 5); Observable<Integer> evennumbers = myints.filter(i > i % 2 == 0)

13 Operators Observable<Integer> myints = Observable.just(1, 2, 3, 4, 5); Observable<Integer> evennumbers = myints.filter(i > i % 2 == 0); Observable<String> myintsasstrings = evennumbers.map(i > "My lovely int " + i);

14 Operators Observable<Integer> myints = Observable.just(1, 2, 3, 4, 5); Observable<Integer> evennumbers = myints.filter(i > i % 2 == 0); Observable<String> myintsasstrings = evennumbers.map(i > "My lovely int " + i); // Subscribing results in: onnext("my lovely int 2"); onnext("my lovely int 4"); oncompleted();

15 Operators (continued) Observable<Integer> helloasyncints = Observable.just(1, 2, 3, 4); // start emitting on Schedulers.io().subscribeOn(Schedulers.io()) // emit the results on main UI thread.observeon(androidschedulers.mainthread());

16 Operators (continued) Observable<Integer> helloasyncints = Observable.just(1, 2, 3, 4); // start emitting on Schedulers.io().subscribeOn(Schedulers.io()) // emit the results on main UI thread.observeon(androidschedulers.mainthread()); You can call observeon multiple times! AndroidSchedulers comes from RxAndroid

17 Operators (continued) Observable<Integer> helloasyncints = Observable.just(1, 2, 3, 4); // add a delay to emitted items on // Schedulers.computation().delay(500, TimeUnit.MILLISECONDS)

18 But WHY? Leonid Mamchenkov

19 Retrofit vs RxJava (async) myretrofitapi.somecall( new Callback<SomePojo>() { void onsuccess(somepojo mypojo) { // your awesomeness void onerror(retrofiterror error) { // deal with it ); Subscription s = myobservableapi.somecall().subscribeon(schedulers.io()).observeon(androidschedulers.mainthread()).subscribe(new Subscriber<SomePojo>() { void onnext(somepojo mypojo) { // your awesomeness void onerror(throwable error) { // deal with it void oncompleted() { // but... why? );

20 Retrofit vs RxJava (sync) SomePojo mypojo = myretrofitapi.somecall(); Subscription s = myobservableapi.somecall().subscribe(new Subscriber<SomePojo>() { void onnext(somepojo mypojo) { // your awesomeness void onerror(throwable error) { // deal with it void oncompleted() { // but... why? );

21 Freddie Alequin

22 Threading dilemma (or not?) // sync SomePojo mypojo = myretrofitapi.somecall(); Observable<SomePojo> myobservableapi.somecall(); // async myretrofitapi.somecall(mycallback); Observable<SomePojo> myobservableapi.somecall(); Decisions around threading are big decisions, but we end up making them in a ad-hoc fashion RxJava: You can worry about threading later!

23 For example

24 Observable<Account> observable = mydatabase.findaccount();

25 Observable<HomePageFeed> observable = mydatabase.findaccount().flatmap(myaccount > myapi.fetchhomepagefeed(myaccount))

26 Observable<HomePageFeed> observable = mydatabase.findaccount().flatmap(myaccount > myapi.fetchhomepagefeed(myaccount)).doonnext(myhomepagefeed > mycache.store(myhomepagefeed))

27 Observable<HomePageFeed> observable = mydatabase.findaccount().flatmap(myaccount > myapi.fetchhomepagefeed(myaccount)).doonnext(myhomepagefeed > mycache.store(myhomepagefeed)).subscribeon(schedulers.io()).observeon(androidschedulers.mainthread());

28 Subscription s = mydatabase.findaccount().flatmap(myaccount > myapi.fetchhomepagefeed(myaccount)).doonnext(myhomepagefeed > mycache.store(myhomepagefeed)).subscribeon(schedulers.io()).observeon(androidschedulers.mainthread()).subscribe(new Subscriber<HomePageFeed>() { void onnext(homepagefeed myhomepagefeed) { // render homepage feed void onerror(throwable error) { // show error dialog void oncompleted(){ );

29 Compared to:

30 mydatabase.findaccount(new DatabaseCallback<Account>() { ); void onquerycomplete(account account){

31 mydatabase.findaccount(new DatabaseCallback<Account>() { void onquerycomplete(account account){ myapi.gethomepage(account, new ApiCallback<HomePageFeed>() { void onresponse(homepagefeed homepage) { ); );

32 mydatabase.findaccount(new DatabaseCallback<Account>() { void onquerycomplete(account account){ myapi.gethomepage(account, new ApiCallback<HomePageFeed>() { ); void onresponse(homepagefeed homepage) { mycache.store(homepage); );

33 mydatabase.findaccount(new DatabaseCallback<Account>() { void onquerycomplete(account account){ myapi.gethomepage(account, new ApiCallback<HomePageFeed>() { ); void onresponse(homepagefeed homepage) { mycache.store(homepage); // < Disk IO on UI thread! );

34 mydatabase.findaccount(new DatabaseCallback<Account>() { void onquerycomplete(account account){ myapi.gethomepage(account, new ApiCallback<HomePageFeed>() { ); void onresponse(homepagefeed homepage) { new AsyncTask<Void, Void, Void>() { Void doinbackground(void... voids) { mycache.store(homepage); return null;.execute(); );

35 Benefits writing complicated threaded code becomes (relatively) easy. clear pattern to cancel background tasks through Subscriptions

36

37

38

39

40 Operators, operators, operators!! manipulating data can do threading but also replace conditional logic rjp

41 For example Subscription s = mycache.fetchhomepagefeed().concat(myapi.fetchhomepagefeed()).first().subscribe(new Subscriber // etc.

42 For example Subscription s = mycache.fetchhomepagefeed().concat(myapi.fetchhomepagefeed()).first().subscribe(new Subscriber // etc. vs HomePageFeed myfeed = mycache.fetchhomepagefeed(); if (myfeed == null) { myfeed = myapi.fetchhomepagefeed(); return myfeed;

43 Search example class MySearchView extends TextView { PublishSubject<String> subject = PublishSubject.create(); void init() { addtextchangedlistener(new TextWatcher() { //.. void aftertextchanged(editable s) { subject.onnext(s.tostring()); ); Observable<String> gettextobservable() { return subject;

44 Search example mysearchview.gettextobservable().filter(text > text.length > 2)

45 Search example mysearchview.gettextobservable().filter(text > text.length > 2).debounce(400, TimeUnit.MILLISECONDS)

46 Search example mysearchview.gettextobservable().filter(text > text.length > 2).debounce(400, TimeUnit.MILLISECONDS).observeOn(Schedulers.io()).flatMap(text > myapi.search(text))

47 Search example mysearchview.gettextobservable().filter(text > text.length > 2).debounce(400, TimeUnit.MILLISECONDS).observeOn(Schedulers.io()).flatMap(text > myapi.search(text)).observeon(androidschedulers.mainthread())

48 Search example Subscription s = mysearchview.gettextobservable().filter(text > text.length > 2).debounce(400, TimeUnit.MILLISECONDS).observeOn(Schedulers.io()).flatMap(text > myapi.search(text)).observeon(androidschedulers.mainthread()).subscribe(new Subscriber() { void onnext(searchresults results) { // render results void onerror(throwable someerror) { void oncompleted() { );

49 Search vanilla example mytextview.addtextchangedlistener(new TextWatcher() { void aftertextchanged(final Editable s) { if (s.tostring().length > 2) { );

50 Search vanilla example mytextview.addtextchangedlistener(new TextWatcher() { void aftertextchanged(final Editable s) { if (s.tostring().length > 2) { myhandler.postdelayed(new Runnable() void run() { );, 400L);

51 Search vanilla example mytextview.addtextchangedlistener(new TextWatcher() { void aftertextchanged(final Editable s) { if (s.tostring().length > 2) { myhandler.postdelayed(new Runnable() void run() { myasynctask = new FetchSuggestionsTask(); myasynctask.execute(s.tostring());, 400L); );

52 Search vanilla example mytextview.addtextchangedlistener(new TextWatcher() { void aftertextchanged(final Editable s) { if (s.tostring().length > 2) { if (mycallback!= null) { myhandler.removecallbacks(mycallback); mycallback = new Runnable() void run() { myasynctask = new FetchSuggestionsTask(); myasynctask.execute(s.tostring()); myhandler.postdelayed(mycallback, 400L); );

53 Search example Subscription s = mysearchview.gettextobservable().filter(text > text.length > 2).debounce(400, TimeUnit.MILLISECONDS).observeOn(Schedulers.io()).flatMap(text > myapi.search(text)).observeon(androidschedulers.mainthread()).subscribe(new Subscriber() { void onnext(searchresults results) { // render results void onerror(throwable someerror) { void oncompleted() { );

54 Craig Sunter

55 Creating Observables class MyObservableApi { public Observable<HomePageFeed> gethomepage(account account) { // wrong return Observable.just( mysynclegacyapi.gethomepage(account));

56 Defer + just = your friend! class MyObservableApi { public Observable<HomePageFeed> gethomepage(account account) { // right! return Observable.defer(() > Observable.just( mysynclegacyapi.gethomepage(account));

57 Testing model public void gethomepage_givenvalidaccount_returnshomepage() { TestSubscriber<HomePageFeed> s = new TestSubscriber<>(); myobservableapi.subscribe(s); s.assertcompleted(); s.assertvaluecount(1); HomePageFeed h = s.getonnextvalues().get(0);

58 Testing Presenter layer (Rx HQ) Inject your Schedulers Schedulers.immediate() will su 鍉䨈 ce most of the time. Use TestScheduler for more advanced use cases.

59 Testing time based public void test400milliesdelay() { TestScheduler testscheduler = new TestScheduler(); TestSubscriber<Integer> testsubscriber = new TestSubscriber<>(); Observable.just(1).delay(400, TimeUnit.MILLISECONDS, testscheduler).subscribe(testsubscriber); testscheduler.advancetimeby(200, TimeUnit.MILLISECONDS); testsubscriber.assertnovalues(); testscheduler.advancetimeby(200, TimeUnit.MILLISECONDS); testsubscriber.assertvaluecount(1); testsubscriber.assertcompleted();

60 Useful links Functional Reactive Programming with RxJava, Ben Christensen, Netᴀ밄ix Going Reactive, An Android Architectural Journey Matthias Käppler, Soundcloud Grokking RxJava, Dan Lew, Trello

61 Questions? Beatnik Photos

62 Thank you Slides are at: Contact me / jeroen@tietema.net

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

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

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

About 1. Chapter 1: Getting started with rx-java 2. Remarks 2. Versions 2. Examples 2. Installation or Setup 2. Hello, World! 3

About 1. Chapter 1: Getting started with rx-java 2. Remarks 2. Versions 2. Examples 2. Installation or Setup 2. Hello, World! 3 rx-java #rx-java Table of Contents About 1 Chapter 1: Getting started with rx-java 2 Remarks 2 Versions 2 Examples 2 Installation or Setup 2 Hello, World! 3 An introduction to RxJava 4 Understanding Marble

More information

BE PROACTIVE USE REACTIVE

BE PROACTIVE USE REACTIVE BE PROACTIVE USE REACTIVE This morning we re going to talk about reactive programming. We ll cover some of the what, why, and how, hopefully with a bend towards grasping the fundamentals. We ll have some

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

Reactive Programming in Java. by Vadym Kazulkin and Rodion Alukhanov, ip.labs GmbH

Reactive Programming in Java. by Vadym Kazulkin and Rodion Alukhanov, ip.labs GmbH Reactive Programming in Java by Vadym Kazulkin and Rodion Alukhanov, ip.labs GmbH ip.labs GmbH Agenda Reactive Programming in general Reactive Streams and JDK 9 Flow API RxJava 2 Spring Reactor 3 Demo

More information

Reactive Streams in the Web. Florian Stefan ebay Classifieds Group GOTO Berlin 2017

Reactive Streams in the Web. Florian Stefan ebay Classifieds Group GOTO Berlin 2017 Reactive Streams in the Web Florian Stefan ebay Classifieds Group GOTO Berlin 2017 Who am I? Florian Stefan mobile.de (ebay Classifieds Group) https://ebaytech.berlin/ fstefan@ebay.com @f_s_t_e_f_a_n https://github.com/florian-stefan/

More information

Reactive Extensions in JUCE. Martin Finke ADC 2017

Reactive Extensions in JUCE. Martin Finke ADC 2017 Reactive Extensions in JUCE Martin Finke ADC 2017 What is Rx? What is Rx? Programming Style for Bindings (think Value::Listener) Observable, Observer Language-independent (RxJava, RxJS, Rx.NET, ) RxCpp

More information

Reaktive Anwendungen mit RxJava. Dr. Michael Menzel

Reaktive Anwendungen mit RxJava. Dr. Michael Menzel Reaktive Anwendungen mit RxJava Dr. Michael Menzel DIGITALIZATION DIGITALIZATION DIGITALIZATION DIGITALIZATION REACTIVE ARCHITECTURES How can we build highly interactive (responsive) systems, which are

More information

ARCHETYPE MODERN ANDROID ARCHITECTURE STEPAN GONCHAROV / DENIS NEKLIUDOV

ARCHETYPE MODERN ANDROID ARCHITECTURE STEPAN GONCHAROV / DENIS NEKLIUDOV ARCHETYPE MODERN ANDROID ARCHITECTURE STEPAN GONCHAROV / DENIS NEKLIUDOV 90seconds.tv 14000+ VIDEOS 1200+ BRANDS 92+ COUNTRIES data class RegisterViewModelStateImpl( override val email: ObservableString

More information

Writing Reactive Application using Angular/RxJS, Spring WebFlux and Couchbase. Naresh Chintalcheru

Writing Reactive Application using Angular/RxJS, Spring WebFlux and Couchbase. Naresh Chintalcheru Writing Reactive Application using Angular/RxJS, Spring WebFlux and Couchbase Naresh Chintalcheru Who is Naresh Technology professional for 18+ years Currently, Technical Architect at Cars.com Lecturer

More information

Practical RxJava @SimonBasle @Couchbase @InfoQFR @bbl_fr the Plan & Goals RxJava 101 RxJava 101 migrate a Legacy application RxJava 101 learn Operators of interest migrate a Legacy application RxJava 101

More information

Introduction to reactive programming. Jonas Chapuis, Ph.D.

Introduction to reactive programming. Jonas Chapuis, Ph.D. Introduction to reactive programming Jonas Chapuis, Ph.D. Reactive programming is an asynchronous programming paradigm oriented around data flows and the propagation of change wikipedia Things happening

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

RXTDF - Version: 1. Asynchronous Computing and Composing Asynchronous and Event- Based

RXTDF - Version: 1. Asynchronous Computing and Composing Asynchronous and Event- Based RXTDF - Version: 1 Asynchronous Computing and Composing Asynchronous and Event- Based Asynchronous Computing and Composing Asynchronous and Event- Based RXTDF - Version: 1 5 days Course Description: 5

More information

Mobile application development using the ReactiveX framework

Mobile application development using the ReactiveX framework Masaryk University Faculty of Informatics Mobile application development using the ReactiveX framework Bachelor s Thesis Robin Křenecký Brno, Spring 2018 Masaryk University Faculty of Informatics Mobile

More information

The New HTTP Client API in Java 11

The New HTTP Client API in Java 11 The New HTTP Client API in Java 11 Sergey Kuksenko Java Platform Group, Oracle October, 2018 Safe Harbor Statement The following is intended to outline our general product directon. It is intended for

More information

ADBA Asynchronous Database Access

ADBA Asynchronous Database Access ADBA Asynchronous Database Access A new asynchronous API for connecting to a database Douglas Surber Kuassi Mensah JDBC Architect Director, Product Management Database Server Technologies July 18, 2018

More information

JAX-RS 2.1 Reloaded. Santiago Pericas-Geertsen JAX-RS Co-Spec Lead. #jax-rs

JAX-RS 2.1 Reloaded. Santiago Pericas-Geertsen JAX-RS Co-Spec Lead. #jax-rs JAX-RS 2.1 Reloaded Santiago Pericas-Geertsen JAX-RS Co-Spec Lead #jax-rs @spericas Agenda Reactive Extensions Server-Sent Events Non-Blocking IO #jax-rs @spericas Reactive Extensions #jax-rs @spericas

More information

Rx is a library for composing asynchronous and event-based programs using observable collections.

Rx is a library for composing asynchronous and event-based programs using observable collections. bartde@microsoft.com Slides license: Creative Commons Attribution Non-Commercial Share Alike See http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode Too hard today (f g)(x) = f(g(x)) Rx is a library

More information

MCSA Universal Windows Platform. A Success Guide to Prepare- Programming in C# edusum.com

MCSA Universal Windows Platform. A Success Guide to Prepare- Programming in C# edusum.com 70-483 MCSA Universal Windows Platform A Success Guide to Prepare- Programming in C# edusum.com Table of Contents Introduction to 70-483 Exam on Programming in C#... 2 Microsoft 70-483 Certification Details:...

More information

A Separation of Concerns Clean Architecture on Android

A Separation of Concerns Clean Architecture on Android A Separation of Concerns Clean Architecture on Android Kamal Kamal Mohamed Android Developer, //TODO Find Better Title @ Outware Mobile Ryan Hodgman Official Despiser of Utils Classes @ Outware Mobile

More information

MEAP Edition Manning Early Access Program RxJava for Android Developers Version 8

MEAP Edition Manning Early Access Program RxJava for Android Developers Version 8 MEAP Edition Manning Early Access Program RxJava for Android Developers Version 8 Copyright 2017 Manning Publications For more information on this and other Manning titles go to www.manning.com Manning

More information

VS08 This One Goes to Going Parallel with PFX, PLINQ, TPL and Async Keywords

VS08 This One Goes to Going Parallel with PFX, PLINQ, TPL and Async Keywords VS08 This One Goes to Going Parallel with PFX, PLINQ, TPL and Async Keywords Brian Noyes Chief Architect, IDesign Inc (www.idesign.net) brian.noyes@idesign.net, @briannoyes About Brian Chief Architect

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

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

Industry Communications

Industry Communications Customer location Netherlands Industry Communications Expertise Security and privacy solutions Summary ielement is a communications company that provides VPN solutions for secure and stable access to internet

More information

Streams, Functional & Reactive Programming with Java & Spring WebFlux WORKSHOP

Streams, Functional & Reactive Programming with Java & Spring WebFlux WORKSHOP Streams, Functional & Reactive Programming with Java & Spring WebFlux WORKSHOP 1 INTRODUCTION Goal for today: create a reactive REST service and actually know what we are doing To do that we ll explore

More information

Got a question during this session? Post it on sli.do ( #K100 )

Got a question during this session? Post it on sli.do ( #K100 ) Got a question during this session? Post it on sli.do ( #K100 ) RxJava, RxJava 2, Reactor State of the art of Reactive Streams on the JVM David Wursteisen Writing asynchronous code: it sucks Future ExecutorService

More information

An overview of (a)sync & (non-) blocking

An overview of (a)sync & (non-) blocking An overview of (a)sync & (non-) blocking or why is my web-server not responding? with funny fonts! Experiment & reproduce https://github.com/antonfagerberg/play-performance sync & blocking code sync &

More information

Using PostgreSQL in Tantan - From 0 to 350bn rows in 2 years

Using PostgreSQL in Tantan - From 0 to 350bn rows in 2 years Using PostgreSQL in Tantan - From 0 to 350bn rows in 2 years Victor Blomqvist vb@viblo.se Tantan ( 探探 ) December 2, PGConf Asia 2016 in Tokyo tantanapp.com 1 Sweden - Tantan - Tokyo 10 Million 11 Million

More information

The Road to Reactive with RxJava. Or: How to use non blocking I/O without wanting to kill yourself

The Road to Reactive with RxJava. Or: How to use non blocking I/O without wanting to kill yourself The Road to Reactive with RxJava Or: How to use non blocking I/O without wanting to kill yourself Legacy An accomplishment that remains relevant long after a person has died Software is not so lucky

More information

Reactive Programming with Vert.x

Reactive Programming with Vert.x Reactive Programming with Vert.x Embrace asynchronous to build responsive systems Clement Escoffier Principal Software Engineer, Red Hat Reactive The new gold rush? Reactive system, reactive manifesto,

More information

Data binding. in a Kotlin world. Lisa

Data binding. in a Kotlin world. Lisa Data binding in a Kotlin world Lisa Wray Data binding in a Kotlin world Lisa Wray Data binding in a Kotlin world Lisa Wray Less code is better code 1. Quick tour of The Best Parts of data binding 2. Kotlin

More information

Spring Framework 5.0 Reactive Web Application

Spring Framework 5.0 Reactive Web Application 2017 2016 Pivotal Software, Inc. All rights reserved. # Spring Framework 5.0 Reactive Web Application Toshiaki Maki (@making) 2016-05-17 Java Day Tokyo 2017 Who am I? Toshiaki Maki (@making) https://blog.ik.am

More information

Reactive programming and its effect on performance and the development process

Reactive programming and its effect on performance and the development process MASTER S THESIS LUND UNIVERSITY 2017 Reactive programming and its effect on performance and the development process Gustav Hochbergs Department of Computer Science Faculty of Engineering LTH ISSN 1650-2884

More information

Android and Flux: It s a match! Attila Polacsek Senior Android Developer Supercharge

Android and Flux: It s a match! Attila Polacsek Senior Android Developer Supercharge Android and Flux: It s a match! Attila Polacsek Senior Android Developer Supercharge INTRO INTRO WHAT IS FLUX? WHAT IS FLUX? What is FLUX? Application architecture Pattern, not a framework Created by Facebook

More information

Microsoft Visual C# Step by Step. John Sharp

Microsoft Visual C# Step by Step. John Sharp Microsoft Visual C# 2013 Step by Step John Sharp Introduction xix PART I INTRODUCING MICROSOFT VISUAL C# AND MICROSOFT VISUAL STUDIO 2013 Chapter 1 Welcome to C# 3 Beginning programming with the Visual

More information

Tishik Int. University / College of Science / IT Dept. This Course based mainly on online sources ADVANCED MOBILE APPLICATIONS / Spring 1

Tishik Int. University / College of Science / IT Dept. This Course based mainly on online sources ADVANCED MOBILE APPLICATIONS / Spring 1 ADVANCED MOBILE APPLICATIONS / 2018-2019 Spring Tishik Int. University / College of Science / IT Dept. Presented By: Mohammad Salim Al-Othman For 4 th Grade Students This Course based mainly on online

More information

Chris Guzman. Developer chris-guzman.com

Chris Guzman. Developer  chris-guzman.com WebSocket to me! Chris Guzman Developer Advocate @ Nexmo @speaktochris chris-guzman.com Before... Before... (A few years ago) HTTP Polling TCP/IP Sockets WebSockets /webˈsäkəts/ bi-directional realtime

More information

Diving into Android. By Jeroen Tietema. Jeroen Tietema,

Diving into Android. By Jeroen Tietema. Jeroen Tietema, Diving into Android By Jeroen Tietema Jeroen Tietema, 2015 1 Requirements 4 Android SDK 1 4 Android Studio (or your IDE / editor of choice) 4 Emulator (Genymotion) or a real device. 1 See https://developer.android.com

More information

REALM.IO NOSQL FOR MOBILE

REALM.IO NOSQL FOR MOBILE REALM.IO NOSQL FOR MOBILE Mitchell Tilbrook Twitter: @sir_tilbrook Mobile Engineer @ Seatfrog Android, ios, Xamarin Recording & Editing for 7+ meet-ups ANZCoders: https://www.youtube.com/c/ ANZCoders Android

More information

Asset tracking: Monitoring high-value mobile assets like locomotives, marine vessels and industrial equipment. Condition based Maintenance.

Asset tracking: Monitoring high-value mobile assets like locomotives, marine vessels and industrial equipment. Condition based Maintenance. 1 The Internet of Things (IoT) - expansion of the Internet to include physical devices; thereby bridging the divide between the physical world and cyberspace. These devices or \things" are uniquely identifiable,

More information

A simple, scalable app architecture with Android annotations Luke Sleeman Freelance Android developer lukesleeman.com.au

A simple, scalable app architecture with Android annotations Luke Sleeman Freelance Android developer lukesleeman.com.au A simple, scalable app architecture with Android annotations Luke Sleeman Freelance Android developer lukesleeman.com.au Image CC: https://flic.kr/p/6oqczb Agenda Introduction The architecture - an overview

More information

Functional Programming Invades Architecture. George Fairbanks SATURN May 2017

Functional Programming Invades Architecture. George Fairbanks SATURN May 2017 Functional Programming Invades Architecture George Fairbanks SATURN 2017 3 May 2017 1 Programming in the Large Yesterday: Functional Programming is PITS, i.e., just inside modules Today: FP is also PITL

More information

Concurrency: An Overview

Concurrency: An Overview CHAPTER 1 Concurrency: An Overview Concurrency is a key aspect of beautiful software. For decades, concurrency was possible but difficult. Concurrent software was difficult to write, difficult to debug,

More information

CS371m - Mobile Computing. Responsiveness

CS371m - Mobile Computing. Responsiveness CS371m - Mobile Computing Responsiveness An App Idea From Nifty Assignments Draw a picture use randomness Pick an equation at random Operators in the equation have the following property: Given an input

More information

Benefits of Concurrency in Java & Android: Program Structure

Benefits of Concurrency in Java & Android: Program Structure Benefits of Concurrency in Java & Android: Program Structure Douglas C. Schmidt d.schmidt@vanderbilt.edu www.dre.vanderbilt.edu/~schmidt Institute for Software Integrated Systems Vanderbilt University

More information

Fresh Async With Kotlin. Presented at QCon SF, 2017 /Roman JetBrains

Fresh Async With Kotlin. Presented at QCon SF, 2017 /Roman JetBrains Fresh Async With Kotlin Presented at QCon SF, 2017 /Roman Elizarov @ JetBrains Speaker: Roman Elizarov 16+ years experience Previously developed high-perf trading software @ Devexperts Teach concurrent

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

Modern app programming

Modern app programming Modern app programming with RxJava and Eclipse Vert.x #QConSP @vertx_project Who am I? Vert.x core team member since 2016 Working at since 2012 Contributing specifically to monitoring and clustering @tsegismont

More information

TIP Subscription Guide

TIP Subscription Guide TIP Subscription Guide 02 Table of Contents Subscription to The Investor s Podcast via: Mac 03 iphone/ipad 07 Windows (itunes) 13 Windows (Stitcher) 19 Android Phone 27 03 Subscription via Mac: Step 1

More information

Reactive Application Development

Reactive Application Development SAMPLE CHAPTER Reactive Application Development by Duncan DeVore, Sean Walsh and Brian Hanafee Sample Chapter 7 Copyright 2018 Manning Publications brief contents PART 1 FUNDAMENTALS... 1 1 What is a reactive

More information

Lecture 7: Process & Thread Introduction

Lecture 7: Process & Thread Introduction COMP 150-CCP Concurrent Programming Lecture 7: Process & Thread Introduction Dr. Richard S. Hall rickhall@cs.tufts.edu Concurrent programming February 7, 2008 Operating System Concepts Definition of a

More information

streams streaming data transformation á la carte

streams streaming data transformation á la carte streams streaming data transformation á la carte Deputy CTO #protip Think of the concept of streams as ephemeral, time-dependent, sequences of elements possibly unbounded in length in essence: transformation

More information

Going Reactive. Reactive Microservices based on Vert.x. JavaLand Kristian Kottke

Going Reactive. Reactive Microservices based on Vert.x. JavaLand Kristian Kottke Going Reactive Reactive Microservices based on Vert.x JavaLand Kristian Kottke Whoami Kristian Kottke Lead Software Engineer -> iteratec Interests Software Architecture Big Data Technologies Kristian.Kottke@iteratec.de

More information

Microsoft. Microsoft Visual C# Step by Step. John Sharp

Microsoft. Microsoft Visual C# Step by Step. John Sharp Microsoft Microsoft Visual C#- 2010 Step by Step John Sharp Table of Contents Acknowledgments Introduction xvii xix Part I Introducing Microsoft Visual C# and Microsoft Visual Studio 2010 1 Welcome to

More information

Erik Meijer Wes Dyer Jeffrey van Gogh Bart de Smet Matthew Podwysocki

Erik Meijer Wes Dyer Jeffrey van Gogh Bart de Smet Matthew Podwysocki Volta Quo Vadis? Erik Meijer Wes Dyer Jeffrey van Gogh Bart de Smet Matthew Podwysocki What? Fundamentally change the way you think about coordinating and orchestrating asynchronous and event-based programming

More information

CyberOffice: A Smart Mobile Application for Instant Meetings

CyberOffice: A Smart Mobile Application for Instant Meetings , pp.43-52 http://dx.doi.org/10.14257/ijseia.2014.8.1.04 CyberOffice: A Smart Mobile Application for Instant Meetings Dong Kwan Kim 1 and Jae Yoon Jung 2 1 Department of Computer Engineering, Mokpo National

More information

Concurrency: State Models & Design Patterns

Concurrency: State Models & Design Patterns Concurrency: State Models & Design Patterns Practical Session Week 02 1 / 13 Exercises 01 Discussion Exercise 01 - Task 1 a) Do recent central processing units (CPUs) of desktop PCs support concurrency?

More information

DATABASE SYSTEMS. Database programming in a web environment. Database System Course, 2016

DATABASE SYSTEMS. Database programming in a web environment. Database System Course, 2016 DATABASE SYSTEMS Database programming in a web environment Database System Course, 2016 AGENDA FOR TODAY Advanced Mysql More than just SELECT Creating tables MySQL optimizations: Storage engines, indexing.

More information

Multithreaded Programming

Multithreaded Programming Multithreaded Programming The slides do not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams. September 4, 2014 Topics Overview

More information

A simple, scalable app architecture with Android Annotations Luke Sleeman Freelance Android developer lukesleeman.com.au

A simple, scalable app architecture with Android Annotations Luke Sleeman Freelance Android developer lukesleeman.com.au A simple, scalable app architecture with Android Annotations Luke Sleeman Freelance Android developer lukesleeman.com.au Image CC: https://flic.kr/p/6oqczb Luke Sleeman - Freelance developer specialising

More information

Python Asynchronous Programming with Salt Stack (tornado, asyncio) and RxPY

Python Asynchronous Programming with Salt Stack (tornado, asyncio) and RxPY Python Asynchronous Programming with Salt Stack (tornado, asyncio) and RxPY PyCon Korea 2017 Kim Sol kstreee@gmail.com Python Asynchronous Programming with Salt Stack (tornado, asyncio) and RxPY Kim Sol

More information

Rx in the real world. 1 Rob Ciolli

Rx in the real world. 1 Rob Ciolli Rx in the real world 1 Rob Ciolli 2 Rob Ciolli 3 Rob Ciolli The App 4 Rob Ciolli Quick architecture overview 5 Rob Ciolli MV - WTF 6 Rob Ciolli Model Simple, immutable data struct returned from DB or APIs

More information

Android Best Practices

Android Best Practices Android Best Practices Agenda Introduction The clean architecture Testing Support library Libraries we can depend on What's next Introduction Introduction Android Studio Gradle Material Design Lollipop

More information

Reactive Programming and Clean Architecture in Android Development. Tung Bui Duy. Helsinki Metropolia University of Applied Sciences

Reactive Programming and Clean Architecture in Android Development. Tung Bui Duy. Helsinki Metropolia University of Applied Sciences Tung Bui Duy Reactive Programming and Clean Architecture in Android Development Helsinki Metropolia University of Applied Sciences Bachelor of Engineering Information Technology Thesis 27 April 2017 Abstract

More information

Rx: Curing your Asynchronous Programming Blues Bart J.F. De Smet

Rx: Curing your Asynchronous Programming Blues Bart J.F. De Smet Rx: Curing your Asynchronous Programming Blues Bart J.F. De Smet Microso' Corpora,on bartde@microso'.com Why Should I Care? GPS RSS feeds Stock,ckers Social media Server management Mission Statement Too

More information

Asynchronous Programming - Done right

Asynchronous Programming - Done right Asynchronous Programming - Done right ZWEI14. ZWEI14 - A DIGITAL AGENCY WITH CREATIVE DNA. Idea, concept, design, technology and engage in perfectly together. We are young but experienced, creative but

More information

Introduction to Threads

Introduction to Threads Computer Systems Introduction to Threads Race Conditions Single- vs. Multi-Threaded Processes Process Process Thread Thread Thread Thread Memory Memory Heap Stack Heap Stack Stack Stack Data Data Code

More information

Full Stack Reactive Angular 2, RxJava/JS, Vert.x, Docker

Full Stack Reactive Angular 2, RxJava/JS, Vert.x, Docker Full Stack Reactive Angular 2, RxJava/JS, Vert.x, Docker 02.03.2017 About Myself DR. ALEXANDER FRIED Chief Technology Officer 2 OUR SOLUTIONS DIGITAL ASSET MANAGEMENT Organize & Share Any File, Any Format,

More information

Using Panopto in Canvas

Using Panopto in Canvas Using Panopto in Canvas Panopto is a service that allows you to record and store video and audio ( podcasts ) recordings and link them to your Canvas courses. Panopto also supports live streaming of events.

More information

Leak Canary Intro Jennifer McGee

Leak Canary Intro Jennifer McGee Leak Canary Intro Jennifer McGee 1 Leak Canary What is Leak Canary? Open source library written by Square s Pierre-Yves (PY) Ricau Library which attempts to automatically detect and report memory leaks

More information

LINK System Customer Interface. Report Subscription

LINK System Customer Interface. Report Subscription Report Subscription 1 Customers can request specific reports from the LINK system to be generated at specific times based on different criteria to meet their unique needs through functionality called Report

More information

Java 8 Lambdas: Functional Programming For The Masses Ebook Gratuit

Java 8 Lambdas: Functional Programming For The Masses Ebook Gratuit Java 8 Lambdas: Functional Programming For The Masses Ebook Gratuit If you re a developer with core Java Se skills, this hands-on book takes you through the language changes in Java 8 triggered by the

More information

Upcoming Assignments Quiz Friday? Lab 5 due today Alpha Version due Friday, February 26

Upcoming Assignments Quiz Friday? Lab 5 due today Alpha Version due Friday, February 26 Upcoming Assignments Quiz Friday? Lab 5 due today Alpha Version due Friday, February 26 Inject one subtle defect (fault seeding) To be reviewed by a few class members Usability study by CPE 484 students

More information

Multiple Inheritance, Abstract Classes, Interfaces

Multiple Inheritance, Abstract Classes, Interfaces Multiple Inheritance, Abstract Classes, Interfaces Written by John Bell for CS 342, Spring 2018 Based on chapter 8 of The Object-Oriented Thought Process by Matt Weisfeld, and other sources. Frameworks

More information

ALMA MATER STUDIORUM UNIVERSITÀ DI BOLOGNA APPLYING THE REACTIVE PROGRAMMING PARADIGM: TOWARD A MORE DECLARATIVE APPLICATION DEVELOPMENT APPROACH

ALMA MATER STUDIORUM UNIVERSITÀ DI BOLOGNA APPLYING THE REACTIVE PROGRAMMING PARADIGM: TOWARD A MORE DECLARATIVE APPLICATION DEVELOPMENT APPROACH ALMA MATER STUDIORUM UNIVERSITÀ DI BOLOGNA SCUOLA DI INGEGNERIA E ARCHITETTURA CAMPUS DI CESENA CORSO DI LAUREA MAGISTRALE IN INGEGNERIA E SCIENZE INFORMATICHE APPLYING THE REACTIVE PROGRAMMING PARADIGM:

More information

CSE 153 Design of Operating Systems Fall 18

CSE 153 Design of Operating Systems Fall 18 CSE 153 Design of Operating Systems Fall 18 Lecture 2: OS model and Architectural Support Last time/today l Historic evolution of Operating Systems (and computing!) l Today: We start our journey in exploring

More information

Programming Without a Call Stack: Event-driven Architectures

Programming Without a Call Stack: Event-driven Architectures Programming Without a Call Stack: Event-driven Architectures Gregor Hohpe Google www.eaipatterns.com Gregor Hohpe Programming Without a Call Stack: Event-driven Architectures Slide 1 About Me Distributed

More information

Redux with JavaFX. Michael Heinrichs & Manuel Mauky

Redux with JavaFX. Michael Heinrichs & Manuel Mauky Redux with JavaFX Michael Heinrichs & Manuel Mauky Michael Heinrichs Manuel Mauky Functional Reactive Programming Functional Programming Declarative Immutable data No side effects Avoid state changes Active

More information

PostgreSQL Replication 2.0

PostgreSQL Replication 2.0 PostgreSQL Replication 2.0 NTT OSS Center Masahiko Sawada PGConf.ASIA 2017 Copyright 2017 NTT corp. All Rights Reserved. Who am I Masahiko Sawada @sawada_masahiko NTT Open Source Software Center PostgreSQL

More information

Overview of Java Threads (Part 3)

Overview of Java Threads (Part 3) Overview of Java Threads (Part 3) Douglas C. Schmidt d.schmidt@vanderbilt.edu www.dre.vanderbilt.edu/~schmidt Institute for Software Integrated Systems Vanderbilt University Nashville, Tennessee, USA Learning

More information

Definition Multithreading Models Threading Issues Pthreads (Unix)

Definition Multithreading Models Threading Issues Pthreads (Unix) Chapter 4: Threads Definition Multithreading Models Threading Issues Pthreads (Unix) Solaris 2 Threads Windows 2000 Threads Linux Threads Java Threads 1 Thread A Unix process (heavy-weight process HWP)

More information

LINQ, Take Two Realizing the LINQ to Everything Dream. Bart J.F. De Smet Software Development Engineer

LINQ, Take Two Realizing the LINQ to Everything Dream. Bart J.F. De Smet Software Development Engineer LINQ, Take Two Realizing the LINQ to Everything Dream Bart J.F. De Smet Software Development Engineer bartde@microsoft.com A Historical Perspective 5 years ago Little recent innovation Censored Where s

More information

8-24 minute delay ± 30 min. round trip Web DNS Redirect Download HTML Download CSS + JS + Images Download more CSS + JS + Images. Ordering a pizza Several hours per page About 8 pages per order Thread.setName(

More information

Infrastructure Middleware (Part 3): Android Runtime Core & Native Libraries

Infrastructure Middleware (Part 3): Android Runtime Core & Native Libraries Infrastructure Middleware (Part 3): Android Runtime Core & Native Libraries Douglas C. Schmidt d.schmidt@vanderbilt.edu www.dre.vanderbilt.edu/~schmidt Institute for Software Integrated Systems Vanderbilt

More information

Introduction to Coroutines. Roman Elizarov elizarov at JetBrains

Introduction to Coroutines. Roman Elizarov elizarov at JetBrains Introduction to Coroutines Roman Elizarov elizarov at JetBrains Asynchronous programming How do we write code that waits for something most of the time? A toy problem Kotlin 1 fun requesttoken(): Token

More information

Building Applications with ArcGIS Runtime SDK for Android Part II. Will Crick Dan O Neill

Building Applications with ArcGIS Runtime SDK for Android Part II. Will Crick Dan O Neill Building Applications with ArcGIS Runtime SDK for Android Part II Will Crick Dan O Neill Agenda Intro Connected editing summary Offline capabilities - Local features - Geometry Engine Platform integration

More information

Overview. CMSC 330: Organization of Programming Languages. Concurrency. Multiprocessors. Processes vs. Threads. Computation Abstractions

Overview. CMSC 330: Organization of Programming Languages. Concurrency. Multiprocessors. Processes vs. Threads. Computation Abstractions CMSC 330: Organization of Programming Languages Multithreaded Programming Patterns in Java CMSC 330 2 Multiprocessors Description Multiple processing units (multiprocessor) From single microprocessor to

More information

COMP/ELEC 429/556 Introduction to Computer Networks

COMP/ELEC 429/556 Introduction to Computer Networks COMP/ELEC 429/556 Introduction to Computer Networks Creating a Network Application Some slides used with permissions from Edward W. Knightly, T. S. Eugene Ng, Ion Stoica, Hui Zhang 1 How to Programmatically

More information

Android About.me/DavidCorrado Mobile Meetup Organizer

Android About.me/DavidCorrado Mobile Meetup Organizer Android Tips/Tricks @DavidCorrado About.me/DavidCorrado Mobile Meetup Organizer IDE Don t Use Eclipse Use either Android Studio/IntelliJ They are basically the same thing. They are both built off of IntelliJ

More information

Keep Learning with Oracle University

Keep Learning with Oracle University Keep Learning with Oracle University Classroom Training Learning Subscription Live Virtual Class Training On Demand Cloud Technology Applications Industries education.oracle.com 3 Session Surveys Help

More information

Implementing Microservices Tracing with Spring Cloud and Zipkin

Implementing Microservices Tracing with Spring Cloud and Zipkin Implementing Microservices Tracing with Spring Cloud and Zipkin Marcin Grzejszczak, @mgrzejszczak 1 2017 Pivotal About me Spring Cloud developer at Pivotal Working mostly on Spring Cloud Sleuth Spring

More information

GB Programming Challenges

GB Programming Challenges GB21802 - Programming Challenges Week 1 - Ad-hoc problems Claus Aranha caranha@cs.tsukuba.ac.jp College of Information Science April 18, 2014 Some Notes Before the Class Don t forget to send me your username

More information

Introduction to Apache Kafka

Introduction to Apache Kafka Introduction to Apache Kafka Chris Curtin Head of Technical Research Atlanta Java Users Group March 2013 About Me 20+ years in technology Head of Technical Research at Silverpop (12 + years at Silverpop)

More information

CSE 303: Concepts and Tools for Software Development

CSE 303: Concepts and Tools for Software Development CSE 303: Concepts and Tools for Software Development Dan Grossman Spring 2007 Lecture 19 Profiling (gprof); Linking and Libraries Dan Grossman CSE303 Spring 2007, Lecture 19 1 Where are we Already started

More information

Beyond UX: building solid middleware with Qt (and QML)

Beyond UX: building solid middleware with Qt (and QML) Beyond UX: building solid middleware with Qt (and QML) Qt Developer Days San Francisco, November 2014 Dario Freddi WHO AM I? Fell in love with Qt in KDE, quite a number of years ago Most of my professional

More information

A simple, scalable app architecture with Android Annotations Luke Sleeman Freelance Android developer lukesleeman.com.au

A simple, scalable app architecture with Android Annotations Luke Sleeman Freelance Android developer lukesleeman.com.au A simple, scalable app architecture with Android Annotations Luke Sleeman Freelance Android developer lukesleeman.com.au Image CC: https://flic.kr/p/6oqczb Agenda Introduction The architecture - History,

More information