Java-based distributed crawler

Source: Internet
Author: User

Classification

The distributed crawler consists of multiple crawlers, each of which has to perform tasks similar to a single crawler that downloads pages from the Internet and stores the pages locally on the disk, extracting URLs from them and continuing crawling along the points of those URLs. Because the parallel crawler needs to split the download task, it is possible for the crawler to send its own URL to other crawlers. These reptiles may be distributed in the same LAN, or dispersed in different geographic locations.

Depending on the degree of dispersion of the crawler, the distributed crawler can be divided into the following two major categories:

1, based on the LAN distributed network crawler: This kind of distributed crawler crawler in the same LAN running, through the high-speed network connection to communicate with each other. These crawlers use the same network to access the external Internet, download Web pages, and all the network load is concentrated on the local area network where they reside. Because of the high bandwidth of the local area network, the efficiency of the communication between the crawlers can be ensured, but the total bandwidth limit of the network exits is fixed, and the number of crawlers is limited by the bandwidth of the LAN export.

2, based on the WAN distributed network Crawler: When the crawler of parallel crawlers run in different geographic locations (or network locations), we call this parallel crawler as a distributed crawler. For example, the crawler of a distributed crawler may be located in China, Japan, and the United States, respectively, responsible for downloading the pages of the three sites, or in chinanet,cernet,ceinet, respectively, responsible for downloading the pages in these three networks. The advantage of distributed crawler is that it can disperse network traffic to a certain extent and reduce the load of network egress. If reptiles are distributed in different geographic locations (or network locations), how long it takes to communicate with each other becomes an issue worth considering. The communication bandwidth between the crawlers may be limited and usually requires communication over the Internet.

large-scale distributed Network Crawler architecture diagram

650) this.width=650; "title=" image "style=" margin:0px; "alt=" image "src=" http://s3.51cto.com/wyfs02/M02/6B/AB/ Wkiol1u0ajgt3hsoaah1t00vwdk125.jpg "height=" 461 "/>

Distributed web Crawler is a very complex system. There are many factors to consider. Performance can be said to be its important indicator. Of course, hardware-level resources are also necessary.

Architecture

The following is the overall architecture of the project, and the first version is based on this scenario.

The above web layer includes: The console, basic permissions, monitoring display, etc., can also be expanded as needed.

The core layer is centrally dispatched by the controller, which sends the task to workers in the queue for crawling operations. Each node dynamic to the Monitoring module to send module status information, unified by the display layer display.

650) this.width=650; "Title=" 0.1 version of the architecture diagram "style=" margin:0px; "alt=" 0.1 version of the schema "src=" Http://s3.51cto.com/wyfs02/M00/6B/AB /wkiol1u0ajhrljvlaahdtvt5--0309.jpg "height=" 560 "/>

Project objectives

Public push, open source version of today's headlines!

A distributed web crawler based on Hadoop thinking.

Fourinone, Jeesite, webmagic have been integrated, and further improvements are being made. To finally make a dynamic and configurable distributed crawler system based on the designer, this is the first phase of the goal.

Current status of the project

Current progress of the project:

1, Sourceer, can access a variety of data sources, interface has been defined (add Builder package, you can use simple crawler).

2, Web Architecture Engineering (Web project upload and test success, permissions, infrastructure transformation, import, etc. have been recorded video, delete activiti, delete the CMS section).

3, Distributed framework Research (distributed project subcontracting, add some comments, test single-worker crawl).

4, plug-in integration.

5, the article and other methods of de-weight and algorithm (currently implemented Bloomfilter, fingerprint algorithm de-heavy, has been implemented Simhash, segmentation algorithm (ANSJ)).

6, classifier Test (Bayes, text classification single-machine test success).

Project Address:

(Distributed crawler) Http://git.oschina.net/zongtui/zongtui-webcrawler

(Remove heavy filter) Https://git.oschina.net/zongtui/zongtui-filter

(text classifier) Https://git.oschina.net/zongtui/zongtui-classifier

(Document directory) Https://git.oschina.net/zongtui/zongtui-doc

Project interface:

Start the jetty, the skin is still not changed temporarily.

650) this.width=650; "title=" image "style=" margin:0px; "alt=" image "src=" http://s3.51cto.com/wyfs02/M01/6B/AB/ Wkiol1u0ajlaahe3aainwemtgp0708.jpg "height=" 349 "/>

Summarize

At present the project is being further perfected, hope to get more advice from you!

This article is from the "Skyme" blog, make sure to keep this source http://skyme.blog.51cto.com/447319/1635942

Java-based distributed crawler

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.