make it really clear that wangle/rx is deprecated
[folly.git] / folly / wangle / deprecated / rx / README.md
1 Rx is a pattern for "functional reactive programming" that started at
2 Microsoft in C#, and has been reimplemented in various languages, notably
3 RxJava for JVM languages.
4
5 It is basically the plural of Futures (a la Wangle).
6
7 ```
8                     singular              |            plural
9         +---------------------------------+-----------------------------------
10   sync  |  Foo getData()                  |  std::vector<Foo> getData()
11   async |  wangle::Future<Foo> getData()  |  wangle::Observable<Foo> getData()
12 ```
13
14 For more on Rx, I recommend these resources:
15
16 Netflix blog post (RxJava): http://techblog.netflix.com/2013/02/rxjava-netflix-api.html
17 Introduction to Rx eBook (C#): http://www.introtorx.com/content/v1.0.10621.0/01_WhyRx.html
18 The RxJava wiki: https://github.com/Netflix/RxJava/wiki
19 Netflix QCon presentation: http://www.infoq.com/presentations/netflix-functional-rx
20 https://rx.codeplex.com/
21
22 I haven't even tried to support move-only data in this version. I'm on the
23 fence about the usage of shared_ptr. Subject is underdeveloped. A whole rich
24 set of operations is obviously missing. I haven't decided how to handle
25 subscriptions (and therefore cancellation), but I'm pretty sure C#'s
26 "Disposable" is thoroughly un-C++ (opposite of RAII). So for now subscribe
27 returns nothing at all and you can't cancel anything ever. The whole thing is
28 probably riddled with lifetime corner case bugs that will come out like a
29 swarm of angry bees as soon as someone tries an infinite sequence, or tries to
30 partially observe a long sequence. I'm pretty sure subscribeOn has a bug that
31 I haven't tracked down yet.
32
33 DEPRECATED:
34 This was an experimental exploration. There are better, more robust, and (most
35 importantly) supported C++ implementations, notably
36 [rxcpp](https://rxcpp.codeplex.com/). Use that instead. You really shouldn't
37 use this one. It's unsupported and incomplete. Honest.