atomic-data-docs icon indicating copy to clipboard operation
atomic-data-docs copied to clipboard

Incomplete Resources and Dyanamic Resources

Open joepio opened this issue 4 years ago • 0 comments

While working on the Server, I wanted to improve performance by bundling multiple Resources in one Response. However, this takes a lot of time for Resources that require server side calculations, such as Collections. That's why I introduced the incomplete Property, which tells the Client that it is missing some data, and it needs to re-fetch the resource to get the complete version.

This introduces another problem. How should the Server communicate / know which resources are Incomplete?

We have a few possible aproaches:

Give the Client a list of classes that should be treated as partial

  • The Client (browser app) can have a list of Class URLs that indicate that the resource may be partial.
  • Hard to understand and communicate!

Require all dynamic resources (Endpoints, Drives, Collections) to have an incomplete property by default

  • Including all Collections, Endpoints, Drives...
  • This can easily go wrong, whenever a User forgets a Resource is dynamic it will go wrong.
  • Makes it easier for the server to know if it needs to run dynamic resource stuff

Always add the incomplete property to nested resources

  • Easy to implement
  • Leads to a lot of unnecessary requests for resources that already are loaded

Add to the specification that nested resources do not have to be complete

  • Easy to implement
  • Can lead to a lot of unnecessary requests

joepio avatar Oct 03 '21 17:10 joepio