Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
keenwon committed Mar 26, 2015
1 parent 663850d commit a4740a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# AntColony #

详细文档请查看 [http://keenwon.com/1436.html](http://keenwon.com/1436.html "http://keenwon.com/1436.html")

AntColony(Github)是findit磁力搜索引擎的核心。用来在DHT网络中,收集活跃资源的infohash,下载并解析资源的种子文件,存入数据库等。AntColony是若干功能的合集,也可以单独运行其中的部分功能,所以起“蚁群”这个名字也是很贴切的(没错,我就是爱动物世界)。主要分一下几块:
- worker:爬虫,收集资源infohash,可以同时启动多个进程的worker,提高效率
- male:根据收集来的infohash去下载种子文件
Expand All @@ -19,4 +17,6 @@ AntColony(Github)是findit磁力搜索引擎的核心。用来在DHT网络

比较大的一个K桶(bucket);infohash就是已经收集到的infohashs(worker收集来的,male会用来下载种子);remoteNodes是worker新认识的节点,会依次“拜访”的,目前只保存最新的10w个(一方面我的VPS内存小,另一方面真没必要记录太多);sysInfo会记录一些统计信息,例如发出多少次请求,累积收集多少infohashs,目前已经发出15亿次Request,这个频率是可控的,worker太疯狂的话,VPS扛不住。

下面简单说下运行方法,安装好node,pm2,redis,mongodb之后,执行`npm install` 下载依赖的包,在根目录运行`node startup worker 3000`启动一个worker监听3000端口;运行`node startup male 1`启动id为1的male(female同理)。
下面简单说下运行方法,安装好node,pm2,redis,mongodb之后,执行`npm install` 下载依赖的包,在根目录运行`node startup worker 3000`启动一个worker监听3000端口;运行`node startup male 1`启动id为1的male(female同理)。

更多内容查看 [http://keenwon.com/1436.html](http://keenwon.com/1436.html "http://keenwon.com/1436.html")

0 comments on commit a4740a2

Please sign in to comment.