LearningTech

Event-Driven

Event Notification Pattern

Description

A system notifies other systems that a change has occurred, but does not provide the full state. The receiver must call back to get details.

Where to use

  • Lightweight notification.
  • \n
  • Cache invalidation.

Real World Example

A webhook sends 'Order #123 Updated'. The receiver then calls GET /orders/123 to see what changed.

Code Example

class EventNotificationPattern:
    def __init__(self):
        pass

    def execute(self):
        print('Executing Event Notification Pattern')