Skip to content

Refactor CDE harvester. #408

Description

@JessyBarrette

Lots of people like https://explore.cioos.ca, but we're having issues with the harvester.

Issue

explore.cioos.ca harvester is having a few issues and fails on occasion to query some erddap servers and/or datasets.

Some of those issues are related to timeout errors associated to some of the queries which sometimes need a lot of ressources on the remote ERDDAP server. As an example, we've asking the different CIOOS groups to use a 20min timeout at least to be able to handle big queries from CDE.

We also have right no way to test future implementation, track cron job and issues. Also a lot of time, the harvester is simply waiting for a reply from an ERDDAP server.

Suggestion

Based on those different issues, I'm thinking it would be time for an overhaul of the explore cioos harvester. For this, I'm thinking doing the following:

  • Rely on erddap-python for generating all the erddap queries
  • Use celery for handling multithreading the different queries to the multiple datasets simultaneously
  • Split multithreads by datasets/erddap servers, to avoid slowing down other server harvesters. The harvester is already splitting by erddap server, which I think make sense.
  • Track cronjobs and errors with sentry_sdk
  • Document better the CLI interface with click
  • Add some tests with pytest
  • Manage dependencies with poetry
  • Containerize the deployment with Docker
  • On slow queries, split dataset queries by time ranges (yearly,decades) to reduce size of queries and avoid timeout times of >20min.
  • Add a diagram to explain CDE workflow and harvester

Since the queries generated by the harvester can be pretty ressources intensive on the erddap server side. This would be a good opportunity to use this to help assessing the caprover deployments with the caprover deployment method (seeissue)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

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