Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking: Pool API #57

Open
jazeved0 opened this issue May 13, 2020 · 0 comments
Open

Tracking: Pool API #57

jazeved0 opened this issue May 13, 2020 · 0 comments
Assignees
Labels
in-progress Not yet ready to be merged milestone tracking Tracking issue for major implementation component

Comments

@jazeved0
Copy link
Member

Rationale

As discussed in https://docs.archit.us/internal/socketio/pools/, the rationale for pools is to provide entity caching on the frontend in a reusable way.

Primary gateway routes

  • Single entity request
  • Multiple entity request
  • Entire pool request
  • Fuzzy member search (only for guild members)

Request-Reply implementation details

  • Client-originating requests use an odd number (with no serialization guarantees) that are roughly increasing
  • Server-originating requests use an even number

Partial replies

For fuzzy member searching (and other pool requests as well), we can perform a partial reply, where two or more response packets are sent in the context of a single request packet (all sharing the same request Id), where partial results can be returned (i.e. returning results from a cache before returning the full results)

Saga-based implementation details

Works based on applying pressure. Pressure can be applied to either an entire pool, a subset of entity Ids, or a fuzzy search query. Pressure applications are designed to group requests when bursts of entities are put pressure on (i.e. user displays in a large table), where pressures are debounced via saga for a configurable interval (though not large, as the socket.io transport model eliminates the need for extensive HTTP/SSL handshakes that would otherwise occur with frequent HTTP requests).

Each pressure application will be a redux action dispatched from the individual containers that consume the entities (if the entire pool is not present).

@jazeved0 jazeved0 added in-progress Not yet ready to be merged milestone tracking Tracking issue for major implementation component labels May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-progress Not yet ready to be merged milestone tracking Tracking issue for major implementation component
Projects
None yet
Development

No branches or pull requests

2 participants