Table Of Contents
Historical Meta-properties
Outlined in the following ppt: historyScenarios.pptx
High Level Design of microservice flow
Resources API Spec
Resources will be updated to accept a timestamp and will trickle down through gizmo to synapse then to chameleon.
If the timestamp was sent on a non-singular node call then we would return a message stating that this functionality is not supported.
Gallifrey API Spec:
Type | URI | Query Params | Description | Champ Interaction |
GET | relationship/<ID> | t-k=Timestamp that specifies knowledge ie: when we received the assertion in Gallifrey meta=[true/false] if true, payload retrieved will hold the metaproperties at t-k | Retrieve a relationship by ID | Champ needs to handle accepting a relationship id and the timestamp to run a historical query on the graph db |
GET | relationship/<ID>/lifespan | None | Retrieve all the timestamps for create, update, delete operations against this relationship | Champ would be called to retrieve the lifespan on the relationship with meta=true and t-k=lifespan to retrieve all the metaproperties on the relationship |
GET | entity/<ID> | t-k=Timestamp that specifies knowledge ie: when we received the assertion in Gallifrey meta=[true/false] if true, payload retrieved will hold the metaproperties at t-k | Retrieve an entity by ID | Champ needs to handle accepting an entity id and the timestamp to run a historical query on the graph db retrieving the asserted state. Default not sending back metaproperties, if metaproperties are needed a parameter would need to be sent to champ. |
GET | entity/<ID>/lifespan | None | Retrieve all the timestamps for create, update, delete operations against this entity | Champ would be called to retrieve the lifespan on the entity with meta=true and t-k=lifespan to retrieve all the metaproperties on the entity |
PUT | relationship/<ID> | actor=name of the system making the assertion changes-only=[true|false] if true, gallifrey will actually determine what has changed between the PUT payload and the most recent set of assertions for the relationship. If false, the entire PUT body will be considered as a new set of assertions whether something has changed or not. create=[true|false] if true, Gallifrey assumes that this is a create request, if false it assumes it is an update t-k=Timestamp that specifies knowledge ie: when we received the assertion in Gallifrey (why are we generating this here? if there is a maintenance issue our timings would be out of sync with when these took place in the real-time db) | Asserts that a relationship is to be created or updated (depending on the query parameters that are passed in). This API appends new assertions against the specified relationship. | |
PUT | entity/<ID> | actor=name of the system making the assertion changes-only=[true|false] if true, gallifrey will actually determine what has changed between the PUT payload and the most recent set of assertions for the entity. If false, the entire PUT body will be considered as a new set of assertions whether something has changed or not. create=[true|false] if true, Gallifrey assumes that this is a create request, if false it assumes it is an update t-k=Timestamp that specifies knowledge ie: when we received the assertion in Gallifrey | Asserts that an entity is to be created or updated (depending on the query parameters that are passed in). This API appends new assertions against the specified entity. | create = false (changes-only true (execute diff)/false(assume everything changed)) When an assertion is being made without a network timestamp gallifrey will call champ requesting the entity with it's most current metaproperties. Gallifrey would then adjust the metaproperties (of the updated properties) and would send the payload back to champ with a new current state and an updated previous state's metaproperties. Champ would override it's current metaproperty (for the updated/deleted properties) with the old and current metaproperties sent from Gallifrey. For added properties, they would be added directly with the metaproperties sent from Gallifrey. When an assertion is being made with a network timestamp gallifrey will call champ requesting the entity with all of its metaproperties. Gallifrey would then insert the new assertion where appropriate (and adjust neighboring metaproperties) and send the modified payload back to champ for a replace. create = true POST - this would be a new create and Gallifrey would pass the metaproperties on each of it's property values and on the entity itself |
DELETE | relationship/<ID> | actor=name of the system making the assertion t-k=Timestamp that specifies knowledge ie: when we received the assertion in Gallifrey | Asserts that a relationship has been deleted. | |
DELETE | entity/<ID> | actor=name of the system making the assertion t-k=Timestamp that specifies knowledge ie: when we received the assertion in Gallifrey | Asserts that an entity has been deleted. | Gallifrey would request the latest entity from champ and would set all of it's properties dbEndTimes to t-k along with the dbEndTime on the entity itself. |
Chameleon API Spec
Type | URI | Query Params | Description |
GET | relationship/<ID> | t-k=Timestamp that specifies knowledge ie: when we received the assertion in Gallifrey | Retrieve a relationship by ID |
GET | entity/<ID> | t-k=Timestamp that specifies knowledge ie: when we received the assertion in Gallifrey | Retrieve an entity by ID |
Between Chameleon->Gallifrey, the following calls are made:
PUT entity/<ID>?actor=aai&create=true
PUT relationship/<ID>?actor=aai&create=true
PUT entity/<ID>?actor=aai&changes-only=true
PUT relationship/<ID>?actor=aai&changes-only =true
DELETE entity/<ID>?actor=aai
DELETE relationship/<ID>?actor=aai
GET entity/<ID>?t-k=<timestamp>
GET relationship/<ID>? t-k=<timestamp>
Champ API Spec
NEED CHAMP INTERFACE DEFINED
Every entity/relationship/property must have a metaproperty or set of meta properties, this will be enforced in champ.
Historical Tracking Metaproperties
dbStartTime - when an entity/property value/relationship was added to db
dbEndTime - when and entity or relationship was deleted from the db or a property's value was asserted to another state
ntStartTime - asserted by the client as to when the change took place in the network
ntEndTime - set when an assertion provided by the client make's the current state no longer true
startSOT - the source of truth that made the assertion
endSOT- the source of truth that made an assertion to make the current state no longer true
Schema
Separate db edge rules file: with all relationships many to many except parent child which could be one to many
Separate schema file: no properties on vertices are unique except for aai-uuid
GUI Mocks
New integrated functionality (updates for history)
Existing GUI
Topology Current view
Updates include a history button, which pops up a date/time picker to replace the topology view with that historical topology. In the bottom right, it will designate the time period, and if not current the ability to revert back to current.
Compare pops up different date/time picker for a secondary topology. to compare against.
Compare View