Skip to content

Promote Queue to a first-class model (backed by ImmutableEdge) #471

Description

@em3s

Context

A queue isn't its own model. It's an ImmutableEdge table with a queue/v1 marker + numPartitions in the table comment, decoded at runtime (QueueMetadataService, QueueService.getNumPartitions). The hierarchy — Edge / ImmutableEdge / MultiEdge / Vertex — has no Queue.

So queue capability is invisible on the descriptor. On the unified collection surface (#470), clients can't tell which sub-resources a collection exposes.

Decision

Make Queue a first-class model (a collection kind). Add it to the type hierarchy; the descriptor declares kind=Queue. The queue shape (partition/seq/value, numPartitions) becomes the model definition.

  • Implementation and storage reuse ImmutableEdge as-is — enqueue/poll already run over it, so no engine change. The comment marker stays as storage encoding; only the model layer becomes explicit.
  • Data face is messages only; /edges stays hidden as an implementation detail.

Consequences

  • kind=Queue on the descriptor tells clients /messages, partitions, and poll exist — closes the Settle v3 vocabulary on database/collection (table reserved for HBase) #470 discoverability gap.
  • Queue gets its own schema, validation, and lifecycle, separate from ImmutableEdge.
  • Engine and storage untouched; only the type system, descriptor, and server surface change.
  • Open: Queue↔ImmutableEdge code relationship (delegation vs subtype), whether to fully hide /edges.

Metadata

Metadata

Assignees

No one assigned

    Labels

    decisionRecords an architecture or product decisionenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions