Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

分布式 DHT 爬虫共享 Peers 和 BlockList #28

Open
xgfone opened this issue Aug 5, 2017 · 1 comment
Open

分布式 DHT 爬虫共享 Peers 和 BlockList #28

xgfone opened this issue Aug 5, 2017 · 1 comment

Comments

@xgfone
Copy link

xgfone commented Aug 5, 2017

我想要实现一个分布式 DHT 爬虫,须要共享 Peers 和 BlockList,这样一来,当某个爬虫发现一个 Peer,或把某个 Node 放入 BlockList 时,其他爬虫也会立即知道。

如果 peersManagerblackList 两个 struct 能够自定义后端存储的话,上述需求就很容易实现。

如果能把 syncedMap 抽象成接口就好了!这样,用户就可以替换默认的 syncedMap 来实现共享式的 Peers 和 BlockList。

@shiyanhui 不知道有这方面的计划没?

@xgfone
Copy link
Author

xgfone commented Aug 5, 2017

如果要把 syncedMap 实现成分布式的,就要考虑到 Map 键 和 值 的 序列化反序列化 问题。

如果键是 string,那么就不用考虑键的 序列化反序列化 了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant