You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.
At first, looking into libp2p/js-libp2p/src/pubsub.js, I think that we should basically get rid of this and use the pubsub instance directly. The base pubsub class (hopefully interface-pubsub in the future) should handle the specificities that are handled by libp2p. Currently, someone needs to do node1.pubsub._pubsub.*, to access stuff that is not exposed. In addition, the current setup makes us replicate the API in libp2p unnecessarily.
Other than the above, we need to think how we can customize some behaviours, both from startup (configuration?) and in runtime. An example for this is the topicValidators.
Yeah the abstraction isn't of much use and just convolutes things. The only valuable thing it really does is bind the event listeners and that should just be done on the pubsub interface. I'm not really concerned with all the old "is started" error logic, it should just go away imo.
Other than the above, we need to think how we can customize some behaviours
Users can setup the topicValidators after creation of libp2p and before startup so I'm not really concerned about that, and I think this is the case for the majority of pubsub configuration.
Per discussion in libp2p/js-libp2p#720#pullrequestreview-456405724, I am creating this issue to discuss the pubsub abstraction and to find a good way of accessing/modifying pubsub components.
At first, looking into libp2p/js-libp2p/src/pubsub.js, I think that we should basically get rid of this and use the pubsub instance directly. The base pubsub class (hopefully
interface-pubsub
in the future) should handle the specificities that are handled by libp2p. Currently, someone needs to donode1.pubsub._pubsub.*
, to access stuff that is not exposed. In addition, the current setup makes us replicate the API in libp2p unnecessarily.Other than the above, we need to think how we can customize some behaviours, both from startup (configuration?) and in runtime. An example for this is the
topicValidators
.cc @jacobheun @wemeetagain let me know what you think
The text was updated successfully, but these errors were encountered: