# Example: synchronous background job dispatch.
canvas:
  background: '#0B1422'
  padding: 28
theme:
  text:
    family: Source Sans Pro
    size: 18
    weight: '600'
    color: '#DCEBF2'
nodes:
  scene:
    shape: composite
    parts:
    - id: client
      label: Client
      shape: rectangle
      icon: iso://glyph/user/DCEBF2
      geom:
        w: 120
        d: 100
        h: 25
      style:
        palette:
          top: '#263D50'
          left: '#142636'
          right: '#1B3042'
        stroke:
          color: '#4D6B80'
          width: 1.3
        text:
          family: Source Sans Pro
          size: 32
          weight: '600'
          color: '#DCEBF2'
          orient: screen
          boxBg: '#263D50'
          boxBorder: '#4D6B80'
        effects:
          cornerRadius: 9
          dropShadow:
            dx: 0
            dy: 5
            blur: 8
            color: '#00000026'
          faceSplit: true
      offset:
        wx: -370.0
        wy: -56.5
        wz: 8
    - id: api
      label: API
      shape: rectangle
      geom:
        w: 170
        d: 130
        h: 38
      style:
        palette:
          top: '#B9F3DF'
          left: '#3F927D'
          right: '#75BFA7'
        stroke:
          color: '#96DCC7'
          width: 1.3
        text:
          family: Source Sans Pro
          size: 40
          weight: '600'
          color: '#103D36'
          orient: iso
          boxBg: '#B9F3DF'
          boxBorder: '#96DCC7'
        effects:
          cornerRadius: 9
          dropShadow:
            dx: 0
            dy: 5
            blur: 8
            color: '#00000026'
          backglow:
            color: '#B9F3DF'
            radius: 55
            opacity: 0.22
          faceSplit: true
      offset:
        wx: -85.0
        wy: -65.0
        wz: 8
    - id: queue
      label: Queue
      shape: rectangle
      icon: iso://glyph/queue/DCEBF2
      geom:
        w: 120
        d: 100
        h: 25
      style:
        palette:
          top: '#263D50'
          left: '#142636'
          right: '#1B3042'
        stroke:
          color: '#4D6B80'
          width: 1.3
        text:
          family: Source Sans Pro
          size: 32
          weight: '600'
          color: '#DCEBF2'
          orient: screen
          boxBg: '#263D50'
          boxBorder: '#4D6B80'
        effects:
          cornerRadius: 9
          dropShadow:
            dx: 0
            dy: 5
            blur: 8
            color: '#00000026'
          faceSplit: true
      offset:
        wx: -180.0
        wy: 250.0
        wz: 8
    - id: worker
      label: Worker
      shape: rectangle
      icon: iso://glyph/cpu/DCEBF2
      geom:
        w: 120
        d: 100
        h: 25
      style:
        palette:
          top: '#263D50'
          left: '#142636'
          right: '#1B3042'
        stroke:
          color: '#4D6B80'
          width: 1.3
        text:
          family: Source Sans Pro
          size: 32
          weight: '600'
          color: '#DCEBF2'
          orient: screen
          boxBg: '#263D50'
          boxBorder: '#4D6B80'
        effects:
          cornerRadius: 9
          dropShadow:
            dx: 0
            dy: 5
            blur: 8
            color: '#00000026'
          faceSplit: true
      offset:
        wx: 287.5
        wy: 250.0
        wz: 8
    - id: db
      label: Postgres
      shape: cylinder
      icon: iso://si/postgresql/102E46
      geom:
        w: 180
        d: 160
        h: 50
      style:
        palette:
          top: '#92C4E8'
          left: '#396585'
          right: '#608CAD'
        stroke:
          color: '#83B6D9'
          width: 1.3
        text:
          family: Source Sans Pro
          size: 32
          weight: '600'
          color: '#102E46'
          orient: screen
          boxBg: '#92C4E8'
          boxBorder: '#83B6D9'
        effects:
          cornerRadius: 9
          dropShadow:
            dx: 0
            dy: 5
            blur: 8
            color: '#00000026'
      offset:
        wx: 270
        wy: -180
        wz: 8
    - id: cache
      label: Redis
      shape: cylinder
      icon: iso://si/redis/102E46
      geom:
        w: 120
        d: 100
        h: 50
      style:
        palette:
          top: '#92C4E8'
          left: '#396585'
          right: '#608CAD'
        stroke:
          color: '#83B6D9'
          width: 1.3
        text:
          family: Source Sans Pro
          size: 32
          weight: '600'
          color: '#102E46'
          orient: screen
          boxBg: '#92C4E8'
          boxBorder: '#83B6D9'
        effects:
          cornerRadius: 9
          dropShadow:
            dx: 0
            dy: 5
            blur: 8
            color: '#00000026'
      offset:
        wx: 100.0
        wy: -350.0
        wz: 8
    connectors:
    - from: client.port-right
      to: api.port-left
      routing: orthogonal
      arrow: triangle
      stroke:
        color: '#7DD6CE'
        width: 3.2
    - from: api.port-right
      to: db.port-left
      routing: orthogonal
      arrow: triangle
      stroke:
        color: '#7DD6CE'
        width: 3.2
      waypoints:
      - wx: 180
        wy: -19
      - wx: 180
        wy: -125
    - from: api.port-back
      to: cache.port-left
      routing: orthogonal
      arrow: triangle
      stroke:
        color: '#7DD6CE'
        width: 3.2
      elbow: yFirst
    - from: api.port-front
      to: queue.port-back
      routing: orthogonal
      arrow: triangle
      stroke:
        color: '#7DD6CE'
        width: 3.2
      waypoints:
      - wx: -19
        wy: 145
      - wx: -132.5
        wy: 145
    - from: queue.port-right
      to: worker.port-left
      routing: orthogonal
      arrow: triangle
      stroke:
        color: '#7DD6CE'
        width: 3.2
    - from: worker.port-back
      to: db.port-front
      routing: orthogonal
      arrow: triangle
      stroke:
        color: '#7DD6CE'
        width: 3.2
