Skip to content

Support pagination for entity query #57

@inespo

Description

@inespo

Entity service needs to support pagination for querying entities.

The use case for this is: UI implementation that needs pagination on large set of entities.

An option is implements orderBy, offset and limit. However, as @jcchavezs has mentioned offset and limit has accuracy issue if not support by snapshot view. For example,
t = 0, Client fetches entities with offset 0, limit 5
t = 1, entity is added and by the specified order, it's at index 4.
t = 2, Client fetches next batch with offset 5, limit 5. --> Client will miss the newly added entity or potentially processing an entity twice if an entity was deleted.

Several alternatives that were discussed:

  1. Leverages the underlying data storage cursor management and exposes an iterator
  2. Snapshot view / replica view to use pagination with

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions