<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>Rx (Reactive Extensions)</title><link>http://rx.codeplex.com/project/feeds/rss</link><description>The Reactive Extensions &amp;#40;Rx&amp;#41; is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators. </description><item><title>New Post: No Range() function in Ix++?</title><link>https://rx.codeplex.com/discussions/443168</link><description>&lt;div style="line-height: normal;"&gt;Hi. I'm trying out the Ix extensions for C++, and I notice there doesn't appear to be a Range function like in .NET LINQ. e.g.:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;auto values = Range(0, 100);
auto n = from(values).where( ...etc... );&lt;/code&gt;&lt;/pre&gt;

So....where's Range gone?&lt;br /&gt;
&lt;/div&gt;</description><author>stugol</author><pubDate>Thu, 09 May 2013 21:08:35 GMT</pubDate><guid isPermaLink="false">New Post: No Range() function in Ix++? 20130509090835P</guid></item><item><title>Commented Issue: Observable.Timer() and Observable.Interval() throw exception if period == 0 [13]</title><link>http://rx.codeplex.com/workitem/13</link><description>Even though the documentation says period &amp;#61;&amp;#61; 0 is supported&amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;&amp;#47;&amp;#47;&amp;#47; &amp;#60;param name&amp;#61;&amp;#34;period&amp;#34;&amp;#62;Period to produce subsequent values. If this value is equal to TimeSpan.Zero, the timer will recur as fast as possible.&amp;#60;&amp;#47;param&amp;#62;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;&lt;br /&gt;Here is an example exception stack trace&amp;#58;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;   at System.Reactive.Concurrency.ConcurrencyAbstractionLayerImpl.StartPeriodicTimer&amp;#40;Action action, TimeSpan period&amp;#41;&lt;br /&gt;   at System.Reactive.Concurrency.DefaultScheduler.SchedulePeriodic&amp;#91;TState&amp;#93;&amp;#40;TState state, TimeSpan period, Func&amp;#96;2 action&amp;#41;&lt;br /&gt;   at System.Reactive.Concurrency.Scheduler.SchedulePeriodic_&amp;#91;TState&amp;#93;&amp;#40;IScheduler scheduler, TState state, TimeSpan period, Func&amp;#96;2 action&amp;#41;&lt;br /&gt;   at System.Reactive.Concurrency.Scheduler.SchedulePeriodic&amp;#91;TState&amp;#93;&amp;#40;IScheduler scheduler, TState state, TimeSpan period, Func&amp;#96;2 action&amp;#41;&lt;br /&gt;   at System.Reactive.Linq.Observαble.Timer.π.Run&amp;#40;&amp;#41;&lt;br /&gt;   at System.Reactive.Linq.Observαble.Timer.Run&amp;#40;IObserver&amp;#96;1 observer, IDisposable cancel, Action&amp;#96;1 setSink&amp;#41;&lt;br /&gt;&amp;#40;remainder elided&amp;#41;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;&lt;br /&gt;The issue seems to be this code in __System.Reactive.Concurrency.ConcurrencyAbstractionLayerImpl.StartPeriodicTimer&amp;#40;Action action, TimeSpan period&amp;#41;__&amp;#58;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;&amp;#47;&amp;#47;&lt;br /&gt;&amp;#47;&amp;#47; MSDN documentation states the following&amp;#58;&lt;br /&gt;&amp;#47;&amp;#47;&lt;br /&gt;&amp;#47;&amp;#47;    &amp;#34;If period is zero &amp;#40;0&amp;#41; or negative one &amp;#40;-1&amp;#41; milliseconds and dueTime is positive, callback is invoked once&amp;#59;&lt;br /&gt;&amp;#47;&amp;#47;     the periodic behavior of the timer is disabled, but can be re-enabled using the Change method.&amp;#34;&lt;br /&gt;&amp;#47;&amp;#47;&lt;br /&gt;if &amp;#40;period &amp;#60;&amp;#61; TimeSpan.Zero&amp;#41;&lt;br /&gt;    throw new ArgumentOutOfRangeException&amp;#40;&amp;#34;period&amp;#34;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;&lt;br /&gt;Even the comment seems to indicate Period&amp;#61;&amp;#61;0 is allowed.&lt;br /&gt;Comments: Pull request&amp;#58; &amp;#10;https&amp;#58;&amp;#47;&amp;#47;rx.codeplex.com&amp;#47;SourceControl&amp;#47;network&amp;#47;forks&amp;#47;davedev&amp;#47;RxPeriodZero&amp;#47;contribution&amp;#47;4608</description><author>davedev</author><pubDate>Tue, 30 Apr 2013 21:46:41 GMT</pubDate><guid isPermaLink="false">Commented Issue: Observable.Timer() and Observable.Interval() throw exception if period == 0 [13] 20130430094641P</guid></item><item><title>Commented Issue: BehaviorSubject&lt;T&gt;.Current Property [8]</title><link>http://rx.codeplex.com/workitem/8</link><description>Please add a Current or Value property to BehaviorSubject&amp;#60;T&amp;#62; returning the instantaneous value so that it can be used more elegantly as a backing field for observable properties where the containing class may need to extract the current value imperatively, without using it in an asynchronous query.  This would avoid the more costly and verbose recommended alternative to use .FirstAsync&amp;#40;&amp;#41;.Wait&amp;#40;&amp;#41; as of Rx 2.0.&lt;br /&gt;&lt;br /&gt;Open discussion&amp;#58; &lt;br /&gt;http&amp;#58;&amp;#47;&amp;#47;social.msdn.microsoft.com&amp;#47;Forums&amp;#47;en-US&amp;#47;rx&amp;#47;thread&amp;#47;7b5b6982-4d03-4d44-a450-efebd5b2102a&amp;#47;&lt;br /&gt;Comments: Pull request&amp;#58; &amp;#10;https&amp;#58;&amp;#47;&amp;#47;rx.codeplex.com&amp;#47;SourceControl&amp;#47;network&amp;#47;forks&amp;#47;davedev&amp;#47;RxBehaviorSubjectValue&amp;#47;contribution&amp;#47;4602</description><author>davedev</author><pubDate>Tue, 30 Apr 2013 14:18:44 GMT</pubDate><guid isPermaLink="false">Commented Issue: BehaviorSubject&lt;T&gt;.Current Property [8] 20130430021844P</guid></item><item><title>Commented Unassigned: Optimise ReplaySubject for specific cases [35]</title><link>http://rx.codeplex.com/workitem/35</link><description>Currently the ReplaySubject is a very versatile class that can perform 5 major use cases&lt;br /&gt;1. Replay-One. Caching and replaying the last value.&lt;br /&gt;2. Replay-Many. &amp;#40;i.e. a value &amp;#62; 1&amp;#41;&lt;br /&gt;3. Replay-Period. Cache data for a period of time for late subscribers&lt;br /&gt;4. Replay by count and time. A combination of caching by count and period.&lt;br /&gt;5. Replay-All. Cache and replay all values.&lt;br /&gt;&lt;br /&gt;It seems to me that the most common usage&amp;#42; of Replay, &amp;#34;Replay&amp;#40;1&amp;#41;&amp;#34; incurs the cost of all the Scheduling and Buffering of the other implementations &amp;#40;Stopwatches, Queues, ImmutableLists of ScheduledObservers and the relevant checks&amp;#41;.&lt;br /&gt;&lt;br /&gt;My proposal is this&amp;#58; as the _bufferSize_ and _window_ are readonly values of a ReplaySubject, a specialization of the inner workings of the ReplaySubject can be loaded at construction time. For example if the new Replay&amp;#40;1&amp;#41; constructor was called then an internal implementation could be resolved that was specific and optimized for the behavior required by a Replay-one subject &amp;#58;&lt;br /&gt;&amp;#42; Use ImmutableList&amp;#60;IObserver&amp;#60;T&amp;#62;&amp;#62; instead of ImmutableList&amp;#60;SchduedledObserver&amp;#60;T&amp;#62;&amp;#62;, &lt;br /&gt;&amp;#42; no StopWatch, &lt;br /&gt;&amp;#42; no internal Queue of cached values &lt;br /&gt;&amp;#42; no Time and queue depth checks on every OnNext&lt;br /&gt;&lt;br /&gt;For Replay&amp;#40;n&amp;#41; where n&amp;#62;1, then an implementation with an intenal queue could be used. Still this implementation would have no need for the ImmutableList&amp;#60;SchduedledObserver&amp;#60;T&amp;#62;&amp;#62;, StopWatch and the time checks on the OnNext call.&lt;br /&gt;&lt;br /&gt;The two constructors that take a Window and a bufferSize&amp;#43;Window, could share an internal implemenation as I doubt there would be much perf difference between the two.&lt;br /&gt;&lt;br /&gt;Finally the Reply-all behaviour where the parameterless constructor is used, could use the Replay-Many implementation passing Int.Max as a param, but this would still needlessly be calling the Trim method for each OnNext, so again is a candidate for specialization.&lt;br /&gt;&lt;br /&gt;&amp;#42;In my opinion Replay&amp;#40;1&amp;#41; would be the most used operation of the ReplaySubject or the associated Replay extension method.&lt;br /&gt;Comments: The short answer is &amp;#34;Yes, we are seeing perf issues&amp;#34;. We switched out a quick modification of the ReplaySubject and noticed a large change in the number of allocations being made. &amp;#10;In ReplaySubject the root of the allocations seems to come from&amp;#10;    private ImmutableList&amp;#60;ScheduledObserver&amp;#60;T&amp;#62;&amp;#62; _observers&amp;#59;&amp;#10;Which in turn ScheduledObserver&amp;#60;T&amp;#62; has&amp;#10;    private readonly ConcurrentQueue&amp;#60;T&amp;#62; _queue &amp;#61; new ConcurrentQueue&amp;#60;T&amp;#62;&amp;#40;&amp;#41;&amp;#59;&amp;#10;which is excessively allocating arrays. I say excessively, but really I mean redundantly as we have no scheduling requirements, so dont need to cost of the ScheduledObserver&amp;#60;T&amp;#62;.&amp;#10;&amp;#10;I will try to create a test pack to reproduce our findings.&amp;#10;&amp;#10;w.r.t your proposed solution, thanks for the thought. However, I see this as a work around&amp;#47;hack where perhaps a far better implementation can be provided. I imagine as Rx gains in popularity &amp;#40;which it certainly seems to be doing&amp;#41;, there will be an expectation that it performs optimally. &amp;#10;&amp;#10;I have seen that Rx has gathered quite a ground swell in the Capital Markets&amp;#47;Investment Banking industry where often data is provided at a pretty quick rate &amp;#40;100s of values per second&amp;#41;. With a high tick rate and unnecessary allocations happening Garbage Collection can have an impact on performance. Essentially, I don&amp;#39;t think that new users should have to learn a hack to get assumed performance, when the library could be optimized.&amp;#10;&amp;#10;Having said this, I have taken a fork of the repo and am working on a proposed fix. I am not expecting someone else to do this for me, but thought I would raise an &amp;#34;Issue&amp;#34; for it so it can be tracked.&amp;#10;&amp;#10;Lee</description><author>LeeCampbell</author><pubDate>Wed, 17 Apr 2013 21:46:42 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: Optimise ReplaySubject for specific cases [35] 20130417094642P</guid></item><item><title>Commented Unassigned: Optimise ReplaySubject for specific cases [35]</title><link>http://rx.codeplex.com/workitem/35</link><description>Currently the ReplaySubject is a very versatile class that can perform 5 major use cases&lt;br /&gt;1. Replay-One. Caching and replaying the last value.&lt;br /&gt;2. Replay-Many. &amp;#40;i.e. a value &amp;#62; 1&amp;#41;&lt;br /&gt;3. Replay-Period. Cache data for a period of time for late subscribers&lt;br /&gt;4. Replay by count and time. A combination of caching by count and period.&lt;br /&gt;5. Replay-All. Cache and replay all values.&lt;br /&gt;&lt;br /&gt;It seems to me that the most common usage&amp;#42; of Replay, &amp;#34;Replay&amp;#40;1&amp;#41;&amp;#34; incurs the cost of all the Scheduling and Buffering of the other implementations &amp;#40;Stopwatches, Queues, ImmutableLists of ScheduledObservers and the relevant checks&amp;#41;.&lt;br /&gt;&lt;br /&gt;My proposal is this&amp;#58; as the _bufferSize_ and _window_ are readonly values of a ReplaySubject, a specialization of the inner workings of the ReplaySubject can be loaded at construction time. For example if the new Replay&amp;#40;1&amp;#41; constructor was called then an internal implementation could be resolved that was specific and optimized for the behavior required by a Replay-one subject &amp;#58;&lt;br /&gt;&amp;#42; Use ImmutableList&amp;#60;IObserver&amp;#60;T&amp;#62;&amp;#62; instead of ImmutableList&amp;#60;SchduedledObserver&amp;#60;T&amp;#62;&amp;#62;, &lt;br /&gt;&amp;#42; no StopWatch, &lt;br /&gt;&amp;#42; no internal Queue of cached values &lt;br /&gt;&amp;#42; no Time and queue depth checks on every OnNext&lt;br /&gt;&lt;br /&gt;For Replay&amp;#40;n&amp;#41; where n&amp;#62;1, then an implementation with an intenal queue could be used. Still this implementation would have no need for the ImmutableList&amp;#60;SchduedledObserver&amp;#60;T&amp;#62;&amp;#62;, StopWatch and the time checks on the OnNext call.&lt;br /&gt;&lt;br /&gt;The two constructors that take a Window and a bufferSize&amp;#43;Window, could share an internal implemenation as I doubt there would be much perf difference between the two.&lt;br /&gt;&lt;br /&gt;Finally the Reply-all behaviour where the parameterless constructor is used, could use the Replay-Many implementation passing Int.Max as a param, but this would still needlessly be calling the Trim method for each OnNext, so again is a candidate for specialization.&lt;br /&gt;&lt;br /&gt;&amp;#42;In my opinion Replay&amp;#40;1&amp;#41; would be the most used operation of the ReplaySubject or the associated Replay extension method.&lt;br /&gt;Comments: Hi Lee, &amp;#10;&amp;#10;Out of curiosity, are you experiencing real problems with the overhead incurred by the _count_ scenarios or did you simply notice that it&amp;#39;s unnecessary in the implementation&amp;#63;&amp;#10;&amp;#10;Note that you can use &amp;#96;Publish&amp;#40;initial&amp;#41;&amp;#96; instead of &amp;#96;Replay&amp;#40;1&amp;#41;&amp;#96;.  It uses __BehaviorSubject__ internally, which is essentially just a specialization of &amp;#96;ReplaySubject&amp;#40;1&amp;#41;&amp;#96;, perhaps due to its commonality as you&amp;#39;ve mentioned.  If you don&amp;#39;t need the initial value it can be excluded with __Where__, though in some cases you need to use __Select__ also if there is no sensible value to indicate exclusion in a particular domain&amp;#59; e.g., integers can be projected into nullable integers.&amp;#10;&amp;#10;For example&amp;#58; &amp;#10;&amp;#10;&amp;#96;&amp;#96;&amp;#96;c&amp;#35;&amp;#10;IObservable&amp;#60;int&amp;#62; xs &amp;#61; GetObservable&amp;#40;&amp;#41;&amp;#59;&amp;#10;IObservable&amp;#60;int&amp;#63;&amp;#62; ys &amp;#61; xs.Select&amp;#40;x &amp;#61;&amp;#62; new int&amp;#63;&amp;#40;x&amp;#41;&amp;#41;&amp;#59;&amp;#10;IConnectableObservable&amp;#60;int&amp;#63;&amp;#62; p &amp;#61; ys.Publish&amp;#40;initialValue&amp;#58; null&amp;#41;&amp;#59;&amp;#10;IObservable&amp;#60;int&amp;#62; q &amp;#61; from x in p&amp;#10;                     where x.HasValue&amp;#10;                     select x.Value&amp;#59;&amp;#10;q.Subscribe&amp;#40;...&amp;#41;&amp;#59;&amp;#10;...&amp;#10;p.Connect&amp;#40;&amp;#41;&amp;#59;&amp;#10;&amp;#96;&amp;#96;&amp;#96;&amp;#10;&amp;#10;&amp;#92;- Dave</description><author>davedev</author><pubDate>Wed, 17 Apr 2013 20:42:03 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: Optimise ReplaySubject for specific cases [35] 20130417084203P</guid></item><item><title>Created Unassigned: Optimise ReplaySubject for specific cases [35]</title><link>http://rx.codeplex.com/workitem/35</link><description>Currently the ReplaySubject is a very versatile class that can perform 5 major use cases&lt;br /&gt;1. Replay-One. Caching and replaying the last value.&lt;br /&gt;2. Replay-Many. &amp;#40;i.e. a value &amp;#62; 1&amp;#41;&lt;br /&gt;3. Replay-Period. Cache data for a period of time for late subscribers&lt;br /&gt;4. Replay by count and time. A combination of caching by count and period.&lt;br /&gt;5. Replay-All. Cache and replay all values.&lt;br /&gt;&lt;br /&gt;It seems to me that the most common usage&amp;#42; of Replay, &amp;#34;Replay&amp;#40;1&amp;#41;&amp;#34; incurs the cost of all the Scheduling and Buffering of the other implementations &amp;#40;Stopwatches, Queues, ImmutableLists of ScheduledObservers and the relevant checks&amp;#41;.&lt;br /&gt;&lt;br /&gt;My proposal is this&amp;#58; as the _bufferSize_ and _window_ are readonly values of a ReplaySubject, a specialization of the inner workings of the ReplaySubject can be loaded at construction time. For example if the new Replay&amp;#40;1&amp;#41; constructor was called then an internal implementation could be resolved that was specific and optimized for the behavior required by a Replay-one subject &amp;#58;&lt;br /&gt;&amp;#42; Use ImmutableList&amp;#60;IObserver&amp;#60;T&amp;#62;&amp;#62; instead of ImmutableList&amp;#60;SchduedledObserver&amp;#60;T&amp;#62;&amp;#62;, &lt;br /&gt;&amp;#42; no StopWatch, &lt;br /&gt;&amp;#42; no internal Queue of cached values &lt;br /&gt;&amp;#42; no Time and queue depth checks on every OnNext&lt;br /&gt;&lt;br /&gt;For Replay&amp;#40;n&amp;#41; where n&amp;#62;1, then an implementation with an intenal queue could be used. Still this implementation would have no need for the ImmutableList&amp;#60;SchduedledObserver&amp;#60;T&amp;#62;&amp;#62;, StopWatch and the time checks on the OnNext call.&lt;br /&gt;&lt;br /&gt;The two constructors that take a Window and a bufferSize&amp;#43;Window, could share an internal implemenation as I doubt there would be much perf difference between the two.&lt;br /&gt;&lt;br /&gt;Finally the Reply-all behaviour where the parameterless constructor is used, could use the Replay-Many implementation passing Int.Max as a param, but this would still needlessly be calling the Trim method for each OnNext, so again is a candidate for specialization.&lt;br /&gt;&lt;br /&gt;&amp;#42;In my opinion Replay&amp;#40;1&amp;#41; would be the most used operation of the ReplaySubject or the associated Replay extension method.&lt;br /&gt;</description><author>LeeCampbell</author><pubDate>Wed, 17 Apr 2013 16:38:17 GMT</pubDate><guid isPermaLink="false">Created Unassigned: Optimise ReplaySubject for specific cases [35] 20130417043817P</guid></item><item><title>Commented Unassigned: Rx.Net: Add Silverlight 5 support for portable library [34]</title><link>http://rx.codeplex.com/workitem/34</link><description>Silverlight 5 should support all &amp;#40;or almost all&amp;#41; of the portable library API, please add it to the list of supported platforms for the portable library.&lt;br /&gt;&lt;br /&gt;By not supporting Silverlight 5 you prevent everyone else from building portable libraries compatible with SL5 from using Rx. If you wan&amp;#39;t async support just utilize the microsoft.bcl.async package since it add async support&lt;br /&gt;Comments: I&amp;#39;ve looked a bit at the code and I hope t can be solved quite easily by following the following steps. &amp;#10;But it would require a new version of all platforms. &amp;#10;&amp;#10;1&amp;#59; We need 2 different portable libraries, the current one plus one which is &amp;#34;more portable&amp;#34; &amp;#40;target platforms where IObservable&amp;#41; does not exist. This second portable library would then include the implementation of the IObservable interfaces. &amp;#10;BTW&amp;#58; I think it would be a good idea to utilize the Microsoft.Bcl.Async package in order to add task and async support to nearly all platforms.&amp;#10;&amp;#10;2&amp;#59; Add TypeForwardedToAttribute&amp;#39;s in order to forward the IObservable interfaces to all builds which does not define the NO_RXINTERFACES &amp;#40;like the current portable library&amp;#41;. In this way allassemblies compiled against the &amp;#34;more portable&amp;#34; will work with the current portable assembly as well as all current platforms assemblies.&amp;#10;&amp;#10;You can then choose any of the libraries to compile against with the new portable library allowing us to build portable libraries which target more platforms.&amp;#10;</description><author>danneesset</author><pubDate>Sat, 13 Apr 2013 19:48:15 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: Rx.Net: Add Silverlight 5 support for portable library [34] 20130413074815P</guid></item><item><title>Created Unassigned: Rx.Net: Add Silverlight 5 support for portable library [34]</title><link>http://rx.codeplex.com/workitem/34</link><description>Silverlight 5 should support all &amp;#40;or almost all&amp;#41; of the portable library API, please add it to the list of supported platforms for the portable library.&lt;br /&gt;&lt;br /&gt;By not supporting Silverlight 5 you prevent everyone else from building portable libraries compatible with SL5 from using Rx. If you wan&amp;#39;t async support just utilize the microsoft.bcl.async package since it add async support&lt;br /&gt;</description><author>Daniel_Svensson</author><pubDate>Thu, 11 Apr 2013 10:11:42 GMT</pubDate><guid isPermaLink="false">Created Unassigned: Rx.Net: Add Silverlight 5 support for portable library [34] 20130411101142A</guid></item><item><title>New Post: The trouble with Where()</title><link>http://rx.codeplex.com/discussions/439717</link><description>&lt;div style="line-height: normal;"&gt;Dave, you are a gentleman and a scholar. Your suggestion is working like a charm. Not only that, my profiling shows the performance is just as good if not better than my homegrown solution where I was mapping subscribers myself.&lt;br /&gt;
&lt;br /&gt;
As for the Replay semantics, fortunately in my use case I'm not concerned with that because I'm getting an infinite and stateless upstream feed, i.e., I don't care about previous values for one particular key and I already have to wait for a new feed to come for each key anyway. So I just put the GroupBy behind a Publish/Refcount pair.&lt;br /&gt;
&lt;br /&gt;
Thanks so much!&lt;br /&gt;
&lt;/div&gt;</description><author>adhemar82</author><pubDate>Wed, 10 Apr 2013 15:42:17 GMT</pubDate><guid isPermaLink="false">New Post: The trouble with Where() 20130410034217P</guid></item><item><title>New Post: The trouble with Where()</title><link>http://rx.codeplex.com/discussions/439717</link><description>&lt;div style="line-height: normal;"&gt;Hi, &lt;br /&gt;
&lt;br /&gt;
How about using &lt;strong&gt;GroupBy&lt;/strong&gt; or &lt;strong&gt;GroupByUntil&lt;/strong&gt; with &lt;strong&gt;Publish&lt;/strong&gt;?&lt;br /&gt;
&lt;br /&gt;
For example: &lt;em&gt;(Untested)&lt;/em&gt;&lt;br /&gt;
&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
IConnectableObservable&amp;lt;IGroupedObservable&amp;lt;&lt;span style="color:Blue;"&gt;string&lt;/span&gt;, Foo&amp;gt;&amp;gt; foosByBar = 
    (&lt;span style="color:Blue;"&gt;from&lt;/span&gt; foo &lt;span style="color:Blue;"&gt;in&lt;/span&gt; foos
     &lt;span style="color:Blue;"&gt;group&lt;/span&gt; foo &lt;span style="color:Blue;"&gt;by&lt;/span&gt; foo.bar)
    .Publish();

foosByBar.Where(g =&amp;gt; g.Key == &lt;span style="color:#A31515;"&gt;&amp;quot;abc&amp;quot;&lt;/span&gt;).Take(1).SelectMany(g =&amp;gt; g).Subscribe(A);
foosByBar.Where(g =&amp;gt; g.Key == &lt;span style="color:#A31515;"&gt;&amp;quot;xyz&amp;quot;&lt;/span&gt;).Take(1).SelectMany(g =&amp;gt; g).Subscribe(B);
foosByBar.Where(g =&amp;gt; g.Key == &lt;span style="color:#A31515;"&gt;&amp;quot;bla&amp;quot;&lt;/span&gt;).Take(1).SelectMany(g =&amp;gt; g).Subscribe(C);

foosByBar.Connect();
&lt;/pre&gt;&lt;/div&gt;&lt;strong&gt;GroupBy&lt;/strong&gt; uses a dictionary lookup for every key to find the appropriate observable in which the value is pushed.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Publish&lt;/strong&gt; broadcasts the group-by so that the dictionary lookup operation is shared by all observers.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Where&lt;/strong&gt; / &lt;strong&gt;Take&lt;/strong&gt; executes the predicate only once to locate the appropriate group, then it receives a broadcast of every value in that group along with any other observers interested in the same key.&lt;br /&gt;
&lt;br /&gt;
Note that &lt;strong&gt;GroupBy&lt;/strong&gt; doesn't replay &lt;strong&gt;IGroupedObservable&lt;/strong&gt; so you must set up all of your subscriptions before connecting.  If you'd rather use &lt;strong&gt;RefCount&lt;/strong&gt; than &lt;strong&gt;Connect&lt;/strong&gt;, then perhaps you should consider applying the &lt;strong&gt;Replay&lt;/strong&gt; operator to the result of &lt;strong&gt;GroupBy&lt;/strong&gt;.&lt;br /&gt;
&lt;br /&gt;
- Dave&lt;br /&gt;
&lt;/div&gt;</description><author>davedev</author><pubDate>Wed, 10 Apr 2013 02:53:54 GMT</pubDate><guid isPermaLink="false">New Post: The trouble with Where() 20130410025354A</guid></item><item><title>New Post: The trouble with Where()</title><link>https://rx.codeplex.com/discussions/439717</link><description>&lt;div style="line-height: normal;"&gt;Do you really need separate subscribers?&lt;br /&gt;
&lt;br /&gt;
If you know all keys at compile time, then you can use one subscriber with a switch statement for it's OnNext.&lt;br /&gt;
&lt;br /&gt;
If you want to assemble a list of &amp;quot;handlers&amp;quot; at runtime, then yes, I think you may need a dictionary to make the lookup fast. But I think you can get by with one subscriber, and a concurrentdictionary. Use GetOrCreate (?) to register new handlers for each new key. You can even make a disposable which removes the handler from the dict.&lt;br /&gt;
&lt;br /&gt;
If you want to register multiple handlers, then you may need locks. Unless you're ok with key-&amp;gt;empty sticking around.&lt;br /&gt;
&lt;br /&gt;
Hope that helps.&lt;br /&gt;
&lt;/div&gt;</description><author>ngm_codeplex</author><pubDate>Wed, 10 Apr 2013 01:25:33 GMT</pubDate><guid isPermaLink="false">New Post: The trouble with Where() 20130410012533A</guid></item><item><title>New Post: The trouble with Where()</title><link>https://rx.codeplex.com/discussions/439717</link><description>&lt;div style="line-height: normal;"&gt;I love Rx, but I have a problem I keep running into.&lt;br /&gt;
&lt;br /&gt;
Let's say we have a single upstream &lt;code&gt;IObservable&amp;lt;Foo&amp;gt;&lt;/code&gt;, and N downsteam sequences attached to it, where each is only interested in those Foos that satisfy some simple predicate (say &lt;code&gt;foo.bar == someKey&lt;/code&gt;).&lt;br /&gt;
&lt;br /&gt;
Of course this is a simple job for the &lt;code&gt;Where()&lt;/code&gt; operator:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;IObservable&amp;lt;Foo&amp;gt; foos = ...;
foos.Where(foo =&amp;gt; foo.bar == &amp;quot;abc&amp;quot;).Subscribe(f =&amp;gt; A(f));
foos.Where(foo =&amp;gt; foo.bar == &amp;quot;xyz&amp;quot;).Subscribe(f =&amp;gt; B(f));
foos.Where(foo =&amp;gt; foo.bar == &amp;quot;bla&amp;quot;).Subscribe(f =&amp;gt; C(f));
...
// Many more subscriptions for different bar values.
&lt;/code&gt;&lt;/pre&gt;

What will essentially happen here is that for each &lt;code&gt;Foo&lt;/code&gt; produced upstream, the &lt;code&gt;Where()&lt;/code&gt; predicate will be evaluated for that &lt;code&gt;Foo&lt;/code&gt; N times. It acts like a linear search to find all subscribers that want this &lt;code&gt;Foo&lt;/code&gt;. That's all well and good, and exactly what we (should) expect from using &lt;code&gt;Where()&lt;/code&gt; here.&lt;br /&gt;
&lt;br /&gt;
The problem I have is that in my case, N may be very large, but the subset of subscribers that want any particular &lt;code&gt;Foo&lt;/code&gt; is very small. Typically, there will be only one for each &lt;code&gt;Foo&lt;/code&gt;. This means I'm essentially doing a slow linear search when I could be doing a very efficient lookup to find the few downstream sequences that this &lt;code&gt;Foo&lt;/code&gt; needs to be propagated too. My apps run in a very performance critical environment and I cannot afford this inefficiency.&lt;br /&gt;
&lt;br /&gt;
I've racked my brain trying to find some elegant way of doing this more efficiently, but I can only come up with solutions that involve storing a lot of state (mapping subscribers, etc) and having to manage concurrency very carefully, which defeats a lot of the purpose of using Rx in the first place. I would prefer some way of dealing with this in terms of existing operators. Has anyone dealt with this issue before, or know of a good solution? I'm happy to provide more details.&lt;br /&gt;
&lt;/div&gt;</description><author>adhemar82</author><pubDate>Wed, 10 Apr 2013 00:38:56 GMT</pubDate><guid isPermaLink="false">New Post: The trouble with Where() 20130410123856A</guid></item><item><title>New Post: IxJS on nuget</title><link>http://rx.codeplex.com/discussions/439471</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
do you plan to release ix.js and l2o.js to nuget? Would be nice to have them there.&lt;br /&gt;
&lt;/div&gt;</description><author>DGolubets</author><pubDate>Mon, 08 Apr 2013 08:28:57 GMT</pubDate><guid isPermaLink="false">New Post: IxJS on nuget 20130408082857A</guid></item><item><title>Source code checked in, #e24677887e1727fb3b5dd614d996aa6d113b3834</title><link>http://rx.codeplex.com/SourceControl/changeset/changes/e24677887e1727fb3b5dd614d996aa6d113b3834</link><description>add BehaviorSubject&amp;#10;</description><author>Kirk Shoop</author><pubDate>Mon, 08 Apr 2013 06:21:12 GMT</pubDate><guid isPermaLink="false">Source code checked in, #e24677887e1727fb3b5dd614d996aa6d113b3834 20130408062112A</guid></item><item><title>Source code checked in, #615efd71bf8acb8f5adcad40ca86eda2d41c4dcd</title><link>http://rx.codeplex.com/SourceControl/changeset/changes/615efd71bf8acb8f5adcad40ca86eda2d41c4dcd</link><description>change from_iterable to from&amp;#40;Iterate&amp;#40;&amp;#41;&amp;#41;&amp;#10;</description><author>Kirk Shoop</author><pubDate>Mon, 01 Apr 2013 04:18:25 GMT</pubDate><guid isPermaLink="false">Source code checked in, #615efd71bf8acb8f5adcad40ca86eda2d41c4dcd 20130401041825A</guid></item><item><title>Source code checked in, #05a8bb7e0d563360023fafa74d244ec1adea440f</title><link>http://rx.codeplex.com/SourceControl/changeset/changes/05a8bb7e0d563360023fafa74d244ec1adea440f</link><description>adds from_iterable&amp;#10;&amp;#10;from_iterable&amp;#40;r, opt - scheduler&amp;#41; adapts any r that satisfies&amp;#10;std&amp;#58;&amp;#58;begin&amp;#40;r&amp;#41; and std&amp;#58;&amp;#58;end&amp;#40;r&amp;#41; into an Observable&amp;#60;decltype&amp;#40;&amp;#42;begin&amp;#40;r&amp;#41;&amp;#41;&amp;#62;&amp;#10;</description><author>Kirk Shoop</author><pubDate>Sun, 31 Mar 2013 19:09:25 GMT</pubDate><guid isPermaLink="false">Source code checked in, #05a8bb7e0d563360023fafa74d244ec1adea440f 20130331070925P</guid></item><item><title>Created Feature: RxC++ : Implement Timestamp [33]</title><link>http://rx.codeplex.com/workitem/33</link><description>Implement Timestamp operator&lt;br /&gt;</description><author>kirkshoop</author><pubDate>Sat, 30 Mar 2013 18:07:35 GMT</pubDate><guid isPermaLink="false">Created Feature: RxC++ : Implement Timestamp [33] 20130330060735P</guid></item><item><title>Created Feature: RxC++ : Implement Timeout [32]</title><link>http://rx.codeplex.com/workitem/32</link><description>Implement Timeout operator&lt;br /&gt;</description><author>kirkshoop</author><pubDate>Sat, 30 Mar 2013 18:06:56 GMT</pubDate><guid isPermaLink="false">Created Feature: RxC++ : Implement Timeout [32] 20130330060656P</guid></item><item><title>Created Feature: RxC++ : Implement Timer [31]</title><link>http://rx.codeplex.com/workitem/31</link><description>Implement Timer operator&lt;br /&gt;</description><author>kirkshoop</author><pubDate>Sat, 30 Mar 2013 18:05:51 GMT</pubDate><guid isPermaLink="false">Created Feature: RxC++ : Implement Timer [31] 20130330060551P</guid></item><item><title>Created Feature: RxC++ : Implement Window [30]</title><link>http://rx.codeplex.com/workitem/30</link><description>Implement Window operator&lt;br /&gt;</description><author>kirkshoop</author><pubDate>Sat, 30 Mar 2013 18:05:11 GMT</pubDate><guid isPermaLink="false">Created Feature: RxC++ : Implement Window [30] 20130330060511P</guid></item></channel></rss>