Replies: 1 comment 1 reply
-
Since FastAPI is the proposed library for running backend services, it may be worth investigating background tasks https://fastapi.tiangolo.com/tutorial/background-tasks/ as a candidate for long-running tasks not requiring the use of workers & AMQP. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Context and scope
We would like to help non-technical users run the TttC pipeline and generate reports for their own data.
This RFC is to discuss what the MVP might be in terms of infrastructure and choice of technologies.
Note that we want all the new complexity to remain optional , meaning that developers should still be able to just pull this repo and generate reports locally using the current pipeline (without having to work inside docker or kick of a server or anything like that).
Potential MVP
We could build a simple website where users can upload a CSV file, chose a name and url (slug) for their report, potentially change a few options (e.g. number of clusters and language to translate to) and then click a button "generate report".
The users could then refresh the page from time to time to check the status of the job (as currently tracked in status.json) and when the report generation is completed, they could find it at the appropriate url.
Simplifying assumptions
For the very first iteration, we might want to make the following assumptions:
Minimal server API specs
We could start implementing a server with the following endpoints:
POST :api/input/{file-name}
to upload a new csv files and save data under/pipeline/inputs
POST :api/config/{project}
to define a project's config file and save it under/pipeline/configs
POST :api/run/{project}
to kick off a job (spawn a child processpython main.py ./configs/{project}.json -skip-interaction
)GET :api/{project}/status
to check the status of a job (read content ofstatus.json
)GET :api/{project}/report
to serve the html report when readyWhen posting a new project config, the server could return a preview of which steps will need to (re)run, similar to what the CLI shows when running in interactive mode.
Choice of technologies
We could consider:
Beta Was this translation helpful? Give feedback.
All reactions