kscout / serverless-registry-api

API which curates serverless applications.
https://api.kscout.io
GNU General Public License v2.0
0 stars 1 forks source link

Add deployment metrics #164

Open janiew opened 5 years ago

janiew commented 5 years ago

Track how many people have deployed each app through KScout

Noah-Huppert commented 5 years ago

Overview

This will take a bit of planning.

Up until this point we have not been storing any data exclusively in the database. The database has not been the source of truth. Instead the database has been acting as a cache. The source of truth has been the serverless-apps GitHub repo.

We cannot and should not store things like download counts in the serverless-apps repo.

Where should we store the download count?

Things we have to plan for

We have to operate either a Prometheus or Mongo DB instance reliably. This means implementing backups. If we choose Mongo DB this also means running Mongo DB in cluster high availability mode.

Todo

PratikMahajan commented 5 years ago

The only thing I am worrying about here is the race condition while incrementing the downloads counter

Noah-Huppert commented 5 years ago

The only thing I am worrying about here is the race condition while incrementing the downloads counter

Prometheus automatically handles this race condition.
Mongo can lock documents, this would handle the race condition.

Which datastore should we use though?