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

experiment with data sync #300

Open
michaelmarshall opened this issue Jun 27, 2023 · 0 comments
Open

experiment with data sync #300

michaelmarshall opened this issue Jun 27, 2023 · 0 comments
Assignees

Comments

@michaelmarshall
Copy link
Contributor

michaelmarshall commented Jun 27, 2023

  • I want to experiment with a different way to do the data sync.
  • the tables we sync will be the 6 graph tables and the 4 crowdsourcing tables (nodes, rels, node/rel prop-keys, node/rel prop-values, elections, candidates, votes, users)
  1. put the tables in a dto type:
export type DatabaseDTO = {
  nodes: Array<Nodes>,
  node_property_keys: Array<NodePropertyKey>,
  node_property_values: Array<NodePropertyValue>,
  relationships: Array<Relationship>,
  relationship_property_keys: Array<RelationshipPropertyKey>,
  relationship_property_values: Array<RelationshipPropertyValue>,
  users: Array<User>,
  elections: Array<Election>,
  candidates: Array<Candidate>,
  votes: Array<Vote>,
}
  1. Put the database into the DTO then gzip the json as a file: db.json
  2. The data will be transferred via these files. Which should make offline transfers easier.
  3. When a client initializes it sends the gzip'd json of its database to the server. The server parses it and combines it with the server database.
  4. The server then sends a gzip'd file of the new combined database back, with any duplicate data removed that the client already has.
  5. The client merges the new file with its database.
@michaelmarshall michaelmarshall moved this to Approved in Team Board Jun 27, 2023
@lucky-gru lucky-gru moved this from Approved to In Progress in Team Board Jun 28, 2023
@lucky-gru lucky-gru moved this from In Progress to Done in Team Board Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants