OpenSimTools / RaceDirector

The sim racer's Swiss Army knife.
MIT License
3 stars 0 forks source link

Switch to a modern reactive framework #28

Closed paoloambrosio closed 2 years ago

paoloambrosio commented 3 years ago

The Dataflow API has some major drawbacks:

Replace Dataflow with Rx.NET (see analysis below for why that was chosen).

paoloambrosio commented 2 years ago

Framework Analysis

Resources:

Reactive Streams

Dataflow Reactive Streams
SourceBlock<TOutput> IPublisher<T>
TargetBlock<TInput> ISubscriber<T>
IPropagatorBlock<TInput,TOutput> IProcessor<T, U>

Reactive Extensions

Dataflow Rx
SourceBlock<TOutput> IObservable<T>
TargetBlock<TInput> IObserver<T>
IPropagatorBlock<TInput,TOutput> ISubject<TSource, TResult>
DataflowBlockOptions.TaskScheduler .ObserveOn(_: IScheduler)

IAsyncEnumerable

Akka .NET

Dataflow Akka .NET
SourceBlock<TOutput> Source<TOut, TMat>
TargetBlock<TInput> Sink<TIn, TMat>
IPropagatorBlock<TInput,TOutput> IFlow<TOut, out TMat>