Skip navigation

Master - Worker

Master - Worker is a design pattern that Terracotta users leverage to divide and route large workloads around a grid of JVMs.

To Deliver Master - Worker Terracotta uses both POJOs and frameworks hosted on our own project Forge.


(click to enlarge)


Simple

Queue-based - POJO LinkedBlockingQueue option

  • Stateful workflows with no outside persitence
  • LinkedBlockingQueue.peek(), .take(), .put() to work with the queues

Higher order abstractions when needed

  • Event-based callback and listeners
  • One-way, two-way communication channels
  • Automatic job failure and requeing

Fast

  • Locality of Reference
  • Striped locks
  • Striped queues

Control the granularity

  • Messaging patterns move whole objects
  • Coordination patterns shared objects and only signal object workflow

Reliable

Read & write from System of Record Data

  • Read data from databases or message queues
  • Stripe or distribute blocking database updates for scale

    (click to enlarge)

Garuanteed delivery

  • No work messages get lost
  • Guaranteed in-order delivery
  • Once-and-only once
Adaptavist Theme Builder Powered by Atlassian Confluence