USACE / USACE/cwms-data-api

Server-side caching for authoritative timeseries

Open
#1,281 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

catalog clobs documentation enhancement priority:low ratings timeseries web-ui
Dominant language
Java
Stars
28
Forks
25
Avg merge
4d 22h
Merged PRs (30d)
20

Description

Is your feature request related to a problem? Please describe.
Pulling period of record data via CDA is very slow any may not even be possible for the public to do without multiple requests. (e.g. this request will only work intermittently for me:

curl -X 'GET' \
  'TEST/cwms-data/timeseries?name=Baldhill_Dam.Flow-Out.Inst.~15Minutes.0.best&office=MVP&begin=1948-08-29T15%3A06%3A08.543Z&end=2025-08-29T15%3A06%3A08.543Z' \
  -H 'accept: application/json;version=2

see https://github.com/USACE/cwms-data-api/issues/1229 for possible reasons why it is intermittent)

Describe the solution you'd like
However, it appears A2W is using some sort of caching to return a similar data call very quickly (about 8 seconds when I tried it).
https://water.usace.army.mil/cda/reporting/providers/mvp/timeseries?name=Baldhill_Dam.Flow-Out.Inst.~15Minutes.0.best&begin=1945-08-22T15:20:10.708Z&end=2025-08-29T15:20:10.708Z

Additional context
I suspect most of the CDA calls will be for the elevation pool, tail, inflow, outflow for projects. If they can be cached somehow it might really increase performance for a lot of uses and it could piggy back on whatever is decided for https://github.com/USACE/cwms-data-api/discussions/956.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing issue #1229 and discussion #956, then compare the CDA and A2W timeseries requests described here. A complete proposal would need to define which authoritative timeseries are cached, how caching interacts with the existing API, and how the performance improvement would be measured.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.