Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change device_id to VIN #32

Merged
merged 5 commits into from
Aug 22, 2018
Merged

Change device_id to VIN #32

merged 5 commits into from
Aug 22, 2018

Conversation

toddapetersen
Copy link
Contributor

Suggesting a change to the identifier for a vehicle away from a UUID and using the operators VIN identifier instead. The thought here is that each bike manufacturer already has a unique identifier for their vehicle embedded in their code (QR code or otherwise). It is inherent to the business. Let's use that number so they could be correlated to real bikes on the street if it ever became necessary.

Suggesting a change to the identifier for a vehicle away from a UUID and using the operators identifier instead.   The thought here is that each bike manufacturer already has a unique identifier for their vehicle embedded in their code (QR code or otherwise).  It's part of the inherent of the business.   Let's use that number so they could be correlated to real bikes on the street if it ever became necessary.
@hunterowens
Copy link
Collaborator

This is good, but creates some weird issues with indexing in a merged database and could degrade analytics/query performance.

For example, if say, both company A and company B used sequential integer IDs, ie, {1,2}, we could have a trips database where we have to have a joint index, and that is slower than a uuid index.

Additionally, if company A used a UUID and company B uses int/longs, that becomes a pain to index and load into a DB.

Tagging @dmklinger and @hannah-ross for more thoughts.

@jannasmith
Copy link
Contributor

could we stipulate that provide us with a UUID that is based on the VIN - for example, a 4-digit operator number we assign preceding the VIN to create the entire identifier. then we could use that to identify devices on the street as well, and it wouldn't create conflicts on our side. Would that be a reasonable ask of the operators? Also would we need to require that all UUIDs/VINs be the same number of characters or anything like that?

@toddapetersen
Copy link
Contributor Author

What about taking the the provider_id and the vehicle_id and concatenate them to make a unique key for the table and query.

@hunterowens
Copy link
Collaborator

Resolved:

Keep both device_id is a UUID and VIN which is the physical number on a device.

In the agency API, the device_id will be provided by operator inside the body of the post request.

@hunterowens
Copy link
Collaborator

@toddapetersen does this look good?

@hunterowens hunterowens mentioned this pull request Aug 21, 2018
Merged
@toddapetersen toddapetersen merged commit 8b0159d into master Aug 22, 2018
@hunterowens hunterowens deleted the toddapetersen-patch-1 branch August 24, 2018 15:01
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.

3 participants