• Stars
    star
    478
  • Rank 88,366 (Top 2 %)
  • Language
    Rust
  • License
    MIT License
  • Created over 9 years ago
  • Updated about 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Reactive Extensions for the Rust Programming Language

This is an implementation of reactive streams, which, at the high level, is patterned off of the interfaces and protocols defined in http://reactive-streams.org.

It also draws a lot of inspiration from clojures Transducers, in that it attempts to decouple the functions doing the work from their plumbing. It does this with Strategies. These effect how a publisher/processor will consume and output data.

The high level API built on top of the interfaces (the customer facing portions) draw inspiration more from Elm than the java based Rx libraries.

The core types are as follows:

Producer<Strategy, Output> 

Producer is where most of the action happens. It generates data and supplies a datum at a time to its subscribers via the Subscriber::on_next method. If it has multiple subscribers, how it supplies each subscriber with data is up to the Strategy. It also limits its output using a pushback mechanism by being supplied a request amount by the subscriber (via its subscription). The hope is that a producer can be as simple as a proc, relying on the strategy and the subscription objects to do most of its heavy lifting, while the proc does only data transformation/generation.

OutputStrategy<Output>

There are many ways a producer might distribute data. When request limiting is present, there are a few options a strategy might take:

  1. Keep all subscribers in-sync by broadcasting to all only when they all have remaining requests.
  2. Eagerly send to any subscribers with available requests, discarding the messages to those without.
  3. Round-Robin across subscribers with available requests.
  4. Keep a queue for each subscriber which is currently without requests, in an attempt to keep all subscribers in sync.
InputStrategy<...>

An input Strategy is what copes with various types of input, Iterators, data structures, multiple subscriptions, etc. It can choose to execute one when it receives the other, or selects, or anything, really.

Subscriber<Input>

The subscriber subscribes to a Producer. Its only responsibility is to supply to the producer a reqeust number (via the subscription object) which acts as a backpressure mechanism.

Processor<Strategy, Input, Output> : Producer<Strategy, Output> + Subscriber<Input>

A processor is simply a Producer + a Subscriber. It is a link in the execution chain. Among its other responsibilities, it must pass down request backpressure values from its subscribers. It would also propagate errors downstream, and propagate unsubscribes upstream.

LICENSE

The MIT License (MIT)

Copyright (c) 2015 ReactiveX

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

RxJava

RxJava โ€“ Reactive Extensions for the JVM โ€“ a library for composing asynchronous and event-based programs using observable sequences for the Java VM.
Java
47,636
star
2

rxjs

A reactive programming library for JavaScript
TypeScript
30,172
star
3

RxSwift

Reactive Programming in Swift
Swift
24,144
star
4

RxAndroid

RxJava bindings for Android
Java
19,863
star
5

RxKotlin

RxJava bindings for Kotlin
Kotlin
6,997
star
6

RxGo

Reactive Extensions for the Go language.
Go
4,840
star
7

RxPY

ReactiveX for Python
Python
4,677
star
8

rxdart

The Reactive Extensions for Dart
Dart
3,336
star
9

RxCpp

Reactive Extensions for C++
C++
2,949
star
10

RxPHP

Reactive extensions for PHP
PHP
1,680
star
11

learnrx

A series of interactive exercises for learning Microsoft's Reactive Extensions Library for Javascript.
JavaScript
1,403
star
12

RxNetty

Reactive Extension (Rx) Adaptor for Netty
Java
1,383
star
13

IxJS

The Interactive Extensions for JavaScript
TypeScript
1,284
star
14

RxRuby

Reactive Extensions for Ruby
Ruby
959
star
15

RxScala

RxScala โ€“ Reactive Extensions for Scala โ€“ a library for composing asynchronous and event-based programs using observable sequences
Scala
885
star
16

RxJavaFX

RxJava bindings for JavaFX
Java
517
star
17

RxClojure

RxJava bindings for Clojure
Clojure
359
star
18

rxjs-tslint

TSLint rules targeting RxJS
TypeScript
308
star
19

RxJavaReactiveStreams

Adapter between RxJava and ReactiveStreams
Java
234
star
20

RxJavaDebug

Java
162
star
21

rxjs-docs

The home for new work on the new RxJS docs (RxJS v 5 and up). New to this space? Say hi here: https://github.com/ReactiveX/rxjs-docs/issues/24. Want to find out what's up? We're chatting here. https://github.com/ReactiveX/rxjs-docs/issues/4
TypeScript
161
star
22

RxGroovy

RxJava bindings for Groovy
Groovy
156
star
23

reactivex.github.io

ReactiveX Website
JavaScript
139
star
24

RxJavaAsyncUtil

Java
132
star
25

RxJavaString

Java
130
star
26

RxApacheHttp

RxJava bindings for Apache HTTP
Java
118
star
27

RxJavaJoins

Java
100
star
28

RxSwing

RxJava bindings for Swing
Java
97
star
29

RxJavaMath

Math operators for RxJava.
Java
96
star
30

rxjs-advent-2018

RxJS 2018 Advent Calendar
TypeScript
91
star
31

rxjs-core-notes

Notes from RxJS core meetings
77
star
32

RxJavaFileUtils

File utilities with RxJava
Java
62
star
33

RxJavaComputationExpressions

Java
60
star
34

RxJavaGuava

Java
54
star
35

RxJavaParallel

Experimental Parallel Extensions for RxJava
Java
54
star
36

RxJRuby

RxJava bindings for JRuby
Ruby
37
star
37

Rx.NET

Rx.NET โ€“ Reactive Extensions for .NET โ€“ a library for composing asynchronous and event-based programs using observable sequences for the CLR.
31
star
38

RxQuasar

RxJava bindings for Quasar
Java
16
star
39

RxRoboVM

RxJava bindings for iOS
Java
7
star
40

BuildInfrastructure

Test project for the new build system.
Groovy
5
star
41

RxSwing2

Reactive bindings for Java 8 Swing on top of RxJava 2
4
star