The document introduces RxJava, a library for composing asynchronous and event-based programs using observable sequences for the Java Virtual Machine. It discusses the problems with asynchronous programming, provides an overview of reactive programming and reactive extensions, and describes RxJava's core types like Observable and Observer. It also covers key concepts like operators, schedulers, subjects, and dealing with backpressure in RxJava.
Spring IO 2023 - Dynamic OpenAPIs with Spring Cloud GatewayIván López Martín
Imagine this scenario. You follow an OpenAPI-first approach when designing your services. You have a distributed architecture with multiple services and all of them expose a RESTful API and have their OpenAPI Specification. Now you use Spring Cloud Gateway in front of them so you can route the requests to the appropriate service and apply cross-cutting concerns. But, what happens with the OpenAPI of every service? It would be great if you could generate a unique OpenAPI for the whole system in the Gateway. You could also expose and transform only selected endpoints when defining them as public. And what about the routes? You would like to reconfigure them dynamically and on-the-fly in the Gateway when there is a change in a service, right?
Stop imagining. In this talk, I will show you how we have done that in our product and how we are leveraging the programmatic Spring Cloud Gateway API to reconfigure the routes on the fly. You will also see it in action during the demo!
Getting Started with Spring Authorization ServerVMware Tanzu
SpringOne 2021
Title: Getting Started with Spring Authorization Server
Speakers: Joe Grandja, Spring Security Engineer at VMware; Steve Riesenberg, Software Engineer at VMware
Join Red Hat and Vodafone for an exciting presentation on the benefits of Quarkus over competing technologies. Hear from Vodafone's experts about their successful transition to Quarkus from Spring and discover how Quarkus can help your organization cut cloud costs, improve cluster stability, and achieve better performance.
A live demo will showcase the power of Quarkus through examples of HTTP requests, security approaches, exception handling, logging, and more.
In summary, this informative session will provide you valuable insights into the benefits of using Quarkus while also getting real world performance and development time numbers from Vodafone, information which can and should influence your next decisions on what Server Side Java technology to choose!
Spring IO 2023 - Dynamic OpenAPIs with Spring Cloud GatewayIván López Martín
Imagine this scenario. You follow an OpenAPI-first approach when designing your services. You have a distributed architecture with multiple services and all of them expose a RESTful API and have their OpenAPI Specification. Now you use Spring Cloud Gateway in front of them so you can route the requests to the appropriate service and apply cross-cutting concerns. But, what happens with the OpenAPI of every service? It would be great if you could generate a unique OpenAPI for the whole system in the Gateway. You could also expose and transform only selected endpoints when defining them as public. And what about the routes? You would like to reconfigure them dynamically and on-the-fly in the Gateway when there is a change in a service, right?
Stop imagining. In this talk, I will show you how we have done that in our product and how we are leveraging the programmatic Spring Cloud Gateway API to reconfigure the routes on the fly. You will also see it in action during the demo!
Getting Started with Spring Authorization ServerVMware Tanzu
SpringOne 2021
Title: Getting Started with Spring Authorization Server
Speakers: Joe Grandja, Spring Security Engineer at VMware; Steve Riesenberg, Software Engineer at VMware
Join Red Hat and Vodafone for an exciting presentation on the benefits of Quarkus over competing technologies. Hear from Vodafone's experts about their successful transition to Quarkus from Spring and discover how Quarkus can help your organization cut cloud costs, improve cluster stability, and achieve better performance.
A live demo will showcase the power of Quarkus through examples of HTTP requests, security approaches, exception handling, logging, and more.
In summary, this informative session will provide you valuable insights into the benefits of using Quarkus while also getting real world performance and development time numbers from Vodafone, information which can and should influence your next decisions on what Server Side Java technology to choose!
Spring Weblfux. I have given this talk several times but in San Antonio JUG is where I think I have explained better this topic. An introduction to the reactive concepts on how Spring and Project Reactor implement them for Reactive web with Spring Webflux.
OpenAPI 3.0, And What It Means for the Future of SwaggerSmartBear
OpenAPI 3.0, which is based on the original Swagger 2.0 specification, is meant to provide a standard format to unify how an industry defines and describes RESTful APIs.
The release of OAS 3.0 marks a significant milestone in the growth of the API economy — bringing together collaborators from across industries, to evolve the specification to meet the needs of API developers and consumers across the world in an open and transparent manner.
We hosted a free Swagger training: OpenAPI 3.0, And What it Means for the Future of Swagger. More than 2,000 people signed up to learn more about the new specification, and to find out about what’s coming next for Swagger and SwaggerHub!
You can watch the full recording of the presentation here: https://swaggerhub.com/blog/api-resources/openapi-3-0-video-tutorial/
Secrets of Performance Tuning Java on KubernetesBruno Borges
Java on Kubernetes may seem complicated, but after a bit of YAML and Dockerfiles, you will wonder what all that fuss was. But then the performance of your app in 1 CPU/1 GB of RAM makes you wonder. Learn how JVM ergonomics, CPU throttling, and GCs can help increase performance while reducing costs.
Hearts Of Darkness - a Spring DevOps ApocalypseJoris Kuipers
In this talk Joris shares several real-life failure cases concerning running Spring applications in production. Examples include services being killed because of health check issues, Micrometer metrics getting lost, circuit breakers never closing after opening, OOM errors caused by unbounded queues and other nightmarish scenario’s. Not only will you come to understand how these problems could sneak through staging to make their way to production, you will also be given practical tips on how to avoid these things from happening to your own applications. Otto von Bismarck famously said “Fools say that they learn by experience. I prefer to profit by others’ experience”. Don’t be a fool, and profit by viewing this talk!
This talk introduces Spring's REST stack - Spring MVC, Spring HATEOAS, Spring Data REST, Spring Security OAuth and Spring Social - while refining an API to move higher up the Richardson maturity model
In this presentation, we'll explore React’s “Component” based world. We'll go through Virtual DOM, how it works, and React's Virtual DOM vs. the real DOM.
Journey into Reactive Streams and Akka StreamsKevin Webber
Are streams just collections? What's the difference between Java 8 streams and Reactive Streams? How do I implement Reactive Streams with Akka? Pub/sub, dynamic push/pull, non-blocking, non-dropping; these are some of the other concepts covered. We'll also discuss how to leverage streams in a real-world application.
Spring Weblfux. I have given this talk several times but in San Antonio JUG is where I think I have explained better this topic. An introduction to the reactive concepts on how Spring and Project Reactor implement them for Reactive web with Spring Webflux.
OpenAPI 3.0, And What It Means for the Future of SwaggerSmartBear
OpenAPI 3.0, which is based on the original Swagger 2.0 specification, is meant to provide a standard format to unify how an industry defines and describes RESTful APIs.
The release of OAS 3.0 marks a significant milestone in the growth of the API economy — bringing together collaborators from across industries, to evolve the specification to meet the needs of API developers and consumers across the world in an open and transparent manner.
We hosted a free Swagger training: OpenAPI 3.0, And What it Means for the Future of Swagger. More than 2,000 people signed up to learn more about the new specification, and to find out about what’s coming next for Swagger and SwaggerHub!
You can watch the full recording of the presentation here: https://swaggerhub.com/blog/api-resources/openapi-3-0-video-tutorial/
Secrets of Performance Tuning Java on KubernetesBruno Borges
Java on Kubernetes may seem complicated, but after a bit of YAML and Dockerfiles, you will wonder what all that fuss was. But then the performance of your app in 1 CPU/1 GB of RAM makes you wonder. Learn how JVM ergonomics, CPU throttling, and GCs can help increase performance while reducing costs.
Hearts Of Darkness - a Spring DevOps ApocalypseJoris Kuipers
In this talk Joris shares several real-life failure cases concerning running Spring applications in production. Examples include services being killed because of health check issues, Micrometer metrics getting lost, circuit breakers never closing after opening, OOM errors caused by unbounded queues and other nightmarish scenario’s. Not only will you come to understand how these problems could sneak through staging to make their way to production, you will also be given practical tips on how to avoid these things from happening to your own applications. Otto von Bismarck famously said “Fools say that they learn by experience. I prefer to profit by others’ experience”. Don’t be a fool, and profit by viewing this talk!
This talk introduces Spring's REST stack - Spring MVC, Spring HATEOAS, Spring Data REST, Spring Security OAuth and Spring Social - while refining an API to move higher up the Richardson maturity model
In this presentation, we'll explore React’s “Component” based world. We'll go through Virtual DOM, how it works, and React's Virtual DOM vs. the real DOM.
Journey into Reactive Streams and Akka StreamsKevin Webber
Are streams just collections? What's the difference between Java 8 streams and Reactive Streams? How do I implement Reactive Streams with Akka? Pub/sub, dynamic push/pull, non-blocking, non-dropping; these are some of the other concepts covered. We'll also discuss how to leverage streams in a real-world application.
The Reactive Extensions (Rx) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators. Here is an overview of Rx with examples at the end.
Slides from the Meteor Toronto Meet Up. September 21, 2016.
The session started with cursory introductions of Angular 2 and Redux. We then explore an experimental implementation of an Angular 2 Redux app with Meteor. A high level overview of the approach will be presented and then we will explore the source code guided by the curiosity of the group.
Slides from the Meteor Toronto Meet Up. September 21, 2016.
The session started with a cursory introductions of Angular 2 and Redux. We will then explored an experimental implementation of an Angular 2 Redux app with Meteor. A high level overview of the approach will be presented and then we will explore the source code guided by the curiosity of the group.
Akka-demy (a.k.a. How to build stateful distributed systems) I/IIPeter Csala
This is the first part of a mini-series where we discuss how to build distributed stateful real-time applications using actor model and messaging.
The second part: https://www.slideshare.net/PeterCsala/akkademy-aka-how-to-build-stateful-distributed-systems-iiii
In this presentation, Akka Team Lead and author Roland Kuhn presents the freshly released final specification for Reactive Streams on the JVM. This work was done in collaboration with engineers representing Netflix, Red Hat, Pivotal, Oracle, Typesafe and others to define a standard for passing streams of data between threads in an asynchronous and non-blocking fashion. This is a common need in Reactive systems, where handling streams of "live" data whose volume is not predetermined.
The most prominent issue facing the industry today is that resource consumption needs to be controlled such that a fast data source does not overwhelm the stream destination. Asynchrony is needed in order to enable the parallel use of computing resources, on collaborating network hosts or multiple CPU cores within a single machine.
Here we'll review the mechanisms employed by Reactive Streams, discuss the applicability of this technology to a variety of problems encountered in day to day work on the JVM, and give an overview of the tooling ecosystem that is emerging around this young standard.
SpringOne Platform 2017
Stéphane Maldini, Pivotal; Simon Basle, Pivotal
"In 2016, Project Reactor was the foundation before Spring Reactive story, in particular with Reactor Core 3.0 fueling our initial Spring Framework 5 development.
2017 and 2018 are the years Project Reactor empowers the final Spring Framework 5 GA and an entire ecosystem, thus including further refinement, feedbacks and incredible new features. In fact, the new Reactor Core 3.1 and Reactor Netty 0.7 are the very major versions used by the like of Spring Boot 2.0, and they have dramatically consolidated around a simple but yet coherent API.
Discover those changes and the new Reactor capabilities including support for Reactive AOP, Observability, Tracing, Error Strategies for long-running streams, new Netty driver, improved test support, community driven initiatives and much more
Finally, the first java framework & ecosystem gets the reactive library it needs !"
Reactive Extensions (Rx) originated in the .NET world, devised and built by Erik Meijer and his team at Microsoft, Rx is a library to compose asynchronous and event-based programs. Available, among other languages, for Javascript(RxJS) it is meant for usage in frontend and backend programming. In this session we will see an introduction to Rx, why it is so useful to deal with async computation and how you can use RxJS in your code.
Reactive Card Magic: Understanding Spring WebFlux and Project ReactorVMware Tanzu
Spring Framework 5.0 and Spring Boot 2.0 contain groundbreaking technologies known as reactive streams, which enable applications to utilize computing resources efficiently.
In this session, James Weaver will discuss the reactive capabilities of Spring, including WebFlux, WebClient, Project Reactor, and functional reactive programming. The session will be centered around a fun demonstration application that illustrates reactive operations in the context of manipulating playing cards.
Presenter : James Weaver, Pivotal
Allegro Tech Talks Poznań #4: Jak przyspieszyć SOLRa w kilku prostych krokach. allegro.tech
40 milionów wyszukiwań dziennie, setki tysięcy uaktualizacji indeksu czyni z Allegro.pl drugą co do wielkości wyszukiwarkę w Polsce. Nie wszyscy wiedzą, że główną wyszukiwarkę ofertową w Allegro.pl napędza Apache SOLR. Opowiemy o naszych doświadczeniach z optymalizacją zapytań do SOLRa, o tym jak udało nam się znacznie zmniejszyć czasy odpowiedzi i zwiększyć stabilność działania naszego searcha. W czasie prezentacji poruszymy kwestie związane z tworzeniem schematu, wykorzystaniem odpowiednich typów danych, wykorzystania cachea, efektywnego filtrowania i innych optymalizacji, które udało nam się wdrożyć z sukcesem.
Wygłoszono w trakcie czwartej edycji Allegro Tech Talks w Poznaniu.
Adam Dudczak - Starszy programista w Grupie Allegro, pracuje z Javą i technologiami powiązanymi od 2004 roku. Na codzień pracuje nad wyszukiwarką allegro.pl. Jeden z liderów Poznań JUG (http://www.jug.poznan.pl) i współorganizator konferencji GeeCON (http://geecon.org).
Przemysław Szeremiota - Starszy programista w Grupie Allegro od 2008. Zaczynał pracę w zespole wydajności programując w C/C++, przeżył fascynację Javascriptem i zaznał Javy, obecnie doskonale czuje się pływając w mieszance Basha i JQ. W wolnych chwilach przetłumaczył ponad 70 książek technicznych.
allegro.tech Data Science Meetup #2: Elasticsearch w praktyceallegro.tech
allegro.tech Data Science Meetup #2:
Elasticsearch w ekosystemie Allegro
Andrzej Wisłowski, Paweł Bobruk
Wystąpienie z meetupu:
http://www.meetup.com/allegrotech/events/226484033
These are the slides from talk given by Mateusz Gajewski at AWS UG meeting in Warsaw. Content: Apache Mesos, Cluster Scheduling, Hybrid Environment, Scalability, Fault Tolerance.
JDD 2014: Adam Dubiel - Import allegro.tech.internal.*allegro.tech
In this presentation Adam describes internal tools that fuel our architecture: Hermes - pub/sub messaging solution based on Apache Kafka, axion - our ecosystem of build tools on top of Gradle and our monitoring ecosystem based on graphite, statsd and Tessera.
You can watch it on youtube: https://www.youtube.com/watch?v=V1O27W-FIKw
In this presentation Adam Dubiel shares some insight on how monitoring works in Allegro microservices based architecture. He introduces also "Hermes" - messaging solution based on Apache Kafka and overall thoughts when working with this kind of software. Enjoy!
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
6. *Future(s) are not enough
• Supporting single (scalar) values,
• Future<T>.get(period, TimeUnit) still blocks
threads,
• Composing is hard - leading to callback hell,
• Complex flows required some kind of FSM,
• Error handling is error-prone :)
6
9. Reactive manifesto v2
Reactive system has to be:
9
Responsive thus react to users demand
Resilient thus react to errors and failure
Elastic thus react to load
Message-driven thus react to events and messages
11. Reactive programming
• Wikipedia says: “Data flows and propagation of
change”,
• I prefer: “programming with asynchronous
(in)finite data sequences”
• Basically pushing data instead of pulling it
11
12. Reactive extensions
• Implement reactive programming paradigm over
(in)finite sequences of data,
• Push data propagation:
• Observer pattern on steroids,
• Declarative (functional) API for composing
sequences,
• Non-opinionated about source of concurrency
(schedulers, virtual time)
12
14. .NET was there first
• Version 1.0 released 17.11.2009,
• Shipped with .NET 4.0 by default,
• Version 2.0 released 15.08.2012,
• With a support for “Portable Library” (.NET 4.5)
• Reactive Extensions for JS released 17.03.2010
14
15. RxJava 1.0.x
• Ported from .NET to JVM by Netflix,
• Stable API release in November 2014,
• After nearly two years of development,
• Targeting Java (and Android), Scala, Groovy,
JRuby, Kotlin and Clojure,
• Last version 1.0.5 released 3 days ago
15
16. Observable<T> vs Iterable<T> vs
Future<T>
16
Scalar value Sequence
Synchronous T Iterable<T>
Asynchronous* Future<T> Observable<T>
* Observable is single-threaded by default
17. Observable is an ordered (serial) data sequence
17
* this is so called marble diagram (source: https://github.com/ReactiveX/RxJava/wiki/How-To-Use-RxJava)
23. Observable<T> functional API
23
Operator class Source type Result type
Anamorphic
aka unfold
T Observable<T>
Bind
aka map
Observable<T1> Observable<T2>
Catamorphic
aka fold or reduce
Observable<T> T
http://en.wikipedia.org/wiki/Anamorphism, http://en.wikipedia.org/wiki/Catamorphism
24. Unfold operatorsaka “how to create observables”
24
Operator Description
Observable.just(T value) Wraps plain value(s) into Observable
Observable.range(int from, int to) Generates range sequence
Observable.timer() Generates time-based sequence
Observable.interval() Generates interval-based sequence
Observable.create(OnSubscribe<T>) Creates observable with delegate (most powerful)
Observable.never() Empty sequence that never completes either way
Observable.empty() Empty sequence that completes right away
Observable.error(Throwable t) Empty sequence that completes with error
26. OnSubscribe<T> contract
• onNext() called from a single thread (synchronisation is not
provided)
• onCompleted() and onError() called exactly once,
• Subscriber.isUnsubscribed() is checked prior to sending any
notification
• setProducer() is used to support reactive-pull back-pressure
26
27. Producer
• Provided to support reactive pull back-pressure,
• Observer can request n elements from producer,
• If n == Long.MAX_VALUE back-pressure is disabled,
• Still hard to use and do it right :(
• But there is some work being done with FSM to
better support back-pressure implementation
27
29. Subscriber<T>
• Basically both Observer<T> and Subscription,
• Used in Operator<T, R> for lifting Observables
into Observables,
• Maintains subscription list
29
30. Operator<T, R>
• Covers “bind” operator class for lifting Observables
• Can preserve state in a scope of chained calls,
• Should maintain subscriptions and unsubscribe requests,
• It’s hard to write it right (composite subscriptions, back-
pressure, cascading unsubscribe requests)
30
35. Schedulers
• Source of concurrency for Observables:
• Observable can use them via observeOn/subscribeOn,
• Schedules unit of work through Workers,
• Workers represent serial execution of work.
• Provides different processing strategies (Event Loop, Thread
Pools, etc),
• Couple provided out-of-the-box plus you can write your own
35
36. Schedulers
36
Name Description
Schedulers.computation()
Schedules computation bound work
(ScheduledExecutorService with pool size = NCPU, LRU
worker select strategy)
Schedulers.immediate() Schedules work on current thread
Schedulers.io()
I/O bound work (ScheduledExecutorService with growing
thread pool)
Schedulers.trampoline() Queues work on the current thread
Schedulers.newThread() Creates new thread for every unit of work
Schedulers.test() Schedules work on scheduler supporting virtual time
Schedulers.from(Executor e) Schedules work to be executed on provided executor
37. (subscribe|observe)On
• Think of them this way:
• subscribeOn - invocation of the subscription,
• observeOn - observing of the notifications
• Thus:
• subscribeOn for background processing and
warm-up
37
40. Subjects
• Subject is a proxy between Observable<T> and
Subscriber<T>
• It can subscribe multiple observables
• And emit items as an observable
• Different Subject types has different properties
40
46. Cold vs hot observables
• Passive sequence is cold:
• Producing notifications when requested
• At rate Observer desires
• Ideal for reactive pull model of back-pressure using Producer.request(n)
• Active sequence is hot:
• Producing notifications regardless of subscriptions:
• Immediately when it is created
• At rate Observer sometimes cannot handle,
• Ideal for flow control strategies like buffering, windowing, throttling,
onBackpressure*
46
47. Cold vs hot examples
47
Cold Hot
Asynchronous requests
(Observable.from)
UI events (mouse clicks,
movements)
Created with OnSubscribe<T> Timer events
Subscriptions to queues Push pub/sub (broadcasts)
50. Design considerations
• Reactive Extensions are not a silver-bullet for dealing with concurrency:
• Threading/synchronization concerns does not go away,
• You can still block your threads (dead-lock),
• Simple flows on top of RX and static sequences yields significant overhead,
• Choosing right operators flow is a challenge,
• You should avoid shared-state if possible (immutability FTW),
• Debugging is quite hard (but there is “plugins” mechanism),
• Understanding and using back-pressure well is harder :)
50