Messaging and Notifications: Use Cases

Messaging

Use Cases for a Message Bus

  • Notifications
    • pipeline steps
      • single implementation (for most steps)
        • usage pattern: push-pull pipeline
        • exchange type: direct
        • queues: single queue for each pipeline step, with multiple consumers per queue
      • multiple implementations (e.g., user target resolvers)
        • usage pattern: push-pull pipeline
        • exchange type: direct
        • queues: different queue for each "type" of user-target resolver, with multiple consumers per queue
    • delivery channels
      • usage pattern: pub/sub or push-pull pipeline, depending on channel implementations
      • exchange type: fanout ( ? )
  • Cross-process event handling
    • usage pattern: pub/sub
    • exchange type: direct and/or topic
  • Course publish event (CMS → LMS)
    • usage pattern: request-reply RPC or pub/sub
    • exchange type: default or direct

Messaging Framework Properties

  • message delivery guarantees: at-most-once, at-least-once, exactly-once
  • message durability: persistent or transient
  • message routing: automatic filtering
  • competing or non-competing consumers
  • usage patterns
    • request-reply RPC (pattern: task distribution, topology: service bus)
    • publish-subscribe (pattern: data distribution, topology: data distribution tree)
    • push-pull pipeline (pattern: parallel task distribution and collection, topology: parallelized pipeline)
  • exchanges (per AMQP 0-9-1)
    • types: 
      • default (automatic routing to named queue)
      • direct (route based on message routing key) - usually for unicast in task distribution patterns
      • fanout (broadcast to multiple queues) - usually for broadcast routing in pub/sub patterns
      • topic (route based on match between routing key and queue binding pattern) - usually for multicast in pub/sub patterns
      • headers (route based on any/all match of header values) - "direct on steroids"
    • attributes: name, durability (survive broker restart), auto-delete (deleted when all queues have finished using it)
  • queues
    • attributes: name, durable, exclusive, auto-delete
  • consumers
    • push or pull APIs
    • message acks, rejects, bulk rejects
    • message prefetching
  • messages
    • serialization format: JSON, thrift, protocol buffers, messagepack
    • durability: persistent or ephemeral

Notifications

Uses Cases for notifications

  • Bazaar - time-based activities with intelligent prompting and synchronous chat for learners
  • Discussions
    • forum activity - including notifying moderators and forum participants
    • social awareness
  • Course Dates
  • Course Announcements
  • User Progress in course
  • Analytics Use cases: