Open karlcz opened 7 years ago
@hongsudt @robes
Just a note for any future return to this topic: any attempt to discover the correct sparse subset of the model for a given chaise application instance would also require interpretation of the new pseudo column annotations which may pull in more tables that are further from the main table being displayed.
The current idiom is that apps like Chaise end up retrieving the entire catalog model via
GET /ermrest/catalog/N/schema
so they can use model-aware techniques which require knowledge of relationships between tables.However, as catalog models get more complex, this request becomes slower and the response larger. This is due to several factors:
dict
,list
, and scalar types followed by JSON serialization of those generic types. This involves allocation and recursion over many objects all the way down to the column-level granularity of the model (and the per-column annotations and ACLs).The most obvious approaches to improving costs are:
A hybrid approach for the last item above would be to just augment the current API with a list of inbound references for each table. Then, a client could walk the graph via a chain of much cheaper calls which may not be too costly with HTTP/2. This is possible because the current API already supports retrieving individual table documents instead of all schemas at once.