/
Consistent List Entity Children

Consistent List Entity Children

Introduction

Currently, the GET /query service provides consistent query results as long as the caller does not filter by annotations.  In order to address scalability issues with the query services, we plan to change the query to run against replicated data in the index database.  This will change the query service from providing consistent query results to eventually-consistent results.


For most use cases, eventual-consistency of the query services is acceptable.  For example, the UI uses the query services to list the children of a container.  For the use case where a user is browsing children of a container using the UI, it is okay if newly created children do not appear immediately.  The user will not know that children are missing.  However for the user case where the users creates a new child, if the new child does not appear in the list, there will be a perception of data loss.


In order to prevent the perception of data loss, we need to provide a consistent service for listing the children of a container before we change the query service to be eventually consistent.

New API

Object Models

EntityChildrenRequest
String parentId
List<EntityType> includeTypes
Enum{NAME,CREATED_ON} sortBy
Enum{ASC,DESC} sortDirection
EntityChildrenReponse
List<EntityHeader> page
String nextPageToken


REST call

Response BodyURIRequest Body
EntityChildrenReponse/entity/{entity_id}/childrenEntityChildrenRequest

Related content

Validation JSON Schema Index
Validation JSON Schema Index
More like this
Hierarchical Changes in Synapse (PLFM-4174)
Hierarchical Changes in Synapse (PLFM-4174)
More like this
Code Conventions
Code Conventions
More like this
Code Conventions
Code Conventions
More like this
Option B
More like this
Next Step Against JSON Schema API
Next Step Against JSON Schema API
More like this