reactive-programming

Does .Net Reactive Extensions Framework (Rx) takes topological order into consideration?

懵懂的女人 提交于 2020-01-05 02:36:14
问题 Does the .Net Reactive Extensions Framework propagates the notifications in topological order to minimize the amount of updates? Like Scala Rx does: Does .Net Reactive Extensions (Rx) ta 回答1: .NET Rx uses several semantics while implementing FRP. The key point are the observables and subscriber contexts, especially the schedulers used by subscribers. TL;DR - .NET RX does not use topological order while invoking notifications. The long answer: subscibers are invoked by order of their

Observable.Range being repeated?

不想你离开。 提交于 2020-01-04 16:51:42
问题 New to Rx -- I have a sequence that appears to be functioning correctly except for the fact that it appears to repeat. I think I'm missing something around calls to Select() or SelectMany() that triggers the range to re-evaluate. Explanation of Code & What I'm trying to Do For all numbers, loop through a method that retrieves data (paged from a database). Eventually, this data will be empty (I only want to keep processing while it retrieves data For each of those records retrieved, I only

Observable.Range being repeated?

爱⌒轻易说出口 提交于 2020-01-04 16:51:16
问题 New to Rx -- I have a sequence that appears to be functioning correctly except for the fact that it appears to repeat. I think I'm missing something around calls to Select() or SelectMany() that triggers the range to re-evaluate. Explanation of Code & What I'm trying to Do For all numbers, loop through a method that retrieves data (paged from a database). Eventually, this data will be empty (I only want to keep processing while it retrieves data For each of those records retrieved, I only

How to do I show progress when using Reactive Extensions in C#

一个人想着一个人 提交于 2020-01-04 02:15:08
问题 Am using reactive extensions in C# to perform some calculations. Here is how my code looks like so far. I have tried to wrap the code around so that I can show progress while to executing a series of tasks within my Calculate method Here is the observable IObservable<ResultWithProgress<SampleResult>> Calculate(){ return Observable.Create<ResultWithProgress<SampleResult>>(obs => { var someTask = DoSomeTask1(); obs.OnNext(new ResultWithProgress(){Progress = 25, ProgressText ="Completed Task1"})

Why does Subject<T>.Dispose does not dispose current subscriptions?

此生再无相见时 提交于 2020-01-03 19:04:18
问题 Hi I've been thinking for some time that Subject<T> disposes all the subscriptions based on it if you manually call its Dispose method. But I've recently found it doesn't work that way, it just clears its inner collection of observers and substitutes it with a DisposedObserver helper class instance. I found myself a little confused about the behaviour, just assumed that the "normal" would be just propagate and dispose all the suscribers. Later, trying to figure out why is designed this way, I

How to handle mouse and touch events simultaneously with reactive event streams

孤人 提交于 2020-01-03 09:49:59
问题 I'm building an audio playback control that lets users scrub back and forth through an audio file. It needs to work with touch and mouse events. How should I go about managing the events for this with reactive event streams? Here's a rough idea of how I would expect to build it. <div id="timeline"> <span id="scrubber"></span> </div> then, using Bacon.js to create event streams var mousedowns = $('#timeline').asEventStream('mousedown'); var touchstarts = $('#timeline').asEventStream(

How to handle mouse and touch events simultaneously with reactive event streams

前提是你 提交于 2020-01-03 09:49:09
问题 I'm building an audio playback control that lets users scrub back and forth through an audio file. It needs to work with touch and mouse events. How should I go about managing the events for this with reactive event streams? Here's a rough idea of how I would expect to build it. <div id="timeline"> <span id="scrubber"></span> </div> then, using Bacon.js to create event streams var mousedowns = $('#timeline').asEventStream('mousedown'); var touchstarts = $('#timeline').asEventStream(

Is the Reactive Framework (RX) available for use in Mono yet?

北慕城南 提交于 2020-01-03 09:04:14
问题 Been searching but the only thing I found was http://evain.net/blog/articles/2009/07/30/rebasing-system-reactive-to-the-net-clr which I got to work, but it feels like there should be a simpler way, specially since rx was first release back in mid 09. 回答1: You can now download it for .NET 3.5SP1 and .NET 4, so I wouldn't be at al surprised if it just worked against recent releases of Mono - no Silverlight doohickies required at all. Having said that, I haven't tried it at all against Mono :)

Is it possible to build a Reactive Application using a non-Functional language?

依然范特西╮ 提交于 2020-01-02 07:12:22
问题 I would like to understand if the principles behind the Reactive Application manifesto can be achieved using a non-functional language . Some people say that since FP use immutable states and free side-effects functions, they are easier to implement concurrent, distributed and resilient systems. But how can we achieve that using Java for example? There are some frameworks like Apache Camel, that have some components to work with, like Camel RX , and Camel SEDA . Are these frameworks enough? I

Calling network services in parallel using RxJava. Is this the right way?

我怕爱的太早我们不能终老 提交于 2020-01-02 04:37:05
问题 Idea is to make 3 network calls in parallel. (I am using Google as the servies for demo purpose. The following works but not sure if this is the right way or it can be simplified. What should I do if I have to combine the responses of all the three searches? Please advise. public class GoogleSearchRx { public static void main(String args[]) { CountDownLatch latch = new CountDownLatch(3); search("RxJava").subscribeOn(Schedulers.io()).subscribe( links -> { links.forEach(link -> out.println