none
Rx v1.0.2856.0 release now available

    General discussion

  • Hi folks,

    We're happy to announce a new release of Rx. Here are the release notes:

    ·         Various fixes:

    o   Added generic variance annotations on ISubject<in T1, out T2> and IObserver<in TValue, out TResult>.

    o   Enabling generic variance annotations for Silverlight 4 binaries.

    o   No longer installing Silverlight assemblies to the GAC; fixes build issues with Expression Blend.

    o   Made Unit, TimeStamped<T>, TimeInterval<T>, Notification<T> serializable.

    o   Fixes to System.Linq.Async’s Single and SingleOrDefault operators.

    ·         Scheduler improvements:

    o   ControlScheduler and NewThreadScheduler now correctly use relative time.

    o   CurrentThreadScheduler, EventLoopScheduler, NewThreadScheduler and VirtualScheduler now normalize time properly.

    o   ImmediateScheduler, CurrentThreadScheduler and NewThreadScheduler no longer cause a thread sleep if the specified TimeSpan is zero.

    o   DispatcherScheduler, ThreadPoolScheduler and SynchronizationContextScheduler avoid using a timer if a scheduled action’s specified TimeSpan is zero.

    o   CurrentThreadScheduler on Windows Phone 7 no longer depends on ThreadStaticAttribute which is not implemented on Windows Phone 7.

    ·         Changes to observable operators:

    o   Multicast, Publish, Prune and Replay binding operators:

    §  Changed return type of Multicast to IConnectableObservable<T>.

    §  Changed Multicast overload with an observable sequence selector function to take in a subject selector function, allowing deferred construction of the subject being used.

    §  Bringing back Publish, Prune and Replay operators, each of them calling into Multicast to fix the subject parameterization ([Behavior]Subject, AsyncSubject and ReplaySubject respectively).

    §  Removed Publish overload that simply returns an IObservable<T>.

    o   Buffering and windowing operators:

    §  BufferWithTime, BufferWithCount and BufferWithTimeOrCount now return IObservable<IList<T>> as they used to do before.

    §  Added WindowWithTime, WindowWithCount and WindowWithTimeOrCount which return IObservable<IObservable<T>>, as special cases of the general purpose Window operator.

    §  Fixed issue with duplicate or missing values due to timer errors.

    o   Added ToList, ToArray, ToDictionary and ToLookup aggregation standard query operators, returning an observable sequence with the (single) aggregated value.

    o   Added SequenceEqual operator which checks that the values in a stream are equal (but not the timing).

    o   Added Expand operator that recursively expands an initial observable sequence using a selector function.

    o   Added Concat overload that takes an observable sequence of observable sequences and produces a single observable sequence which exhausts each inner observable sequence before subscribing to the next observable sequence.

    o   Added Merge overload that allows specifying the maximum number of active sequences being merged at any point in time, queuing the rest in a way similar to Concat.

    o   Added ManySelect operator which is the comonadic bind operator and is similar to ContinueWith on tasks but can be used for streams.

    o   Added IgnoreValues operator which behaves as Where(_ => false).

    o   Added GroupByUntil operator which is similar to GroupBy except that there’s a duration selector function to control the lifetime of each generated group.

    o   Removed Drain. The same behavior can be restored using the (updated) more general purpose Concat and Merge(n) operators.

    o   Fixed memory leaks in GroupJoin and Join where these operators held onto window disposables until the end of the (potentially infinite) outer source.

    ·         Subjects changes:

    o   Added FastSubject, FastBehaviorSubject, FastAsyncSubject and FastReplaySubject which are much faster than regular subjects but:

    §  don’t decouple producer and consumer by an IScheduler (effectively limiting them to ImmediateScheduler);

    §  don’t protect against stack overflow;

    §  don’t synchronize input messages.

    o   Fast subjects are used by Publish and Prune operators if no scheduler is specified.

    ·         Qbservable changes:

    o Operators that take multiple observable sequences now check whether the supplied sequences implement IQbservable<T>. If so, their expression tree gets stitched in; otherwise, a ConstantExpression is used to wrap the sequence.

     Download the different release flavors here:

    We didn't make updates to RxJS this time around but will do so in the near future, as we bring libraries back in sync. For now Download Rx 1.0.2838.0 for JavaScript.

    Let us know what you think!

    Have fun,
    -The Rx team

    Friday, February 11, 2011 9:58 PM
    Owner

All replies

  • Wow, you've been busy ;)

    Is Expand the dual to Scan?

    Thanks, 
    Dave


    http://davesexton.com/blog
    Friday, February 11, 2011 10:27 PM
  • NuGet packages are made available now as well.
    using (Microsoft.Sql.Cloud.DataProgrammability.Rx) { Signature.Emit("Bart De Smet"); }
    Saturday, February 12, 2011 1:08 AM
    Owner
  • Thanks Bart,

    Looks like a good amount of new surface area to get my head around, now I need to start updating my posts and simplifying code :)

    Would it be possible to put a LibCheck HTML difference file up somewhere showing the API differences between the revisions? It may be useful for others to see the changes in the API.

    Yours

    Martin

    Saturday, February 12, 2011 1:19 AM
  • NuGet packages are made available now as well.
    using (Microsoft.Sql.Cloud.DataProgrammability.Rx) { Signature.Emit("Bart De Smet"); }

    Is there also a WP7 version in the package? I couldn't get it installed.

    Here's the console log:

     

    Install-Package : Unable to find assembly references that are compatible with the target framework 'Silverlight,Version=v4.0,Profile=WindowsPhone'
    At line:1 char:16
    + install-package <<<<  Rx-All
        + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
        + FullyQualifiedErrorId : NuGet.VisualStudio.Cmdlets.InstallPackageCmdlet
     

    Thanks.

    Saturday, February 12, 2011 10:26 AM
  • The WP7 package for NuGet has a known issue we'll be looking into - the "Profile" part of the framework version is not matched correctly with our packages. For the time being, please use the MSI to get the assemblies (Download Rx 1.0.2856.0 for Windows Phone 7 if you only need WP7 binaries).
    using (Microsoft.Sql.Cloud.DataProgrammability.Rx) { Signature.Emit("Bart De Smet"); }
    Saturday, February 12, 2011 10:46 AM
    Owner
  • For comparison purposes, I've just run a perf test over the new Subject classes:

    1,000,000 OnNext calls in ms

    Subscribers

     

    1

    10

    20

    new ReplaySubject<Unit>(1)

    39,478

    245,010

    857,841

    new BehaviorSubject<Unit>(new Unit())

    8,077

    37,249

    86,599

    new Subject<Unit>()

    6,482

    34,016

    92,922

           

    new FastReplaySubject<Unit>(1)

    1,974

    1,918

    2,238

    new FastBehaviorSubject<Unit>(new Unit())

    175

    241

    519

    new FastSubject<Unit>()

    150

    235

    447

           

    new LockFreeSubject<Unit>()

    21

    91

    239

    The new FastSubjectX classes are significantly faster (especially with multiple subscribers), and will make a significant difference to my project. Thanks for the quick turn-around. 

    (For comparison purposes I've also included the lock-free Subject implementation from http://social.msdn.microsoft.com/Forums/en-US/rx/thread/b6f12263-9e17-45e6-802c-4bf374377b6e)

    Yours

    Martin

    Saturday, February 12, 2011 11:25 AM
  • NuGet packages are made available now as well.

    I could have sworn the previous build was available as a package in NuGet but only the latest version seems to be in there now. This is a problem when something doesn't yet work with the new version - versions shouldn't be removed from NuGet for this reason!

    I'm not going mad, am I? I did see v1.0.2838 in there before? If so, why was it removed?

    Sunday, February 13, 2011 4:31 PM
  • Good point, we have been too eager, we should leave the N-1 release on NuGET, I will work with the team to get it back up.

    Thanks,
    -GertD
    Rx team


    GertD @ www.DBProj.com
    Sunday, February 13, 2011 9:27 PM
  • Thank you so much for fixing the ThreadStatic bug in the Windows Phone version of this!

    Arash

    Thursday, February 17, 2011 5:18 AM
  • We'll address the NuGet versioning for subsequent releases. This time around, we had to start using the new package upload process at NuGet.org (before that, it was done by some archane branch/merge pull request sequence on the "package repository" and having the NuGet owners propagate them down to the live servers). As part of that, we wanted to clean up / streamline the package metadata (with links to home pages and whatnot), but found that old packages couldn't be re-uploaded since the schema for package metadata had changed (or there was no server-side validation before, and our metadata was wrong to begin with).

    Either way, we'll make sure to have the last two releases available in the future. For the time being, refer back to the release notes of the previous release and the download links there to get the previous version. In fact, all versions remain in the Microsoft.com download center.


    using (Microsoft.Sql.Cloud.DataProgrammability.Rx) { Signature.Emit("Bart De Smet"); }
    Friday, February 18, 2011 7:18 AM
    Owner
  • What is the best way to reproduce the prior release's Publish() (ie. returning IObservable<T>) in this build?

    I can call Connect(), but is there a cleaner method?

     


    Regards, Fil.
    Sunday, February 27, 2011 11:48 PM
  • What is the best way to reproduce the prior release's Publish() (ie. returning IObservable<T>) in this build?


    Regards, Fil.

    Hi,

    I would like the same functionality like Fil. It is not handy to use IConnecableObservable in my case. Why this was removed in this realese?

     

    Cheers, Tomas

    Tuesday, March 15, 2011 11:04 PM
  • Hi Fil, Tomas,

    You can use Publish().RefCount().  Alternatively, if you must ensure that subscription side-effects only occur once, then take a look at the Prime operator:

    http://social.msdn.microsoft.com/Forums/en/rx/thread/a5953eab-725c-4df6-822c-218f99b14c95

    - Dave


    http://davesexton.com/blog
    Wednesday, March 16, 2011 12:03 AM
  • You can grab this code to do a diff on some version of the lib's if you like

    http://leecampbell.blogspot.com/2011/02/changes-to-rx-api.html

     

    Hope that helps.

    Lee


    Lee Campbell http://LeeCampbell.blogspot.com
    Saturday, March 26, 2011 12:47 PM