• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Reactive Extensions, Rx

Reactive Extensions, Rx






Total Views
Views on SlideShare
Embed Views



6 Embeds 86

http://it-jam.com.ua 39
http://blog.kievalt.net 19
http://it-jam.ciklum.net 17
http://itjam.ciklum.net 5
http://twitter.com 4
https://twitter.com 2



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment
  • давайте вспомним buzzwords: Azure, Silverlight, Windows Phone
  • 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 is the best fit.Stock broker services may be push-based, hence IO is a better match.Will see how one can convert between those.

Reactive Extensions, Rx Reactive Extensions, Rx Presentation Transcript

  • Reactive Extensions“democratize cloud”Dima Pasko
  • about me Kharkiv – 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 outinterface IEnumerable out IDisposable Subscribe IObserver IEnumerator Getinterface IEnumerator out IDisposableinterface 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
  • IDisposableinterface IObservable out IDisposable Subscribe IObserverinterface IObserver in void On void On Exception void On
  • demo #1Simple example
  • exception handling Observable.Catch() Observable.Throw() Observable.Retry() Observable.Timeout()
  • demo #2Exception 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 #3Big demo!!!
  • Rx unit testing
  • more RxRx 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