Multicasting vs. Unicasting

Explore the concepts of multicasting and unicasting.

Multicasting essentials

Multicasting is one of the concepts that often confuse people when first learning RxJS. But this concept is really useful and solves many problems in web applications. In this chapter, we’ll demystify this concept for you and make it simple. We’ll start by explaining the difference between multicasting and unicasting, and then we’ll explore RxJS subjects.

Before hitting the concept of multicasting, let's understand what producer means. A producer is the source of values of the observable. For example, DOM events, WebSockets, and HTTP requests are regarded as producers. Basically, it’s any data source used to get values.

Observables basically fall into two types—hot and cold. Let’s examine the difference between them.

A cold observable

An observable is called cold when the data emitted is created by the observable itself. The producer of the data is then created inside the observable itself. This is an example of a cold observable:

Get hands-on with 1200+ tech skills courses.