Advanced Topics in Concurrency and Reactive Programming

Slides:



Advertisements
Similar presentations
Continuation of chapter 6…. Nested while loop A while loop used within another while loop is called nested while loop. Q. An illustration to generate.
Advertisements

Reactive Extension to .NET
Brown Bag #2 Advanced C++. Topics  Templates  Standard Template Library (STL)  Pointers and Smart Pointers  Exceptions  Lambda Expressions  Tips.
Based on Java Software Development, 5th Ed. By Lewis &Loftus
The Substitution Principle SWE 332 – Fall Liskov Substitution Principle In any client code, if subtype object is substituted for supertype object,
Chapter 4&5 Defining Classes Copyright © 2010 Pearson Addison-Wesley. All rights reserved.
Exception Handling – illustrated by Java mMIC-SFT November 2003 Anders P. Ravn Aalborg University.
Generics. DCS – SWC 2 Generics In many situations, we want a certain functionality to work for a variety of types Typical example: we want to be able.
Objects and Classes First Programming Concepts. 14/10/2004Lecture 1a: Introduction 2 Fundamental Concepts object class method parameter data type.
Chapter 17 Rendering Reactive Animations. Motivation  In the previous chapter we learned just enough about advanced IO and concurrency to develop a “renderer”
1 Objects and Classes Introduction to Classes Object Variables and Object References Instantiating Objects Using Methods in Objects Reading for this Lecture:
Overloading methods review When is the return statement required? What do the following method headers tell us? public static int max (int a, int b)
J.43 ARRAYS  A Java array is an Object that holds an ordered collection of elements.  Components of an array can be primitive types or may reference.
Advanced Behavioral Modeling
Cs2220: Engineering Software Class 11: Subtyping and Inheritance Fall 2010 University of Virginia David Evans.
What is an exception? An exception is: – an event that interrupts the normal processing of the program. –an error condition that violates the semantic.
Chapter 5 - Writing a Problem Domain Class Definition1 Chapter 5 Writing a Problem Domain Class Definition.
Classes and Objects. Topics The Class Definition Declaring Instance Member Variables Writing Instance Member Methods Creating Objects Sending Messages.
OOD Case Study (For parallel treatment, see Chapter 2 of the text)
SE2811 Week 7, Class 1 Composite Pattern Applications Conceptual form Class structure Coding Example Lab Thursday: Quiz SE-2811 Slide design: Dr. Mark.
Improving the Quality of Existing Code Svetlin Nakov Telerik Corporation
Designing Classes 2 How to write classes in a way that they are easily understandable, maintainable and reusable.
Reformatted slides from the textbook, C++ How to Program, 6/e Pearson Education, Inc. All rights reserved Chapter 3. [Lecture 02] Introduction to.
More About Objects and Methods Chapter 5. Outline Programming with Methods Static Methods and Static Variables Designing Methods Overloading Constructors.
Start Typical student project Advanced student project Level of final response.
CHAPTER 11 INHERITANCE. CHAPTER GOALS To understand how to inherit and override superclass methods To be able to invoke superclass constructors To learn.
Standard C++ Library Part II. Last Time b String abstraction b Containers - vector.
Static. 2 Objectives Introduce static keyword –examine syntax –describe common uses.
Interfaces and Inner Classes
Web APIs By Behrooz and Corey mins... Punch It!! We will give a brief overview of the following topics: WebView WebSettings WebViewClient WebChromeClient.
Chapter 7 Programming by contract: preconditions and postconditions.
Inheritance INHERITANCE: extend existing classes by adding or redefining methods, and adding instance fields Suppose we have a class Vehicle: public class.
5.1 Basics of defining and using classes A review of class and object definitions A class is a template or blueprint for an object A class defines.
11 User Controls Beginning ASP.NET in C# and VB Chapter 8.
Kyung Hee University Class Diagramming Notation OOSD 담당조교 석사과정 이정환.
Csci 490 / Engr 596 Special Topics / Special Projects Software Design and Scala Programming Spring Semester 2010 Lecture Notes.
Quiz 3 Topics Functions – using and writing. Lists: –operators used with lists. –keywords used with lists. –BIF’s used with lists. –list methods. Loops.
Functional Processing of Collections (Advanced) 6.0.
Basic Class Structure. Class vs. Object class - a template for building an object –defines the instance data that the object will hold –defines instance.
Lecture 10 – Polymorphism Nancy Harris with additional slides Professor Adams from Lewis & Bernstein.
Software Engineering 1 Object-oriented Analysis and Design Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative.
Methods. Methods are groups of statements placed together under a single name. All Java applications have a class which includes a main method class MyClass.
Gathering the Evidence (all levels)
Advanced Topics in Concurrency and Reactive Programming: Case Study – Google Cluster Majeed Kassis.
Advanced Topics in Distributed and Reactive Programming
UML Interaction Diagrams
Advanced Topics in Concurrency and Reactive Programming: The Observable Contract Majeed Kassis.
Activity Diagram.
Hire Toyota Innova in Delhi for Outstation Tour
Object Oriented Programming
Advanced Topics in Concurrency and Reactive Programming: Akka
Advanced Topics in Distributed and Reactive Programming
EE422C Software Implementation II
Advanced Topics in Concurrency and Reactive Programming: ReactiveX
Week 6 Object-Oriented Programming (2): Polymorphism
CISC101 Reminders Assn 3 due tomorrow, 7pm.
Discussing Non-Fiction Texts

How are your SAS Skills? Chapter 1: Accessing Data (Question # 1)
The Object-Oriented Thought Process Chapter 04
Pointers.
Web Service.
Object Oriented Programming Review
Please note: For the purposes of the following presentation, any reference to “All Levels or “From National 3 to Advanced Higher” does not include National.
Rx Java intro Vaidas Kriščeliūnas.
Unit-1 Introduction to Java
CISC101 Reminders Assignment 3 due today.
Advanced Topics in Functional and Reactive Programming
Types of Errors And Error Analysis.
Threads and concurrency / Safety
Presentation transcript:

Advanced Topics in Concurrency and Reactive Programming Majeed Kassis

The Marble Diagram This style of diagram is useful to illustrate the behavior we wish to achieve using ReactiveX. See http://rxmarbles.com/

Map Operation

Map Example

Filter Operation

Filter Example

Merge Operation http://rxmarbles.com/#merge

Merge Example 1 2 3 4 5 6 7 8 9 private void mergeExample() { final String[] aStrings = {"A1", "A2", "A3", "A4"}; final String[] bStrings = {"B1", "B2", "B3"}; final Observable<String> aObservable = Observable.fromArray(aStrings); final Observable<String> bObservable = Observable.fromArray(bStrings); Observable.merge(aObservable, bObservable) .subscribe(getObserver()); }

Combining via Zip http://rxmarbles.com/#zip

Error Handling: onErrorResumeNext The onErrorResumeNext method returns an Observable that mirrors the behavior of the source Observable, unless that Observable invokes onError in which case, rather than propagating that error to the observer, onErrorResumeNext will instead begin mirroring a second, backup Observable.

Error Handling: onErrorReturn

OnErrorReturn (something) Example