GithubHelp home page GithubHelp logo

tarsbase / fetchio Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gip/fetchio

0.0 1.0 0.0 117 KB

fetchIO is a simple, configurable, fault-tolerant web crawler written in Haskell

Haskell 99.21% Makefile 0.79%

fetchio's Introduction

fetchIO

fetchIO is a simple, configurable, fault-tolerant http crawler written in Haskell.

The main features are:

  • Configurable number of concurrent fetcher pipelines
  • Reuse of http connection (configurable)
  • Fetched HTML is zipped and binary64-encoded
  • Configurable using a simple JSON file

History

The previous version of this tool, fureteur, was written in Scala. The scalability quickly became an issue however, not to mention the high load on the machine. The use of Scala actors provided a very nice abstraction during the implementation of fureteur. However reaching high-performance with acceptable hardware quickly became an issue.

fetchIO uses Haskell lightweight threads. Refer to this book for more information regarding Haskell forkIO and concurrent programming. While very simple, fetchIO is able to reach very high performance on commoditized servers.

Distributed Crawling

Fureteur makes it very easy to implement a distributed crawler - for instance on Amazon AWS EC2.

Example of distributed crawler on EC2

The main server above includes RabbitMQ queues storing the URLs to be fetched (fetchIn queues) and a queue that includes the fetched data. A simple JSON format is used for the messages. Separate tasks running on the server take care of scheduling URLs to be fetched and writing back the data into a distributed database.

A configurable number of fetcher can be started using separate EC2 instances. Each instance will get URLs batches from the server fetchIn queues, fetch them and write them back into the fetchOut queue. Cost-effective EC2 micro instances may be used since fetching is not a CPU-intensive task. When it comes to the fetcher instances, the system is totally fault-tolerant - if an instance becomes unresponsive and/or is abruptly terminated, no data will be lost thanks to the RabbitMQ acknowledgement mechanism.

Getting Started

TBD

Contact

Created by Gilles Pirio. Feel free to contact me at [email protected].

fetchio's People

Contributors

gip avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.