Archives for posts with tag: Reactive Extensions

The latest release of Rx includes new tools for testing reactive programs as well as virtual scheduling. In this video, Jeffrey and Wes discuss virtual time and virtual schedulers and how they can be used to write tests and query historical data.

What is virtual time, exactly? What purpose does it serve and how is it related to reality? Wait a century-second. What time is it? When?

As usual, Wes and Jeff go deep. Dive in with us. This is heady stuff and also really useful for practical programming with Rx. It’s always great to spend some time with Wes and Jeff at the whiteboard and at the computer (they demo this for us towards the end of the session).

Enjoy!

Build 1.0.2617.0 07/15/2010

Rx.NET

    • Fixed GC issue with ThreadPool Timer.
    • Made lock in CompositeDisposable smaller.
    • Fixed deadlock in ForkJoin when using Immediate scheduler.
    • Changed order of arguments for Generate* operators to match C# for pattern based on feedback from C# Team.
    • Changed FromAsyncPattern to catch exceptions thrown in BeginInvoke.
    • Made ConnectableObservable.Connect block subsequent calls until first call is complete.
    • Added virtual scheduler and test scheduler
    • Made MaxBy & MinBy operators return all values that match.
    • Renamed EnumerableEx.LongCount to EnumerablEx.LongCountEnumerable to avoid naming conflict with Enumerable.LongCount.

Rx JS

    • Added Virtual Earth and Google Maps bindings.
    • Fixed crash in For operator with use of Immediate scheduler.
    • Changed order of arguments for Generate* operators to match JavaScript for pattern based on feedback from C# Team.

Download Rx 1.0.2617.0 for .NET 3.5 SP1
Download Rx 1.0.2617.0 for .NET 4
Download Rx 1.0.2617.0 for Silverlight 3
Download Rx 1.0.2617.0 for Silverlight 4
Download Rx 1.0.2617.0 for JavaScript

See the Reactive Extensions Project Page on DevLabs for more details.

You first learned about Rx on C9. We’ve led you through the basic concepts of reactive programming to the deep mathematical foundation behind Rx (interface duality). By now, you should understand that IObservable is the dual of IEnumerable. Today, you will learn some new concepts (for many of you) in addition to the introduction of Rx’s newest interface, IQbservable, the dual of IQueryable. In effect, the addition of IQbservable completes the interface puzzle within Rx. But what does this mean?

The great Bart De Smet takes us through the fundamentals and specifics behind this new interface, which ships in the latest version of Rx. Most of the time is spent at the whiteboard. There’s also a short demo at the end of the conversation. Here’s the flow:

Whiteboarding:

  • Expression trees recap (lambdas convertible to either anonymous methods or expression trees)
  • How LINQ to Objects versus LINQ to SQL works, introducing IQueryable<T>
  • Look at the Queryable extension methods and how they stitch expression trees together
  • Differences between IQbservable<T> and IQueryable<T> (mainly simplification)
  • Extended role of IQbservableProvider compared to IQueryableProvider
  • Synergy between IQueryable and IQbservable (ToEnumerable/ToObservable “sideways” conversion)
  • What operators are available (answer: 99% – explain why that 1% is omitted)

Demo:

  • Sample observable LINQ provider (LINQ to WQL)

Put your thinking caps on, turn up the volume, sit back, and learn. Erik Meijer and team are innovating at a level we haven’t seen in a while around here. Rx is profoundly evolving and taking LINQ along for the ride. Incredible work!

Enjoy this latest episode of Going Deep. Ask questions. Bart et al. will answer them here and on the Rx forums.

The Rx Team just released a new build of Rx, which contains the following changes:

Build 1.0.2441.0 04/14/2010

Rx.NET:

  • Added BufferWithTimeOrCount.
  • Changed ForkJoin to take the last value from each source.
  • Peformed FxCop naming cleanup work.
  • Removed FutureDisposable in favor of MutableDisposable.
  • Added Sequential operators like While, If, Case etc…
  • Added SkipLast & TakeLast.
  • Made fixes to CurrentThreadScheduler & NewThreadScheduler.
  • Added Scan0.
  • Made Sample fire last sample area on Oncompleted & have abort semantics on Error.
  • Made Buffers have abort semantics on Error.

 Rx JS:

  • Changed distribution from MSI installer to ZIP file
  • Added BufferWithTimeOrCount.
  • Added ForkJoin.
  • Added SkipLast & TakeLast.
  • Removed FutureDisposable in favor of MutableDisposable.
  • Breakout support for html api into separate file (rx.html.js).
  • Added jQuery support (rx.jquery.js).
  • Added dojo support (rx.dojo.js).
  • Added MooTools support (rx.mootools.js).
  • Added Prototype support (rx.prototypel.js).
  • Added ExtJS support (rx.extjs.js).
  • Added Yui3 support (rx.yui3.js).
  • Added aggregates such as Sum, Count, IsEmpty etc…  (rx.aggregates.js).
  • Added joins support (rx.joins.js).
  • Changed default schedulers for various API.
  • Made List implementation public.
  • Made several  to TakeUntil, Scan1,Take, SkipWhile, Repeat, Retry, Catch, StartWith, Subjects, ToAsync, Start.
  • Make schedulers have own notion of time (Now()).
  • Added Scan0.
  • Made Sample fire last sample area on Oncompleted & have abort semantics on Error.
  • Made Buffers have abort semantics on Error.
  • Fixed Aggregate, Count, Sum & Average behavior on empty observables.
  • Added Samples for all different library integration points
  • Added readable (debug) version of library integration points.

bits can be found on the Rx DevLabs Project Page

Most C9ers will probably have watched a video or two of Erik and/or his team members talking about Rx. In these videos, we can see some great samples of how to use Rx. But how does Rx play out when used in a real world scenario?

In this video, Jeff talks to Samuel McAravey from SoftSource Consulting. Samuel developed a project time tracking system using Silverlight 3, WCF RIA Services, and Rx. Watch this video to see how Samuel used Rx in his development. Afterwards, visit codeplex to see his code in action.


Reactive Extensions for Javascript have arrived
. Hello RxJS!! 

You can now use Rx combinators in JavaScript. RxJS provides easy to use conversions from existing DOM, XmlHttpRequest and jQuery events to Rx push-collections, allowing users to seamlessly plug Rx into their existing JavaScript-based web sites. Great. What does this mean, exactly? As you know by now, Rx is a library for composing asynchronous and event-based programs using observable collections.

Here, Rx developer Jeffrey Van Gogh explains (and demonstrates) what you can do with RxJS, how he ported Rx to JavaScript and more.

Be sure to check out Erik’s excellent session at MIX10

Tune in.

Today, we released a new version of Reactive Extensions for .NET.

This new version is a good reason to end the long video silence on C9. Here, Wes, Bart, and Jeff discuss the various changes in this release, why it took so long, and what we have been doing these last couple of months.

Rx can be downloaded from the DevLabs project page.

Over thousands of years, language has evolved in order to provide mankind a mechanism for making it easier to communicate with one another. Today, the world is filled with a wide variety of languages, some of which are radically different from one another, while others bear striking similarities. In addition to improving interpersonal communications, however, languages have evolved to facilitate the transfer of information, instructions, and intent between people and machines.

Understanding, designing, and evangelizing many of these languages, and democratizing the programming methodologies within them, is Erik Meijer. Erik is a legendary figure in the programming language design community and one of Niner Nation’s favorite personalities. Today, tune in and meet the man behind the code; some of Erik’s fascinating personal and professional histories may well surprise you. The great Robert Hess moderates this latest edition of Behind the Code.

Enjoy.

PS: Erik will be speaking at MIX10!

When Sven Groot was in town a while ago (this summer?) we dropped by Erik Meijer’s world and got a look at what he and his team of superdevelopers are up to (thus there really is no out-of-date property of this fun and insightful interview that is as off-the-cuff as it gets: heavy Channel 9 :) ).

It’s great that we were able to put a real live Niner into the fire for one of Erik’s team meetings. Wonder what Erik et al will talk about? Rx, maybe? Tier splitting? Monads? Hmm.

There is a great deal to learn here. Thank you, Sven, for being a real sport!

Tune in. Enjoy. 

Play with Rx!

With the recent release of the Reactive Extensions for .NET (Rx) on DevLabs, you’ll hear quite a bit about reactive programming, based on the IObservable<T> and IObserver<T> interfaces. A great amount of resources are available right here on Channel 9. The dual of the System.Reactive assembly is System.Interactive, which provides several extensions to the LINQ Standard Query Operators for IEnumerable<T>.

Here, software developers Jeffrey Van Gogh and Bart de Smet dual it out at the whiteboard and laptop to teach us all about System.Interactive. Pay attenion, take notes, fire up Visual Studio and play along. Thanks to Jeffrey and Bart for taking the time to drop by the C9 studio to provide a great lesson for developers interested in reactive programming with the .NET framework via Reactive Extensions.

Tune in. Enjoy.