Skip to content

Commit

Permalink
docs(glossary): add pull and push
Browse files Browse the repository at this point in the history
  • Loading branch information
benlesh committed Jul 3, 2020
1 parent 255ef7a commit f1d5972
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs_app/content/guide/glossary-and-semantics.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ While not all of the documentation for RxJS reflects this terminology, it is a g
- [Unicast](#unicast)
- [Cold](#cold)
- [Hot](#hot)
- [Push](#push)
- [Pull](#pull)
- [Minor Entities](#minor-entities)
- [Operator](#operator)
- [Operator Function](#operator-function)
Expand Down Expand Up @@ -125,6 +127,15 @@ An observable is "cold" when it creates a new [producer](#Producer) during [subs

An observable is "hot", when its [producer](#Producer) was created outside of the context of the [subscribe](#Subscribe) action. This means that the "hot" observable is almost always [multicast](#Multicast). It is possible that a "hot" observable is still _technically_ unicast, if it is engineered to only allow one [subscription](#Subscription) at a time, however, there is no straightforward mechanism for this in RxJS, and the scenario is a unlikely. For the purposes of discussion, all "hot" observables can be assumed to be [multicast](#Multicast). Hot observables cannot be made [cold](#Cold).

### Push

[Observables](#Observable) are a push-based type. That means rather than having the [consumer](#Consumer) call a function or perform some other action to get a value, the [consumer](#Consumer) receives values as soon as the [producer](#Producer) has produced them, via a registered [next](#Next) handler.


### Pull

Pull-based systems are the opposite of [push](#Push)-based. In a pull-based type or system, the [consumer](#Consumer) must request each value the [producer](#Producer) has produced manually, perhaps long after the [producer](#Producer) has actually done so. Examples of such systems are [Functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) and [Iterators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols)

## Minor Entities

### Operator
Expand Down

0 comments on commit f1d5972

Please sign in to comment.