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

Modify database ORM code to use UUIDs #253

Open
bryankennedy opened this issue Dec 29, 2018 · 2 comments
Open

Modify database ORM code to use UUIDs #253

bryankennedy opened this issue Dec 29, 2018 · 2 comments
Assignees
Labels
Backend & Database Issues about the GraphQL, SQLite, PostgreSQL, or logic systems SMM Tasks for SMM to complete

Comments

@bryankennedy
Copy link
Contributor

When we save run records to the database, we are currently using sequential integer IDs. This is nice because it's simple and easy for humans to read. However, as we're implementing data syncing between multiple databases in multiple locations, we're going to run into collision problems. Run ID #13 at COSI can't sync up with SMM because we might have our own run #13.

UUIDs are a nice solution for this. Although they are somewhat harder for humans to read, each record, no matter where it is generated, always generates a unique ID. This will make it easy to merge the various databases together into a single central record of all the xMacroscope data.

@bryankennedy bryankennedy added Backend & Database Issues about the GraphQL, SQLite, PostgreSQL, or logic systems SMM Tasks for SMM to complete labels Dec 29, 2018
@bryankennedy bryankennedy self-assigned this Dec 29, 2018
@bryankennedy
Copy link
Contributor Author

I've been working on this in a separate branch since I don't know how this change will affect the MAV display's GQL queries. We don't need this functionality right when we install at COSI, since it's technically the only install. We can just replicate the COSI data up to the cloud and not worry about any collisions. But I'd like to get this setup before generating too much data. Once we go live, we'll need to massage the data afterwards to backport this work.

If MAV impacts are minimal, it's possible we can get this working before the COSI install.

@bryankennedy
Copy link
Contributor Author

@brandonwkipp can you merge the UUID work into the develop branch once your related work here is ready?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend & Database Issues about the GraphQL, SQLite, PostgreSQL, or logic systems SMM Tasks for SMM to complete
Projects
None yet
Development

No branches or pull requests

2 participants