Skip to content

Navigation Menu

Sign in
Sign up

Collection Routing #21

Open
Open

Description

Concepts:

  • A collection is a namespace for a KV, Log or Object store
  • A collection ID is a sequence of bytes that represent a prefix for all keys in a collection
  • A range is a lexicographic partition that holds some range of keys, possibly spanning multiple collections
  • A key is an identifier for an element of a collection
  • An absolute key is the collection ID + key bytes. If the collection user_posts mapped to \x58\x29 and a request would like to access the key dog plays with cat then the absolute key would be \x58\x29dog\x20plays\x20with\x20cat.

Requests contain:

  1. collection+key in the form of user_accounts/alice
  2. operation {read, write, CAS, watch, subscribe}

When a server receives a request, it should do one of four things:

  • handle it, because the leader of the range containing the absolute key is on the local server
  • return a redirect to a known leader of the containing range
  • query the meta range for current leader information for the collection if we have not already done so for this collection in a specified rate-limiting period
  • return an error communicating that the collection was queried within the rate-limiting period unsuccessfully

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    AltStyle によって変換されたページ (->オリジナル) /