Skip to content

[wip] autogenerate numeric ids#166

Open
rclark wants to merge 1 commit into
masterfrom
numeric
Open

[wip] autogenerate numeric ids#166
rclark wants to merge 1 commit into
masterfrom
numeric

Conversation

@rclark

@rclark rclark commented Jun 9, 2016

Copy link
Copy Markdown
Contributor

I might be overthinking this, but just stashing some ideas wrt #139.

@mcwhittemore

Copy link
Copy Markdown
Contributor

The idea here is that I can ask for my next auto id add set the feature's id to be that?

@rclark

rclark commented Jun 9, 2016

Copy link
Copy Markdown
Contributor Author

Yeah the code is definitely not together yet, but the idea would be that every feature needs to be assigned a number that is unique in the dataset. In order to do that in a distributed system, that script in here is "reserving" a chunk of ids, then it would hand those out to new features. Once it runs out, it reserves another block of 1000 numbers.

@mcwhittemore

Copy link
Copy Markdown
Contributor

gotcha. So 0-999 goes to server a, 1000-1999 goes to server b. Than I either get 0 or 1000 when I request my first id.

What is the value of an auto incrementing id if you can't be sure id:0 is older than id:1000?

@rclark

rclark commented Jun 9, 2016

Copy link
Copy Markdown
Contributor Author

What is the value of an auto incrementing

auto-incrementing is not actually the goal -- the goal is just uniqueness within a single dataset.

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