MagicStack / MagicStack/asyncpg

Implementation of shared mode connection pool.

オープン
#636 コメント 10 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
8.1k
フォーク
468
PR マージ指標
30日以内にマージされた PR はありません

説明

  • asyncpg version: 0.21.0
  • PostgreSQL version: 12.4
  • Do you use a PostgreSQL SaaS? If so, which? Can you reproduce
    the issue with a local PostgreSQL install?
    : no
  • Python version: 3.8.3
  • Platform: Linux 4.18.0-193.19.1.el8_2.x86_64
  • Do you use pgbouncer?: no
  • Did you install asyncpg with pip?: yes
  • If you built asyncpg locally, which version of Cython did you use?:
  • Can the issue be reproduced under both asyncio and
    uvloop?
    : yes

Currently, asyncpg implements connection pool by blocking the acquired connection in an asyncio.LifoQueue. In aioredis, the connection pool uses so-called shared mode connection which sends the command directly to the connection's StreamWriter and awaits the result from a background asyncio.Future consuming results from StreamReader indefinitely. Is it possible to implement a similar connection pool to optimize the performance of query?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

この issue では、出発点として asyncpg の接続プールと aioredis の接続プール実装が挙げられていますが、ファイルやテストは示されていません。まず両方のプール設計を読み、その後、クエリのパフォーマンスと同時実行されるコマンドの処理をどのように測定すべきかを確立してください。完了には、shared モードの合意済みの設計、実装範囲、およびパフォーマンスの証拠が必要です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
postgresql, python
領域
databases
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。