LeeCampbell / IntroToRx

Content and build for "Introduction to Rx" digital book

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expand the Rx vs Task discussion

LeeCampbell opened this issue · comments

List the (dis)advantages with Rx and Task

Rx

  • No way to provide Back pressure e.g. from x in xs from from content in Download(x)....how do I throttle so I dont have more than 5 calls to Download at once. (Maybe with Merge).
  • Clumsy for Single value sequences. A bit like using an Array to return a single value.

Task

  • Async/Await is really awesome. Finally Begin/EndAsyn pattern can go die.
  • Painful cancellation paradigm. Arguments that suggest somethings are not cancellable so should not be built in seem very flaky.
  • Obviously only for single values
  • Cant compose, but not as nicely as Rx (IMO).
  • Eager. If you have a task it has started running.
  • Pre task: Einstien, With Task : Elvis, With await : Mort. Problem is, Concurrency is not a Mort problem space.