Coder Social home page Coder Social logo

flock's Introduction

Flock

Flock is twitter Graph model built on Dgraph.

Flock has two parts,

  • Mutation program - Makes use of the tweets available from twitter developer API's and builds the Graph model on top of Dgraph.

Here is the Graph schema of Flock,

Schema

  • Query client - Runs interesting graph queries on the tweets data stored in Dgraph.

Running Flock

Obtaining twitter credentials

We need to create a twitter developer account and an app to be able to fetch stream of tweets using their APIs. Let's start with how to create a twitter developer account.

  • Apply for a twitter developer account here and follow the instructions. The series of steps would end with your email verification.
  • Create a twitter app from this link. All fields are not required.
  • You'll be redirected to the App details tab after creating the app. Go to the Keys and tokens tab and create new access and secret tokens. Twitter Developer account
  • Create a copy of the credentials template.
    cp credentials-template.json credentials.json
  • Open the crendentials.json file and replace the placeholders with the keys from the twitter app's Keys and token tab.

Setup

  • Clone the repository.
$ git clone https://github.com/dgraph-io/flock.git
$ cd flock
  • Export the persistent data directory. Since Dgraph is run using Docker containers, it is essential to mount a directory on the host machine to persist the data across multiple runs.
$ mkdir ./data
$ export DATA_DIR=$(pwd)/data
  • Export UID. This is to give permission to Dgraph process inside the container to write to host directory.
$ export UID
  • This command adds the current user to docker group so that docker command line tool can write to unix socket where docker daemon is listening. You should logout and login the host again, after executing the command.
$ sudo usermod -aG docker $USER
  • Start the Dgraph servers, flock and Ratel with Docker-compose. Visit http://localhost:8000 on your browser to view the UI.
$ docker-compose up

flock's People

Contributors

hackintoshrao avatar mangalaman93 avatar manishrjain avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.