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

Tracking issue for new Schema API #38

Open
Frando opened this issue Apr 24, 2020 · 1 comment
Open

Tracking issue for new Schema API #38

Frando opened this issue Apr 24, 2020 · 1 comment

Comments

@Frando
Copy link
Member

Frando commented Apr 24, 2020

A tracking issue for the new Schema API.

High-level overview:

  • Add a schema module in sonar-common that is available to both the client and the schema
  • In the server, the core queries the island for all schemas, adds additional schemas defined in source code, and adds them to the schema module
  • In the client, when opening an island, the client asks the server for all schemas and adds to its instance of the schema module
  • The schema module exposes functions to decompose and map a record
    • decompose(record) returns an array of all (field, value) tuples of the record, with the field schema readily available (containing type, indexing properties, metadata)
    • validate(record) validate a record against its schema
    • map(record, targetSchema) try to map a record onto a targetSchema
  • The schema module might also need some ways to work with out CRDT - or at least a way to decompose/reduce a list of records with the same ID onto a target schema
  • We'll also want to revisit our schema definition. Internally, we'll want to define a format we own for the schema definition.
    • import/export from/to JSON schema
    • import/export into a more-simple toml
@Frando
Copy link
Member Author

Frando commented Mar 11, 2021

This is mostly done. Documentation is mostly still missing though.

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

No branches or pull requests

1 participant