Skip to content

Instantly share code, notes, and snippets.

@tomsapps
Last active November 16, 2016 16:09
Show Gist options
  • Save tomsapps/38003d7f20449465b445e95e30aaa1d4 to your computer and use it in GitHub Desktop.
Save tomsapps/38003d7f20449465b445e95e30aaa1d4 to your computer and use it in GitHub Desktop.

Observable

Observables are producers that can return many values asynchronously

Producers determine when the values are sent (PUSH)

Observable executions are NOT shared

setTimeout(() => foo.subscribe)
foo.subscribe

^^ these will produce different values

An observable is a way of representing many values being delivered from a producer to a consumer.

The Producer is lazy so it only starts delivering values once we call subscribe.

The Consumer is a set of callbacks (next, error, complete)

subscribers are consumers

Links that got me into frp

The godocs have been a good source of ELI5 explinations of these concepts for me.

https://blog.golang.org/pipelines

^^cmd+F the following on above link:

  • What is a pipeline?
  • Fan-out, fan-in

http://divan.github.io/posts/go_concurrency_visualize/

Resources

Libraries

Tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment