Sergiy Grytsenko, Senior Software Engineer
“Reactive Extensions: classic Observer in .NET”
• Why should we use Rx when we have events?
• Key types & methods
• Lifetime management, flow control
• Combining several streams
• Tests, I need unit tests!
This session, delivered at Devoxx Poland, covers all the major changes to the Java platform between JDK 12 and JDK 17. All language features are covered, as well as many of the important API changes.
A presentation given to Overstock.com IT at annual conference. Twitter @TECHknO 2015. Goal of the presentation is to provide a good introduction to the reactive programming model with RxJava.
An Experiment with Checking the glibc LibraryAndrey Karpov
We have recently carried out an experiment with checking the glibc library by PVS-Studio. Its purpose was to study how good our analyzer is at checking Linux-projects. The basic conclusion is, not much good yet. Non-standard extensions used in such projects make the analyzer generate a huge pile of false positives. However, we have found some interesting bugs.
An exploration into RxJava on Android for the experienced, yet uninitiated software engineer. This presentation explores Declarative vs Imperative programming paradigms and expands the discussion into Functional Reactive Programming. It explains the benefits of the observer contract, high-order functions, and schedulers available in RxJava. It also explains the purpose of the Android integration libraries: RxAndroid, RxLifecycle, and RxBindings.
Apresentado no TDC Florianópolis - 2016.
Palestra voltada aos que ouviram falar sobre RxJava e querem aprender sobre a biblioteca que todos os programadores legais estão comentando.
As presented at DevDuck #6 - JavaScript meetup for developers (www.devduck.pl)
----
Looking for a company to build your app? - Check us out at www.brainhub.eu
This presentaion provides and overview of the new features of Java 8, namely default methods, functional interfaces, lambdas, method references, streams and Optional vs NullPointerException.
This presentation by Arkadii Tetelman (Lead Software Engineer, GlobalLogic) was delivered at Java.io 3.0 conference in Kharkiv on March 22, 2016.
In this talk about Apache Flink we will touch on three main things, an introductory look at Flink, a look under the hood and a demo.
* In the introduction we will briefly look at the history of Flink and then go on to the API and different use cases. Here we will also see how it can be deployed in practice and what some of the pitfalls in a cluster setting can be.
* In the second section we will look at the streaming execution engine that lies at the heart of Flink. Here we will see what makes it tick and also what distinguishes it from other approaches, such as the mini-batch execution model.
Ufuk Celebi - PMC member at Apache Flink and co-founder and software engineer at data Artisans
* In the final section we will see a live demo of a fault-tolerant streaming job that performs analysis of the wikipedia edit-stream.
Example First / A Sane Test-Driven Approach to ProgrammingJonathan Acker
We all know we need automated tests for our code - they are our guardian angel against regression bugs. But what exactly is the point in writing a test in advance - how does this even make sense? The first thing to grasp is that, at this stage, these are not tests - but specifications, which force us to think about exactly what we want to do - in advance. In addition TDD/BDD provide a rigorous methodology, which can help to keep us sane whilst developing complex code in steady confident steps.
How to Think in RxJava Before ReactingIndicThreads
Presented at the IndicThreads.com Software Development Conference 2016 held in Pune, India. More at http://www.IndicThreads.com and http://Pune16.IndicThreads.com
--
Intro to RxJava/RxAndroid - GDG Munich AndroidEgor Andreevich
The RX libraries have gained great popularity among developers lately. RX solves asynchronous programming elegantly based on the Observer pattern. This is especially helpful on Android where lots of interactions are asynchronous to the UI. Speaker: Egor Andreevici
The slides from the talk I gave at Oracle III #JuevesTecnológicos in Madrid.
A review of how the ParallelStreams Work in Java 8 and some considerations we must know in order to get the better performance from the concurrent data processing in #Java8
Workshop slides from the Alt.Net Seattle 2011 workshop. Presented by Wes Dyer and Ryan Riley. Get the slides and the workshop code at http://rxworkshop.codeplex.com/
This session, delivered at Devoxx Poland, covers all the major changes to the Java platform between JDK 12 and JDK 17. All language features are covered, as well as many of the important API changes.
A presentation given to Overstock.com IT at annual conference. Twitter @TECHknO 2015. Goal of the presentation is to provide a good introduction to the reactive programming model with RxJava.
An Experiment with Checking the glibc LibraryAndrey Karpov
We have recently carried out an experiment with checking the glibc library by PVS-Studio. Its purpose was to study how good our analyzer is at checking Linux-projects. The basic conclusion is, not much good yet. Non-standard extensions used in such projects make the analyzer generate a huge pile of false positives. However, we have found some interesting bugs.
An exploration into RxJava on Android for the experienced, yet uninitiated software engineer. This presentation explores Declarative vs Imperative programming paradigms and expands the discussion into Functional Reactive Programming. It explains the benefits of the observer contract, high-order functions, and schedulers available in RxJava. It also explains the purpose of the Android integration libraries: RxAndroid, RxLifecycle, and RxBindings.
Apresentado no TDC Florianópolis - 2016.
Palestra voltada aos que ouviram falar sobre RxJava e querem aprender sobre a biblioteca que todos os programadores legais estão comentando.
As presented at DevDuck #6 - JavaScript meetup for developers (www.devduck.pl)
----
Looking for a company to build your app? - Check us out at www.brainhub.eu
This presentaion provides and overview of the new features of Java 8, namely default methods, functional interfaces, lambdas, method references, streams and Optional vs NullPointerException.
This presentation by Arkadii Tetelman (Lead Software Engineer, GlobalLogic) was delivered at Java.io 3.0 conference in Kharkiv on March 22, 2016.
In this talk about Apache Flink we will touch on three main things, an introductory look at Flink, a look under the hood and a demo.
* In the introduction we will briefly look at the history of Flink and then go on to the API and different use cases. Here we will also see how it can be deployed in practice and what some of the pitfalls in a cluster setting can be.
* In the second section we will look at the streaming execution engine that lies at the heart of Flink. Here we will see what makes it tick and also what distinguishes it from other approaches, such as the mini-batch execution model.
Ufuk Celebi - PMC member at Apache Flink and co-founder and software engineer at data Artisans
* In the final section we will see a live demo of a fault-tolerant streaming job that performs analysis of the wikipedia edit-stream.
Example First / A Sane Test-Driven Approach to ProgrammingJonathan Acker
We all know we need automated tests for our code - they are our guardian angel against regression bugs. But what exactly is the point in writing a test in advance - how does this even make sense? The first thing to grasp is that, at this stage, these are not tests - but specifications, which force us to think about exactly what we want to do - in advance. In addition TDD/BDD provide a rigorous methodology, which can help to keep us sane whilst developing complex code in steady confident steps.
How to Think in RxJava Before ReactingIndicThreads
Presented at the IndicThreads.com Software Development Conference 2016 held in Pune, India. More at http://www.IndicThreads.com and http://Pune16.IndicThreads.com
--
Intro to RxJava/RxAndroid - GDG Munich AndroidEgor Andreevich
The RX libraries have gained great popularity among developers lately. RX solves asynchronous programming elegantly based on the Observer pattern. This is especially helpful on Android where lots of interactions are asynchronous to the UI. Speaker: Egor Andreevici
The slides from the talk I gave at Oracle III #JuevesTecnológicos in Madrid.
A review of how the ParallelStreams Work in Java 8 and some considerations we must know in order to get the better performance from the concurrent data processing in #Java8
Workshop slides from the Alt.Net Seattle 2011 workshop. Presented by Wes Dyer and Ryan Riley. Get the slides and the workshop code at http://rxworkshop.codeplex.com/
Video can be found here: https://www.youtube.com/watch?v=qOST2eCgo2I
Rx helps us solve many complex problems, such as combining different streams and reacting to events that involve timing aspects.
However, solving those problems with code is not really "done" unless you can validate and assure your results.
In this session you'll learn the Rx.NET testing utilities and patterns that makes testing Rx code not only easy but also a lot of fun
Observability foundations in dynamically evolving architecturesBoyan Dimitrov
Holistic application health monitoring, request tracing across distributed systems, instrumentation, business process SLAs - all of them are integral parts of today’s technical stacks. Nevertheless many teams decide to integrate observability last which makes it an almost impossible challenge - especially if you have to deal with hundreds and thousands of services. Therefore starting early is essential and in this talk we are going to see how we can solve those challenges early and explore the foundations of building and evolving complex microservices platforms in respect to observability.
We are going to share some of the best practices and quick wins that allow us to correlate different telemetry systems and gradually build up towards more sophisticated use-cases.
We are also going to look at some of the standard AWS services such as X-Ray and Cloudwatch that help us get going "for free" and then discuss more complex tooling and integrations building up towards a fully integrated ecosystem. As part of this talk we are also going to share some of the learnings we have made at Sixt on this topic and we are going to introduce some of the solutions that help us operate our microservices stack
To view recording of this webinar please use below URL
http://wso2.com/library/webinars/2015/11/wso2-product-release-webinar-wso2-complex-event-processor-4.0/
In this webinar, Lasantha and Suho will discuss the following key features and improvements in detail:
Integrating WSO2 CEP with Apache Storm to achieve distributed real-time stream processing
Key features of the latest version of Siddhi
New transports that enhances integration capabilities of WSO2 CEP
Creating query templates using execution manager
Using the analytics dashboard to visualize results in real-time
Get to know the two stateful programming models of Azure Serverless compute: workflows and actors and how these models can simplify development and how they enable stateful and long-running application patterns within Azure’s compute environments.
Building Scalable Stateless Applications with RxJavaRick Warren
RxJava is a lightweight open-source library, originally from Netflix, that makes it easy to compose asynchronous data sources and operations. This presentation is a high-level intro to this library and how it can fit into your application.
Timely Year Two: Lessons Learned Building a Scalable Metrics Analytic SystemAccumulo Summit
Timely was born to visualize and analyze metric data at a scale untenable for existing solutions. We're returning to talk about what we've achieved over the past year, provide a detailed look into production architecture and discuss additional features added within the past year including alerting and support for external analytics.
– Speakers –
Drew Farris
Chief Technologist, Booz Allen Hamilton
Drew Farris is a software developer and technology consultant at Booz Allen Hamilton where he helps his client solve problems related to large scale analytics, distributed computing and machine learning. He is a member of the Apache Software Foundation and a contributing author to Manning Publications’ “Taming Text” and the Booz Allen Hamilton “Field Guide to Data Science”.
Bill Oley
Senior Lead Engineer, Booz Allen Hamilton
Bill Oley is a senior lead software engineer at Booz Allen Hamilton where he helps his clients analyze and solve problems related to large scale data ingest, storage, retrieval, and analysis. He is particularly interested in improving visibility into large scale systems by making actionable metrics scalable and usable. He has 16 years of experience designing and developing fault-tolerant distributed systems that operate on continuous streams of data. He holds a bachelor's degree in computer science from the United States Naval Academy and a master's degree in computer science from The Johns Hopkins University.
— More Information —
For more information see http://www.accumulosummit.com/
Mario Fusco - Reactive programming in Java - Codemotion Milan 2017Codemotion
Reactive programming è un paradigma di programmazione basato sulla processazione asincrona di eventi. La sua cresente importanza è confermata dall'introduzione in Java 9 delle Flow API che definiscono un contratto che tutte le librerie di reacrive programming dovranno implementare. Lo scopo di questo talk è chiarire i principi del reactive programming definite dal reactive manifesto e formalizzate dalle Flow API insieme alle feature più avanzate di processazione, trasformazione e combinazione di eventi offerti da RxJava.
GDG Jakarta Meetup - Streaming Analytics With Apache BeamImre Nagi
Google slide version of this slide can be accessed from: https://docs.google.com/presentation/d/1Ws73JxlVH39HiKiYuF3vW903j8wFzxPQihXz4CQ_HZM/edit?usp=sharing
Reactive programming is quite a popular topic these days. For a long time, reactive programming was constrained to interactive user interface designs. With the advancement of hardware (multi-core CPU’s) and the internet, the scale, complexity, and responsiveness of software began to rise which led to reactive programming being regarded as a major programming paradigm.
Read more from here: https://blog.lftechnology.com/introduction-to-reactive-programming-part-1-5b7c63685586
By: Subash Poudel (Software Engineer @ Leapfrog Technology, Inc.)
Advanced patterns in asynchronous programmingMichael Arenzon
Using Futures as a basic building block for concurrent, async code has become pervasive in the past few years and for a good reason. However, when moving from the traditional synchronous code to the async one, a set of patterns that were obvious to implement before now seem to be more challenging. The aim of this talk is to show few examples of these patterns implemented with Scala futures in an async and non blocking manner. We will present the usage pattern and the implementation in order to show the principles of properly handling async code.
How do you estimate the quality of your JavaScript code? - From this presentation you will get know basic principles and useful tips how to make your development process proficient.
Structure:
- Readability of code, standards and programming style
- Improving and measuring application performance
- Working with documentation
- Mutation testing
- Continuous integration
Andrii Gordiichuk, Software Developer
“Visualization of Big Data in Web Applications”
- Data in our life
- Patterns for data visualization
- Technologies for data visualization
- SVG and Canvas
- Frameworks for data visualization. Selection criteria
- D3.js and Highcharts.js
Yevhen Kalinichenko, Senior JavaScript Developer
“Object oriented concepts in real projects”
- Abstraction. What is it and what abstraction gives us
- Inheritance. Why do we need inheritance? Composition
over inheritance.
- Encapsulation. Why it’s so important to hide
implementation. Breaking of encapsulation leads us to
maintenance hell
- Polymorphism. Working with interface but not with
concrete implementation
- Single responsibility. Why “classes” must adhere single
responsibility
- Open/Closed principle
- Related topics – cohesion, coupling, interfaces,
separation of responsibilities for each team member.
Sergey Teplyakov, .NET Expert, “SOLID Principles in the real world”:
• Why design principles matters?
• SOLID principles in the real world
S – Single Responsibility Principle
O – Open-Closed Principle
L – Liskov Substitution Principle
I – Interface Segregation Principle
D – Dependency Inversion Principle
Author: Izzet Mustafaiev, Java Solutions Architect.
Nowadays in the fast changing world we need to keep less and less time spent on routine activity and to spend more on creativity and bringing something new to move forward.
This slides brings some trending ideas and approaches to deliver software in modern fashion, from Micro-services architecture, Containerisation, Automation, Continuous Integration/Deployment/Delivery.
There is a demo application built with depicted approach https://github.com/webdizz/bootiful-apps.
Author: Oleg Gomozov, Senior Software Engineer
Agenda:
- Chose yours: flexible, fluid, adaptive, responsive
- Some data about units
- Media Queries Magic
- JavaScript practices
- Browser, please, help me
- Mobile first, how and why
- Tricks, tools and hacks
E-commerce Application Development Company.pdfHornet Dynamics
Your business can reach new heights with our assistance as we design solutions that are specifically appropriate for your goals and vision. Our eCommerce application solutions can digitally coordinate all retail operations processes to meet the demands of the marketplace while maintaining business continuity.
OpenMetadata Community Meeting - 5th June 2024OpenMetadata
The OpenMetadata Community Meeting was held on June 5th, 2024. In this meeting, we discussed about the data quality capabilities that are integrated with the Incident Manager, providing a complete solution to handle your data observability needs. Watch the end-to-end demo of the data quality features.
* How to run your own data quality framework
* What is the performance impact of running data quality frameworks
* How to run the test cases in your own ETL pipelines
* How the Incident Manager is integrated
* Get notified with alerts when test cases fail
Watch the meeting recording here - https://www.youtube.com/watch?v=UbNOje0kf6E
GraphSummit Paris - The art of the possible with Graph TechnologyNeo4j
Sudhir Hasbe, Chief Product Officer, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
Utilocate offers a comprehensive solution for locate ticket management by automating and streamlining the entire process. By integrating with Geospatial Information Systems (GIS), it provides accurate mapping and visualization of utility locations, enhancing decision-making and reducing the risk of errors. The system's advanced data analytics tools help identify trends, predict potential issues, and optimize resource allocation, making the locate ticket management process smarter and more efficient. Additionally, automated ticket management ensures consistency and reduces human error, while real-time notifications keep all relevant personnel informed and ready to respond promptly.
The system's ability to streamline workflows and automate ticket routing significantly reduces the time taken to process each ticket, making the process faster and more efficient. Mobile access allows field technicians to update ticket information on the go, ensuring that the latest information is always available and accelerating the locate process. Overall, Utilocate not only enhances the efficiency and accuracy of locate ticket management but also improves safety by minimizing the risk of utility damage through precise and timely locates.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Transform Your Communication with Cloud-Based IVR SolutionsTheSMSPoint
Discover the power of Cloud-Based IVR Solutions to streamline communication processes. Embrace scalability and cost-efficiency while enhancing customer experiences with features like automated call routing and voice recognition. Accessible from anywhere, these solutions integrate seamlessly with existing systems, providing real-time analytics for continuous improvement. Revolutionize your communication strategy today with Cloud-Based IVR Solutions. Learn more at: https://thesmspoint.com/channel/cloud-telephony
Graspan: A Big Data System for Big Code AnalysisAftab Hussain
We built a disk-based parallel graph system, Graspan, that uses a novel edge-pair centric computation model to compute dynamic transitive closures on very large program graphs.
We implement context-sensitive pointer/alias and dataflow analyses on Graspan. An evaluation of these analyses on large codebases such as Linux shows that their Graspan implementations scale to millions of lines of code and are much simpler than their original implementations.
These analyses were used to augment the existing checkers; these augmented checkers found 132 new NULL pointer bugs and 1308 unnecessary NULL tests in Linux 4.4.0-rc5, PostgreSQL 8.3.9, and Apache httpd 2.2.18.
- Accepted in ASPLOS ‘17, Xi’an, China.
- Featured in the tutorial, Systemized Program Analyses: A Big Data Perspective on Static Analysis Scalability, ASPLOS ‘17.
- Invited for presentation at SoCal PLS ‘16.
- Invited for poster presentation at PLDI SRC ‘16.
Zoom is a comprehensive platform designed to connect individuals and teams efficiently. With its user-friendly interface and powerful features, Zoom has become a go-to solution for virtual communication and collaboration. It offers a range of tools, including virtual meetings, team chat, VoIP phone systems, online whiteboards, and AI companions, to streamline workflows and enhance productivity.
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Crescat
Crescat is industry-trusted event management software, built by event professionals for event professionals. Founded in 2017, we have three key products tailored for the live event industry.
Crescat Event for concert promoters and event agencies. Crescat Venue for music venues, conference centers, wedding venues, concert halls and more. And Crescat Festival for festivals, conferences and complex events.
With a wide range of popular features such as event scheduling, shift management, volunteer and crew coordination, artist booking and much more, Crescat is designed for customisation and ease-of-use.
Over 125,000 events have been planned in Crescat and with hundreds of customers of all shapes and sizes, from boutique event agencies through to international concert promoters, Crescat is rigged for success. What's more, we highly value feedback from our users and we are constantly improving our software with updates, new features and improvements.
If you plan events, run a venue or produce festivals and you're looking for ways to make your life easier, then we have a solution for you. Try our software for free or schedule a no-obligation demo with one of our product specialists today at crescat.io
Mobile App Development Company In Noida | Drona InfotechDrona Infotech
Looking for a reliable mobile app development company in Noida? Look no further than Drona Infotech. We specialize in creating customized apps for your business needs.
Visit Us For : https://www.dronainfotech.com/mobile-application-development/
Takashi Kobayashi and Hironori Washizaki, "SWEBOK Guide and Future of SE Education," First International Symposium on the Future of Software Engineering (FUSE), June 3-6, 2024, Okinawa, Japan
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppGoogle
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-fusion-buddy-review
AI Fusion Buddy Review: Key Features
✅Create Stunning AI App Suite Fully Powered By Google's Latest AI technology, Gemini
✅Use Gemini to Build high-converting Converting Sales Video Scripts, ad copies, Trending Articles, blogs, etc.100% unique!
✅Create Ultra-HD graphics with a single keyword or phrase that commands 10x eyeballs!
✅Fully automated AI articles bulk generation!
✅Auto-post or schedule stunning AI content across all your accounts at once—WordPress, Facebook, LinkedIn, Blogger, and more.
✅With one keyword or URL, generate complete websites, landing pages, and more…
✅Automatically create & sell AI content, graphics, websites, landing pages, & all that gets you paid non-stop 24*7.
✅Pre-built High-Converting 100+ website Templates and 2000+ graphic templates logos, banners, and thumbnail images in Trending Niches.
✅Say goodbye to wasting time logging into multiple Chat GPT & AI Apps once & for all!
✅Save over $5000 per year and kick out dependency on third parties completely!
✅Brand New App: Not available anywhere else!
✅ Beginner-friendly!
✅ZERO upfront cost or any extra expenses
✅Risk-Free: 30-Day Money-Back Guarantee!
✅Commercial License included!
See My Other Reviews Article:
(1) AI Genie Review: https://sumonreview.com/ai-genie-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
#AIFusionBuddyReview,
#AIFusionBuddyFeatures,
#AIFusionBuddyPricing,
#AIFusionBuddyProsandCons,
#AIFusionBuddyTutorial,
#AIFusionBuddyUserExperience
#AIFusionBuddyforBeginners,
#AIFusionBuddyBenefits,
#AIFusionBuddyComparison,
#AIFusionBuddyInstallation,
#AIFusionBuddyRefundPolicy,
#AIFusionBuddyDemo,
#AIFusionBuddyMaintenanceFees,
#AIFusionBuddyNewbieFriendly,
#WhatIsAIFusionBuddy?,
#HowDoesAIFusionBuddyWorks
2. About presenter
Senior Developer @ EPAM Systems
17 years of programing with Basic, Pascal, Assembler, C/C++, C#
12 years of professional development
Developed several projects using Rx
3. Target auditory
UI developers that deals with asynchronous code/want responsive UI
Back-end developers that wish to make server async and responsive
You just curious about the IObservable<T> and IObserver<T>
4. Agenda
Why use Rx when we have events?
Key types & methods
Lifetime management & flow control
Combining several streams
Scheduling and Threading
Tests, I need unit tests!
6. Why Rx?
You demand fire-and-forget messaging
You want to have the result pushed to you when it is ready
You do not want wait for entire set to be processed before you see first one
Developers have tools to push data
Developers need tools to react to push data
Rx enables developers to solve problems in an elegant, familiar and
declarative style with less code
It is easily to manage events and subscriptions
16. Lifetime management & flow control
Subscription lifetime
There is many Subscribe overloads but no Unsubscribe method
Rx returns IDisposable whenever subscription takes place
Or you can provide CancellationToken to unsubscribe
Think of IDisposable as subscription token
You can call Subscribe many times on single IObservable
17. Lifetime management & flow control
Observable lifetime
Both OnError & OnCompleted signify the completion of a stream
No futher calls to OnNext can be performed
When stream completes or errors, you should still dispose subscription
18. Lifetime management & flow control
Flow control
OnError publishes exception, not thows
Subscribe w/o OnError handler causes exception to throw
19. Lifetime management & flow control
Visualization
Stream that publishes 3 values and then completes
Stream that publishes 4 values and then errors
26. Scheduling and Threading
effectively remove the need for WaitHandles, and any explicit calls to
using Threads, the ThreadPool and the new shiny Task type
27. Scheduling and Threading
The invocation of the subscription
The publishing of notifications
public static class Observable
{
public static IObservable<TSource> ObserveOn<TSource>(
this IObservable<TSource> source, IScheduler scheduler)
{...}
public static IObservable<TSource> SubscribeOn<TSource>(
this IObservable<TSource> source, IScheduler scheduler)
{...}
}
28. Scheduling and Threading
public interface IScheduler
{
IDisposable Schedule(Action action);
IDisposable Schedule(Action action, TimeSpan dueTime);
DateTimeOffset Now { get; }
}
31. Tests, I need unit tests!
Scheduling and therefore Threading are generally avoided in test scenarios
as they can introduce race conditions which may lead to non-deterministic
tests.
Tests should run as fast as possible.
Rx is a new technology/library so naturally as we master it, we will refactor
our code. We want to use to tests to ensure our refactoring have not
altered the internal behavior of our code base.
32. Tests, I need unit tests!
TestScheduler
A virtual scheduler to allow us emulate and control time.
var scheduler = new TestScheduler();
var wasExecuted = false;
scheduler.Schedule(() => wasExecuted = true);
Assert.IsFalse(wasExecuted);
scheduler.AdvanceTo(1); //execute 1 tick of queued actions
Assert.IsTrue(wasExecuted);
33. Tests, I need unit tests!
TestScheduler
var scheduler = new TestScheduler();
var dueTime = TimeSpan.FromMilliseconds(400);
var delta = TimeSpan.FromMilliseconds(100);
scheduler.Schedule(dueTime, () => Console.WriteLine("1"));
scheduler.Schedule(dueTime, () => Console.WriteLine("2"));
scheduler.Schedule(dueTime.Add(delta), () => Console.WriteLine("3"));
scheduler.Schedule(dueTime.Add(delta), () => Console.WriteLine("4"));
Console.WriteLine("RunTo(dueTime)");
scheduler.AdvanceTo(dueTime.Ticks);
Console.WriteLine("Run()");
scheduler.Start();
/* Output:
RunTo(dueTime)
1
2
Run()
3
4
*/
LINQ integrated.
You can unite .NET event, an async method call, a Task<T> or 3rd party API into single paradigm.
You can write your own query operators/extension methods.
Declaration of what your code does and leaves the how to the operators.
Queries can be composed together to further produce composite queries.
Query can transform from one type to another, translate one value to another, aggregate sequence or expand single value to a sequence of values.
UI events like mouse move/click/down/up, button click or other control’s events
Domain events like property change, collection update or business logic events
Infrastructure events from FileWatcher, system or WMI
Integration events: broadcast from bessage bus, push event from WebSockets API or other low latency middleware
Create - Creates a subject from the specified observer and observable.
Subject - Represents an object that is both an observable sequence as well as an observer. Each notification is broadcasted to all subscribed observers.
AsyncSubject - Represents the result of an asynchronous operation. The last value before the OnCompleted notification, or the error received through OnError, is sent to all subscribed observers.
BehaviorSubject - Represents a value that changes over time. Observers can subscribe to the subject to receive the last (or initial) value and all subsequent notifications.
ReplaySubject - Each notification is broadcasted to all subscribed and future observers, subject to buffer trimming policies. (Remembers all publications)
Materialize flatten 3 types of publications to stream of Notification<T>
Dematerialize converts stream of notifications to IObservable<T>
Do executes provided action and returns same observable
Run returns void and it is a blocking call
Concat – passes first then (when first completes) passes second
Amb – passes values from stream that first produce value
Merge – merges two or more streams passes by all values
SelectMany – provides Cartesian product of two streams
Zip – takes two values from both streams and returns one
CombineLatest – combines latest two values from both streams in time
ForkJoin – produces the one last combination of two values