...
Agent MCP Service - This is a set of services that are available to an agent assisting with the grid. The two main services are:
Grid Query - SQL like query of the grid view.
Grid Update - SQL like updates from the agent. These updates are translated into patches (patch builder), that feed back to the hub like all other patches.
JSON Schema validation Worker - This worker listens to grid changes and applies validation state changes in the form of patches (via patch builder).
Exporter - Used to export data from the grid back to the original grid source.
Row Validation
Row validation occurs in the grid when JSON schema is bound to the grid session using one of the following techniques:
Schema Bound to Files of a View- For this case, if a JSON schema is bound to the files in a view, then this schema is detected when creating a grid using a query against such a view.
More options to be added….
Row validation is automatic. Anytime a cell is changed, a change event is sent to the validation worker via the Replica Change SQS queue (see communication diagram). The validation worker will re-validate the entire row and produce a ValidationResult. If the new result is different than the old, then worker will trigger the creation of a patch that will update the validation state of that row.
One cell’s validation result might be dependent on state of another cell within the same row. For example, consider the following JSON Schema where column “b” is required if column “a” has a value greater than 100:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Conditional Requirement Schema",
"type": "object",
"properties": {
"a": {
"type": "integer",
"description": "An integer value."
},
"b": {
"type": "string",
"description": "A string value, required if 'a' > 100."
}
},
"if": {
"properties": {
"a": {
"minimum": 100
}
},
"required": [
"a"
]
},
"then": {
"required": [
"b"
]
}
}
|
Given this example schema, the following table shows the validation results for rows with various values:
a | b | ValidationResults |
---|---|---|
200 | “aString” |
|
99 | “aString” |
|
99 | null |
|
101 | null |
|
89 | true |
|
true | “aString“ |
|
Create a Grid in Synapse
The following steps show how a client will connect to a Synapse grid:
...