SlideShare ist ein Scribd-Unternehmen logo
1 von 29
Reactive Extensions
“democratize cloud”




Dima Pasko
about me




 Kharkov – Ciklum (Scale Point) - .NET – podcasts – open source
Erik Meijer
              Professor at Utrecht
                University
              One of the designers of
                Haskell
              Microsoft Architect
              LINQ
              Volta
              Rx
Rx mission
 “Rx is a library for composing asynchronous
   and event-based programs using observable
   collections.”
Rx current version
 • Base interfaces in BCL .NET 4 and WP7
 • Stable version: v1.0.10621
   Experimental Release: v1.1.11011
   Last update: October 12, 2011
 • http://msdn.microsoft.com/en-
   us/data/gg577609
Rx for
 .NET
     .NET 3.5 SP1
     .NET 4
     .NET Framework 4.5 (with Metro support on
      Windows 8 Developer Preview)
 Silverlight
     Silverlight 4
     Silverlight 5
     Windows Phone
 Java script
“asynchronous”
“observable”
interface IObservable out
interface IEnumerable out

   IDisposable Subscribe IObserver
   IEnumerator    Get


interface IEnumerator out     IDisposable
interface IObserver in
   bool   Move
   void   On
                    get
   void   On      Exception
   void
   void   On
Application

                          MoveNext
              Got next?
Interactive




                                                                               Reactive
                                                         OnNext
                                                                  Have next!



                    IEnumerable<T>                   IObservable<T>
                    IEnumerator<T>                    IObserver<T>



                                     Environment
IDisposable
interface IObservable out

    IDisposable Subscribe IObserver



interface IObserver in

    void   On
    void   On      Exception
    void   On
demo #1
Simple example
exception handling
 Observable.Catch()
 Observable.Throw()
 Observable.Retry()
 Observable.Timeout()
demo #2
Exception handling
“composing”
 •   Linq(Where, Take, Skip, Sum, Max, Any, …)
 •   Statements(If, Case, For, While, DoWhile)
 •   Combinators(Merge, Zip, Amb, …)
 •   Exceptions(Catch, Retry, ..)
 •   Rx(Delay, Throttle, Interval, Publish, …)
“event-based”
 Observable.FromEventPattern()
 Observable.FromAsyncEventPattern()
IScheduler
 Observable.OnserveOn()
 Observable.SubscribeOn(Scheduler.TaskPool)
demo #3
Big demo!!!
Rx unit testing
more Rx
Rx Contrib
  http://rxcontrib.codeplex.com/
Reactive Extensions - Extensions (Rxx)
  http://rxx.codeplex.com/
Rx Power Toys
  http://rxpowertoys.codeplex.com/
examples
ReactiveUI




      http://www.reactiveui.net/
“Anna”




    http://github.com/jfromaniello/Anna
domain events




 http://chaliy.name/archive/2010/1/business_logic_rx_example
TweetSharp.Rx




   https://github.com/jhollingworth/TweetSharp.Rx
Rx in books




                     Programming Reactive Extensions and LINQ
                             Jesse Liberty, Paul Betts
  http://www.amazon.com/Programming-Reactive-Extensions-Jesse-Liberty/dp/1430237473/
out of scope
 • Hot&Cold
 • Marble diagrams
 • IQbservable<T>
   (IQueryable<T> + IObservable<T>)
 • ISubject, Subject<T>
 • ReactiveJS
 • ….
information
  Rx team blog
      http://blogs.msdn.com/rxteam
  DevLabs
      http://msdn.microsoft.com/en-us/data/gg577609
  MSDN forums
      http://social.msdn.microsoft.com/Forums/en-US/rx
  Channel9
      http://channel9.msdn.com/Tags/Rx
  Wiki
      http://rxwiki.wikidot.com
  Examples
      http://rxworkshop.codeplex.com/
summary
questions
 dimapasko@gmail.com
 pad@ciklum.net



                  31337




         @dimapasko

Weitere ähnliche Inhalte

Andere mochten auch (7)

Reactive Extensions, Rx
Reactive Extensions, RxReactive Extensions, Rx
Reactive Extensions, Rx
 
NuGet - package management for .NET
NuGet - package management for .NETNuGet - package management for .NET
NuGet - package management for .NET
 
Что такое ASP.NET MVC?
Что такое ASP.NET MVC?Что такое ASP.NET MVC?
Что такое ASP.NET MVC?
 
Ideal Deployment In .NET World
Ideal Deployment In .NET WorldIdeal Deployment In .NET World
Ideal Deployment In .NET World
 
Reuters: Pictures of the Year 2016 (Part 2)
Reuters: Pictures of the Year 2016 (Part 2)Reuters: Pictures of the Year 2016 (Part 2)
Reuters: Pictures of the Year 2016 (Part 2)
 
The Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post FormatsThe Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post Formats
 
The Outcome Economy
The Outcome EconomyThe Outcome Economy
The Outcome Economy
 

Ähnlich wie Reactive Extensions

Reactive programming
Reactive programmingReactive programming
Reactive programming
BeauLiu
 
Introduction to Reactive Extensions
Introduction to Reactive ExtensionsIntroduction to Reactive Extensions
Introduction to Reactive Extensions
Peter Goodman
 
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
jeffz
 
Akka london scala_user_group
Akka london scala_user_groupAkka london scala_user_group
Akka london scala_user_group
Skills Matter
 
ドワンゴでのScala活用事例「ニコニコandroid」
ドワンゴでのScala活用事例「ニコニコandroid」ドワンゴでのScala活用事例「ニコニコandroid」
ドワンゴでのScala活用事例「ニコニコandroid」
Satoshi Goto
 
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
HostedbyConfluent
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systems
Serge Stinckwich
 
Reactive extensions itjam
Reactive extensions itjamReactive extensions itjam
Reactive extensions itjam
Ciklum Ukraine
 

Ähnlich wie Reactive Extensions (20)

Reactive programming
Reactive programmingReactive programming
Reactive programming
 
Introduction to Reactive Extensions
Introduction to Reactive ExtensionsIntroduction to Reactive Extensions
Introduction to Reactive Extensions
 
Introduction to Reactive Extensions
Introduction to Reactive ExtensionsIntroduction to Reactive Extensions
Introduction to Reactive Extensions
 
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
 
响应式编程及框架
响应式编程及框架响应式编程及框架
响应式编程及框架
 
Akka (BeJUG)
Akka (BeJUG)Akka (BeJUG)
Akka (BeJUG)
 
Reactive extensions
Reactive extensionsReactive extensions
Reactive extensions
 
Reative UI
Reative UIReative UI
Reative UI
 
Akka london scala_user_group
Akka london scala_user_groupAkka london scala_user_group
Akka london scala_user_group
 
ドワンゴでのScala活用事例「ニコニコandroid」
ドワンゴでのScala活用事例「ニコニコandroid」ドワンゴでのScala活用事例「ニコニコandroid」
ドワンゴでのScala活用事例「ニコニコandroid」
 
Python intro01classes in_navi_mumbai
Python intro01classes in_navi_mumbaiPython intro01classes in_navi_mumbai
Python intro01classes in_navi_mumbai
 
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
What’s Slowing Down Your Kafka Pipeline? With Ruizhe Cheng and Pete Stevenson...
 
4Developers 2015: Programowanie synchroniczne i asynchroniczne - dwa światy k...
4Developers 2015: Programowanie synchroniczne i asynchroniczne - dwa światy k...4Developers 2015: Programowanie synchroniczne i asynchroniczne - dwa światy k...
4Developers 2015: Programowanie synchroniczne i asynchroniczne - dwa światy k...
 
Reactive programming
Reactive programmingReactive programming
Reactive programming
 
RxJS In-Depth - AngularConnect 2015
RxJS In-Depth - AngularConnect 2015RxJS In-Depth - AngularConnect 2015
RxJS In-Depth - AngularConnect 2015
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systems
 
Introducing spring
Introducing springIntroducing spring
Introducing spring
 
Going Reactive with Relational Databases
Going Reactive with Relational DatabasesGoing Reactive with Relational Databases
Going Reactive with Relational Databases
 
Rapid Network Application Development with Apache MINA
Rapid Network Application Development with Apache MINARapid Network Application Development with Apache MINA
Rapid Network Application Development with Apache MINA
 
Reactive extensions itjam
Reactive extensions itjamReactive extensions itjam
Reactive extensions itjam
 

Mehr von Kiev ALT.NET

Micro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicateMicro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicate
Kiev ALT.NET
 
Continuous Integration (CI)
Continuous Integration (CI)Continuous Integration (CI)
Continuous Integration (CI)
Kiev ALT.NET
 
Command-Query Responsibility Segregation: теория и практика
Command-Query Responsibility Segregation: теория и практикаCommand-Query Responsibility Segregation: теория и практика
Command-Query Responsibility Segregation: теория и практика
Kiev ALT.NET
 

Mehr von Kiev ALT.NET (16)

CQRS EventStore
CQRS EventStoreCQRS EventStore
CQRS EventStore
 
Design by Contract
Design by ContractDesign by Contract
Design by Contract
 
Micro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicateMicro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicate
 
Async
AsyncAsync
Async
 
Linq providers
Linq providersLinq providers
Linq providers
 
NoSql, MongoDb
NoSql, MongoDbNoSql, MongoDb
NoSql, MongoDb
 
CouchDb
CouchDbCouchDb
CouchDb
 
Orchard
OrchardOrchard
Orchard
 
Mercurial
MercurialMercurial
Mercurial
 
CI via TFS
CI via TFSCI via TFS
CI via TFS
 
Continuous Integration (CI)
Continuous Integration (CI)Continuous Integration (CI)
Continuous Integration (CI)
 
WebSharper - веб-программирование без слёз
WebSharper - веб-программирование без слёзWebSharper - веб-программирование без слёз
WebSharper - веб-программирование без слёз
 
F# - функциональный язык «новой» волны
F# - функциональный  язык «новой» волныF# - функциональный  язык «новой» волны
F# - функциональный язык «новой» волны
 
Caliburn Micro Overview
Caliburn Micro OverviewCaliburn Micro Overview
Caliburn Micro Overview
 
Введение в MVVM
Введение в MVVMВведение в MVVM
Введение в MVVM
 
Command-Query Responsibility Segregation: теория и практика
Command-Query Responsibility Segregation: теория и практикаCommand-Query Responsibility Segregation: теория и практика
Command-Query Responsibility Segregation: теория и практика
 

Kürzlich hochgeladen

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 

Reactive Extensions

Hinweis der Redaktion

  1. давайте вспомним buzzwords: Azure, Silverlight, Windows Phone
  2. Speaker tips:The essential difference is who controls how the data is received.Philosophically this is nothing but how the application and the environment work together.Looking from the application’s point of view:Does it ask the environment – interactively – for data?  enumerableDoes it passively wait for the environment to send data and react to it?  observableBoth are complementary models. One doesn’t (aim to) replace the other.Matter of which one aligns more closely to which model:SQL’ s TDS protocol is pull-based, hence IE&lt;T&gt; is the best fit.Stock broker services may be push-based, hence IO&lt;T&gt; is a better match.Will see how one can convert between those.