Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Worker app to render data #50

Closed
2 tasks
aldy505 opened this issue Dec 19, 2021 · 8 comments · Fixed by #52
Closed
2 tasks

Worker app to render data #50

aldy505 opened this issue Dec 19, 2021 · 8 comments · Fixed by #52
Labels
scope: backend Regarding the backend side

Comments

@aldy505
Copy link
Member

aldy505 commented Dec 19, 2021

Create a Go app (why Go? because reasons) as a worker for the core backend app, with an HTTP REST system that:

  • Generate CSV file, that's stored into the MinIO S3 from the InfluxDB data stream per user
  • Generate JSON file, that's stored into the MinIO S3 from the InfluxDB data stream per user

This worker applies a long-polling system, which immediately returns a 200 OK status into the request, just to say if we got the request and will do it in the background.

cc @artileda

@aldy505 aldy505 added the scope: backend Regarding the backend side label Dec 19, 2021
@ghost
Copy link

ghost commented Dec 19, 2021

ok besok

@ghost
Copy link

ghost commented Dec 19, 2021

https://stackoverflow.com/a/50850191

kalo pakai ini tinggal di cron nin aja IMO

@aldy505
Copy link
Member Author

aldy505 commented Dec 19, 2021

https://stackoverflow.com/a/50850191

kalo pakai ini tinggal di cron nin aja IMO

@artileda hoo tidak semudah itu ferguso. kan harus ngitung:

  • typing speed rate
  • keystroke deletion rate
  • unrelated keys rate
  • number of words
  • attempts per question
  • dll

refer ke ppt disini https://t.me/c/1691679327/21697

@elianiva
Copy link
Member

refer ke ppt disini t.me/c/1691679327/21697

or #10, the first section

@ghost
Copy link

ghost commented Dec 19, 2021

ga paham

@aldy505
Copy link
Member Author

aldy505 commented Dec 19, 2021

ga paham dimana?

@ghost
Copy link

ghost commented Dec 19, 2021

belum tau

@ghost ghost mentioned this issue Dec 20, 2021
@aldy505 aldy505 mentioned this issue Dec 21, 2021
33 tasks
@aldy505
Copy link
Member Author

aldy505 commented Dec 23, 2021

Summary:

  1. Bikin 2 endpoint:
    • POST /fun-fact - Untuk ngefetch data dari InfluxDB dan generate fun fact dari hasil coding test si user. Fun fact ini termasuk:
      • Ngitung WPM (group data jadi per menit, untuk setiap menit dihitung jumlah karakter nya dan dibagi 5)
      • Deletion rate (total user pencet tombol backspace + delete / total tombol yang dipencet * 100%)
      • Attempts per question
    • POST /generate-file - Untuk ngefetch data dari InfluxDB dan generate file dengan format CSV dan JSON. File ini nanti di save di MinIO. Data yang di generate ini nggak cuma dump dari InfluxDB doang. Tapi data yang sebelomnya di generate lewat /fun-fact juga harus ikut,
  2. Hati-hati sama race condition, sebisa mungkin. Hati-hati juga kalo berhadapan dengan large data set, antara memory nya nggak kuat (kepenuhan) atau ya datanya gagal ke scan.

@aldy505 aldy505 assigned ghost Dec 30, 2021
@ghost ghost closed this as completed in #52 Jan 6, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: backend Regarding the backend side
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants