micro-analytics / micro-analytics/micro-analytics-cli
atomicity and db operation concerns
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 732
- フォーク
- 39
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
So as a few people have brought up, we are mimicking locking in our pushView util function which seems to be doing the db adapter's job. For example, if a db solution supports a "add or increment" function or handles atomicity cross process, then we are introducing a performance bottleneck by having all adapters use our locks logic and 2-3 transaction inserts. For the record, I think it was a really good starting point but we should take it to the next level.
So, I think that the next phase of our adaptors, while there are only two, need to support the API that we provided but the put needs to be changed. If they need to manually call their this.has() and this.get() to reconcile what they need to do, then go for it, but we shouldn't force that. So we should change put (or possibly rename it) but we should give them the key and they need to resolve a promise with the count value.
What do you think?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず pushView ユーティリティと 2 つのデータベースアダプターを読み、次に、それぞれの現在の put 操作が has/get チェック、ロック、トランザクションへの挿入をどのように行っているかを追跡します。キーをどのように受け取り count をどのように解決するかを含め、アダプター側の put コントラクトを決定し、必要な場合は既存の API を維持します。両方のアダプターが、強制的な共有ロックなしで、合意したアトミック操作の動作をサポートすれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, node.js
- 領域
- backend, databases
- issue の種類
- リファクタリング
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100