MagicStack / MagicStack/asyncpg
Best way to spread query over multipule asyncio tasks?
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 8.1k
- フォーク
- 468
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I want to the data from a query as data for network actions. I am thinking about the best way to do this.
1> perform a single query and fetch all rows, then divide the result and pa sub part to each task
easy, but not good for large amount of data
2> Use a asyncio Queue. The producer would use a cursor to read that data and each task would be a consumer
difficult, do not know it would work.
3> Use pooled connections. but there would have to be a global "next".for each query
dumb idea
What would be the best and simplest way to query the database and do network actions and then use pooled connections to write a result?
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
この issue には、調査すべきファイル、テスト、エントリーポイントが記載されていません。まず asyncpg の query、cursor、pooling、transaction に関するドキュメントを確認し、次に、pool 接続を使って query の行を処理し、ネットワーク処理を実行し、結果を書き込むためのサポート対象パターンを定義してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- postgresql, python
- 領域
- database
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 20/100