Skip to content

Example: ShardingKeyIndex[K] - #1633

Merged
lossyrob merged 7 commits into
locationtech:masterfrom
fosskers:doc/cgw/sharding-index
Sep 23, 2016
Merged

lossyrob merged 7 commits into
locationtech:masterfrom
fosskers:doc/cgw/sharding-index

Conversation

@fosskers

@fosskers fosskers commented Sep 20, 2016 •

Copy link
Copy Markdown
Contributor

TODO

  • ShardingKeyIndex class
  • JsonFormat and registrator
  • Unit tests
  • Markdown docs

Motivation

This PR provides an example of how to implement a new KeyIndex from scratch.

@fosskers fosskers changed the title Example: ShardingKeyIndex[K] [WIP] Example: ShardingKeyIndex[K] Sep 21, 2016
- And made them work. It required some shuffling around of type signatures.
@fosskers

Copy link
Copy Markdown
Contributor Author

@lossyrob unit tests pass, with help from @pomadchin and @moradology . My shard prefix algorithm is probably ripe for critique.


/* Necessary for extending `KeyIndex` */
def keyBounds: KeyBounds[K] =
inner.keyBounds

@fosskers fosskers Sep 21, 2016 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be incorrect, and actually prevents us from writing ShardingKeyIndexMethod.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, since the Keys are actually completely decoupled from the index side of things, and the shard doesn't effect anything but the index, the keybounds remains valid. So we're good.

@fosskers fosskers changed the title [WIP] Example: ShardingKeyIndex[K] Example: ShardingKeyIndex[K] Sep 21, 2016

/* Necessary for extending `KeyIndex` */
def keyBounds: KeyBounds[K] =
inner.keyBounds

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, since the Keys are actually completely decoupled from the index side of things, and the shard doesn't effect anything but the index, the keybounds remains valid. So we're good.

@lossyrob
lossyrob merged commit eada811 into locationtech:master Sep 23, 2016
@lossyrob lossyrob added this to the 1.0 milestone Oct 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants