Design Pattern - Observer (Publish-subscribe model|Pub Sub)

Card Puncher Data Processing

Design Pattern - Observer (Publish-subscribe model|Pub Sub)

About

An observer makes a observation by creating an event and passing it to a callback method of the subscriber.

The observer is also called a message broker because it dispatches the event (ie message) to the subscriber (pubsub).

The observer is used a fundamental pattern of Reactive programming

Usage

  • chat - when a message is posted, all peoples in the chatroom are noticed
  • data replication - when a insert happens in a database, a insert happens in a replica
  • Recalculation of derived measure.
    • Excel, if you change the value of a cell, the formulas using this cell are immediately recalculated.
    • User interface: If you delete a notification, the notification count should decrease, …

Library





Discover More
Card Puncher Data Processing
Data Processing - Replication

Replication: Having a copy of the same data on multiple machines (nodes) in order to increase : Feature Example Performance serve reads in parallel, distributing application workloads across multiple...
Data System Architecture
Logical Data Modeling - (Derived|Calculated) Attribute (Derived Data)

Derived is a property of: a variable (scalar) or a of column (collection) The value can be calculated or deduced from relationship Groupings or from the values of other variable. The value of a Derived...
Card Puncher Data Processing
ReactiveX

is Functional_reactive_programmingFunctional reactive programming library (implemented in several languages) It composes asynchronous and event-based programs using observable asynchronous sequences...
Card Puncher Data Processing
Redis

is an open source (BSD licensed), in-memory key-value data store used as: database, cache and message broker. is an acronym for Remote Dictionary Server. Hash, (if you...
Bird Message
Stream - Messaging System

Messaging systems implements near-realtime asynchronous computation. A messaging system is a fairly low-level piece of infrastructure—it stores messages and waits for consumers to consume them as stream...
Card Puncher Data Processing
What is Reactive Programming?

Reactive Programming is an event-driven programmation based on the observer / subscriber pattern via an event loop. They are reactive implementing a reactor pattern. It means that: functions create...
Event Centric Thinking
What is a Stream? Also known as Pipe, Message Queue or Event Processing

A stream is: a sequence of aninfinite cardinality (size) delivered atunknown time intervals. list Streams of data user activity on a website sensor readings from devices (IOT) order...
Card Puncher Data Processing
What is an Event Driven Architecture (EDA)?

This page is the architecture components of a event driven architecture. It's publish-subscribe messaging system. A receives messages (event) from publishers and delivers them to subscribers. ...



Share this page:
Follow us:
Task Runner