Git Product home page Git Product logo

dor's Introduction

Build Status

DOR - Domain Ranker

Fast HTTP service which shows a specified domain rank from following providers:

Can be used as a base for a domain categorization / network filters / suspicious domain detection.

Data is updated once a day automatically.

Supported types of storages:

  • Clickhouse (recommended)
  • MongoDB
  • In-Memory

You can easily add the storage you like by implementing Storage interface.

Installation

Check out the releases page.

HTTP service usage

Use Clickhouse storage located at clickhouse and bind to port 8080:

go run service/dor-http/dor.go \
    -storage=clickhouse \
    -storage-url=tcp://clickhouse:9000 \
    -listen-addr=:8080

Fill database with the data

go run cmd/dor-insert/dor-insert \
    -storage=clickhouse \
    -storage-url=tcp://clickhouse:9000

Docker usage

Project has docker-compose that uses Clickhouse as a storage. Make changes here accordingly if any (folder for data persistence, ports etc).

docker-compose up -d

Client usage

$: curl 127.0.0.1:8080/rank/github.com

{
  "data": "github.com",
  "ranks": [
    {
      "domain": "github.com",
      "rank": 2698,
      "date": "2019-09-07T00:00:00Z",
      "source": "umbrella",
      "raw": ""
    },
    {
      "domain": "github.com",
      "rank": 29,
      "date": "2019-09-07T00:00:00Z",
      "source": "majestic",
      "raw": "29,24,github.com,com,176946,489686,github.com,com,29,24,176096,487221"
    },
    {
      "domain": "github.com",
      "rank": 26,
      "date": "2019-09-07T00:00:00Z",
      "source": "pagerank",
      "raw": ""
    },
    {
      "domain": "github.com",
      "rank": 32,
      "date": "2019-09-07T00:00:00Z",
      "source": "alexa",
      "raw": ""
    },
    {
      "domain": "github.com",
      "rank": 467,
      "date": "2019-09-07T00:00:00Z",
      "source": "yandex-radar",
      "raw": "The world’s leading software development platform · GitHub,github.com,,Сервисы,,,1520000,2340000,,,"
    },
    {
      "domain": "github.com",
      "rank": 43,
      "date": "2019-09-07T00:00:00Z",
      "source": "tranco",
      "raw": ""
    },
    {
      "domain": "github.com",
      "rank": 168,
      "date": "2019-09-07T00:00:00Z",
      "source": "quantcast",
      "raw": ""
    }
  ],
  "timestamp": "2019-09-07T14:32:32.9725943Z"
}

dor's People

Contributors

ilyaglow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dor's Issues

Remove Statvoo list

Hello,
The Statvoo ZIP file is an outdated copy of the Alexa list from November 23, 2016 - this can be checked through the timestamp of the unzipped CSV file. It has never been updated since, so its ranks are not representative of current popularity and stay the same every day.
I think it can therefore safely be ignored/removed from the service.

Clickhouse storage

Make a separated table with the data for each day / week. Data retention can be implemented via simple drop table by cron.

Broaden project use cases

Currently, a map-only strict implementation for the data storage limits the number of possible usages.

Storage should be an interface.

Insert data gracefully

Insert data only if there is no domain ranks today for a particular source. It is useful for testing and future trends functions.

Native cloud support

Consider using Amazon DynamoDB / Google Cloud Storage as a backend computed by Amazon Lambda / Google Functions triggered once a day with CloudWatch Events / AppEngine with cron

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.