libp2p/py-libp2p

Medley of `pubsub` improvements

開放

#283 建立於 2019年9月5日

 (6 則留言) (1 個反應) (0 位負責人)Python (238 個分叉)auto 404
help wanted

倉庫指標

星標
 (618 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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

貢獻者指南