-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
4Refinementthis ticket is ready for refinement with the teamthis ticket is ready for refinement with the teamTaskTechnical task that cannot be written as a user storyTechnical task that cannot be written as a user story
Description
Describe the task
Spinning up R is very slow, and blocking, it blocks other calls to the same thread in causing timeouts in calls entirely unrelated to anything that uses R
Acceptance Criteria
- CFFDRS R functions exposed as REST endpoints on CFFDRS API
- Feature toggle to switch between CFFDRS using rpy2 and using CFFDRS using API (allows merging code in current state before completing remaining tasks for full switchover)
- Switch from using CFFDRS via rpy2 in PSU API to using CFFDRS via REST interface
- Establish if CFFDRS API is performant enough
- Establish if making adjustments in how we use CFFDRS could make it performant enough (e.g. instead of making hundreds of individual calls, making a single call)
- CFFDRS API can be spun up in docker container on developer computers for local development
- Automated tests for CFFDRS API that can be run locally
- Script(s) for building CFFDRS API image in tools
- Script(s) for deploying CFFDRS API to dev
- Script(s) for deploying CFFDRS API to prod
- Build and deployment process well documented
- CFFDRS API exists as service in dev (e.g. cffdrs on port 80)
- CFFDRS API exists on it's own prod (e.g. cffdrs on port 80)
- CFFDRS API visible only within openshift project
- Feature toggle removed
- rpy2 removed from api/pyproject.toml
- R removed from .github/workflows/integration.yml
Additional context
- See https://github.com/bcgov/wps/blob/task/architecture/README.md#architecture for proposed changes to architecture.
- It is assumed that the implementation will leverage rpy2
- The CFFDRS API won't be frequently deployed, so we don't have to create a pipeline for it. We can rely on manually running automated tests, and manual deployment to dev and prod environments.
- With CFFDRS spun out into it's own micro-service, we can at a later point switch out the underlying calculations to something else (python native, c native, java etc. etc.), without (theoretically) having to touch the PSU api.
- We should probably not be using private functions from CFFDRS R package. (e.g. anything in r that is defined with a period, is actually internal. e.g. .Slopecalc); We should probably be calling
fbp <- function(input = NULL, output = "Primary", m = NULL, cores = 1)and disregarding internal functions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
4Refinementthis ticket is ready for refinement with the teamthis ticket is ready for refinement with the teamTaskTechnical task that cannot be written as a user storyTechnical task that cannot be written as a user story