Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/globalwebindex/challenge-scala
https://github.com/globalwebindex/challenge-scala
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/globalwebindex/challenge-scala
- Owner: GlobalWebIndex
- Created: 2021-03-30T14:25:12.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-30T22:28:43.000Z (over 1 year ago)
- Last Synced: 2024-04-14T11:54:15.229Z (9 months ago)
- Size: 3.91 KB
- Stars: 0
- Watchers: 11
- Forks: 16
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Scala challenge
Hello future colleague! In this assessment, we request that you implement an HTTP application that converts CSV data sets to JSON data sets. The application will provide the following endpoints:
## Create Task
#### POST /task/
Create a task with URI pointing to CSV dataset which will be converted to Json and reuturns taskId.
- 2 tasks can be run at the same time
- the task is executed immediately if `running-tasks < 2`## List Tasks
#### GET /task/## Task Detail
#### GET /task/[taskId]
Return informations about the task:
- lines processed
- avg lines processed (count/sec)
- state (`SCHEDULED/RUNNING/DONE/FAILED/CANCELED`)
- result (uri where the JSON file can be downloaded)Keep the connection open until the task isn't in a terminal state and send the updated response every 2 seconds.
## Cancel Task
#### DELETE /task/[taskId]
Tasks in `SCHEDULED` or `RUNNING` state can be canceled.## Get JSON File
Endpoint providing generated JSON files.## Notes
- Keep the state only in memory except generated json files.
- Take into account that input files don't have to fit into memory.CSV datasets for testing purposes can be found at the following links:
* https://catalog.data.gov/dataset?res_format=CSV
* https://www.kaggle.com/datasetsFeel free to ask any questions through email or github.
Good Luck!