Skip to content

Support Parseq plan local cache to reduce fanout calls. #193

@mchen07

Description

@mchen07

Sometimes application make duplicate downstream calls when serving a request. One way is to make the Task sharable and pass it around, but it’s sometimes hard to refactor the code while maintaining code readability. It would be great that parseq can provide some cache capability to avoid duplicate calls.

Some idea may be: ParSeq can provide a plan-local cache <K, Task> where K is user-defined key and Task computes result. It would make sense to implement it on a ParSeq level because:

  1. ParSeq has a well defiled Plan life-cycle with hook when Plan completes (even after response has been sent to the client)
  2. Natural API for asynchronous computation which is a most common use case for a cache (we have seen similar feature requests for Rest.li request results)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions