Chapter 12

What communication pattern is implemented by ReactiveX?

ReactiveX is an implementation of the publish/subscribe communication pattern.

What are the three most widely used communication patterns?

The three most widely used communication patterns are as follows:

  • Publish/subscribe
  • Request/response
  • Channel

What is the difference between pull and push communication?

With pull-based communication, an observer actively requests information from an emitter each time it needs some data.

With push-based communication, an observer first registers itself to an emitter. Then the observer is notified each time the emitter emits an event.

Give examples of pull- and push-based protocols.

The following protocols are based on pull communication:

  • HTTP
  • Corba

The following protocols are based on push communication:

  • MQTT
  • Kafka

What is framing?

Framing is the fact that some data is packaged into a container that supports fragmentation. Once a data blob has been framed, it can be split into several parts before being transmitted on a communication channel. The receiver of these parts is then able to unframe them and recompose the original data blob.

What is serialization?

A serialization operation consists of encoding an object to another representation. The typical use case of serialization is to encode native objects to a representation that can be sent on a communication channel. Serialization is also a way to make information interoperable between several systems and/or programming languages.

What is routing?

The routing of events is the action of delivering each event to its recipient. This step is necessary when implementing event multiplexing, because the items of several observables are emitted on the same communication channel but in destination of different observers.

What type of message are needed to send an observable over a network link?

First, some messages are needed to handle the life cycle of the observable:

  • subscribe messages, emitted to atomically create and subscribe to an observable
  • dispose messages, emitted to unsubscribe from an observable

These two messages should have associated acknowledgement messages to confirm the success or failure of the request.

Then, one message type per observable event is needed:

  • item messages, emitted for each item
  • error messages, emitted when an observable completes on error
  • complete messages, emitted when an observable completes on success
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.171.51