libp2p/py-libp2p

Medley of `pubsub` improvements

オープン

#283 opened on 2019/09/05

 (6 件のコメント) (1 件のリアクション) (0 人の担当者)Python (238 件のフォーク)auto 404
help wanted

Repository metrics

Stars
 (618 個のスター)
PR merge metrics
 (PR metrics pending)

説明

Leaving this here while I'm reviewing the current pubsub packages...

  1. Don't serialize message sends, eg: https://github.com/libp2p/py-libp2p/blob/master/libp2p/pubsub/gossipsub.py#L172-L177 Happens here and in floodsub as well -- this is a great place to use asyncio.gather

  2. "separate policy from mechanism" -- in the same place, we defer to the particular router to decide who to send new msgs to... and then do the sending in the router itself. as far as i can tell, we can pull out the sending part into the Pubsub class, relying on the router for what should be its only job -- determining peers for some action

コントリビューターガイド