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:\n    def __init__(self):\n        pass\n\n    def execute(self):\n        print('Executing Event Notification Pattern')