Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Complete first draft of executive summary

...

Multiple options are presented to reduce this overall response time:

  • Improve the performance of individual downstream requests
  • Make downstream requests concurrently
  • Combine multiple downstream requests for related records into a single request
  • Combine the business logic and storage modules together
  • Use copies of derived data to make decisions

These options are limited to changes that support the current domain model, processes and user experience. There are other options that may be worth exploring which involve reviewing those decisions.

Many of those options are likely to only produce a modest improvement that is unlikely to be sufficient to meet expectations.

Some of the these options may require changes to constraints e.g. the separation of business logic and storage modules, or the use of derived data that were present when much of the circulation development was done.

Recommendations are provided at the bottom of the document.

...

  • Reduces the amount of individual downstream requests (and hence the Okapi proxying overhead)
  • Requires at least one downstream request per destination module
  • Requires at least one database query per downstream module
  • Might reduce the response time off the downstream request (compared to the combination of )
  • Might reduce the load on downstream modules (depending upon how the combined request is handled, it is possible the load increases)
  • Reduction in downstream requests is limited to number of record types within a single module
  • Increases the amount of APIs to maintain (what I call the surface area of the module)
  • Increases the coupling between modules (by introducing the clients context into the other module)
  • Increases the coupling between the record types involved (e.g. it's harder to move record types to other modules when they are included in APIs together, changes to them ripple across APIs)

Use

...

derived data to make decisions

This option has the most potential design variations. It might involve in-memory caching or persistent storage of the copied data and it may involve using messaging infrastructure or periodic requests.

...

PhraseDefinition
Downstream requestA request made by a module (via Okapi) in order to fulfil the original incoming request e.g. mod-circulation makes a request to mod-users to fetch patron information
Response timeThe time taken from the client making the request to receiving a responsethe request to receiving a response
Derived data"A dataset that is created from some other data through a repeatable process. Usually use to speed up a particular kind of read access to the data. Indexes, caches, and materialized views are examples of derived data" ([1], pg. 554)

Requests made during a typical check out

...

** The Core Platform team have already done work to improve this

References

[1] Martin Kleppman: Designing Data-Intensive Applications. O'Reilly, 2017. ISBN: 978-1-449-37332-0