Skip to content

Instantly share code, notes, and snippets.

@ssd71
Last active September 1, 2020 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssd71/a68a9e70660feb5b9004329c444771c4 to your computer and use it in GitHub Desktop.
Save ssd71/a68a9e70660feb5b9004329c444771c4 to your computer and use it in GitHub Desktop.

GSoC 2020 JBoss - Shibani Shankar Dash

Work Project

For the duration of Google Summer of Code 2020, I have been working on implmeneting a data synchronization engine via the graphback-datasync package extending the Graphback project on Github, consequently, the code for the work product can be found in the same repository.

Features

  • Delta Queries

A delta query is a special type of query provided DataSync that helps clients fetch changes in data after periods of internet outages, without which the client would otherwise have to fetch everything all over again.

  • Server-side Conflict Resolution

When a client goes offline frequently, inconsistencies may show up in the data whenever the client tries to update data based on outdated records. DataSync provides a way to resolve these conflicts server-side or inform the client about conflicts, whichever required.

The documentation with a more complete description of features of the work product can be found at the DataSync docs

Quick demo

To quickly bootsrap a Graphback-based Data Synchronization (or DataSync API) for checking it out:

  1. Define data model in GraphQL SDL:
"""
@model
@datasync
"""
type Note {
 _id: GraphbackObjectID
 title: String
 content: String
}

scalar GraphbackObjectID
  1. npx graphql-serve serve --datasync schema.graphql -p4000

This command bootstraps a GraphQL API with DataSync features listening on port 4000 locally.

Link to more information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment