Giter Club home page Giter Club logo

duckduckcrawl's Introduction

DuckDuckGo distributed crawler (DDC) prototype

The purpose of this project is to prototype a distributed crawler for the DuckDuckGo search engine.

Protocol

Basic workflow

  • A client requests a list of domains to check for spam, the server answers with a list of domains
  • The server might also add in the response additional data to ask the client to upgrade itself or the page analysis component
  • The client does the analysis on the domains, and then sends the results back to the server
  • The client request another bunch of domains to check and so on

Implementation

  • It's a classic REST API
  • To get a domain list the client sends a GET request, and to post the results it sends a POST request

URL parameters:

  • version : the protocol version which defines the XML response structure, it must be incremented when a change breaks client compatibility. The server must always handle all old protocol versions, to at least to tell the clients they must upgrade
  • pc_version : the version of the page processing binary component

XML response format

It contains one of these nodes immediately above the root:

  • 'upgrades' : can contain nodes to tell the client to upgrade its components (with URL to download the new version)
  • 'domainlist' : the list of domains to check ('domain' nodes)

Files

  • ddc_client.py : Code for a crawling worker
  • ddc_process.py : This file contains the code that simulates the binary component, currently it returns dumb results just to simulate
  • ddc_server.py : Code for the server that distributes the crawling work to the clients and gets the result from them
  • tests/single_client.sh : Bash script to do a small simulation by launching the server and connecting a client to it
  • tests/client_upgrade.sh : Bash script to simulate a client upgrade initiated by the server

Dependencies

Ubuntu users

On recent Ubuntu versions, you can install all dependencies by running the following command line:

sudo apt-get -V install python3 python3-httplib2

The code has only been tested on Linux but is fully OS neutral.

duckduckcrawl's People

Contributors

desbma avatar

Watchers

Nitish Singh 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.