hyperswarm / discovery

The Hyperswarm discovery stack
MIT License
121 stars 16 forks source link

How to extend this with more discovery methods dynamically? #16

Open KrishnaPG opened 4 years ago

KrishnaPG commented 4 years ago

Currently this supports DHT and mDNS. But looks like they are tightly integrated into the system, making it difficult to add more discovery methods.

It would be great, if discovery methods could be allowed to be added by the app without having to modify the code of this package. Something like Plug & Play (plug-in), following some kind of interface abstraction.

For example, I would like to add ZRE proximity-based discovery. Allowing it to be added as plug-in would make it possible to reuse a combination of DHT, mDNS with the custom discovery method.