Giter VIP home page Giter VIP logo

hivemind's Introduction

Hivemind

hivemind is an off-chain consensus layer for Steem communities and API server for social features like feeds and follows.

Dev Environment

Make sure you have Python 3.5+, Docker and MySQL installed on your local machine.

Setting up MySQL

First, we need to start a MySQL server (in Docker).

make mysql

Then we need to set DATABASE_URL environment variable, for example:

set DATABASE_URL 'mysql://root:root_password@mysql:3306/testdb'

I defined mysql in /etc/hosts such that it links to mysql docker container IP.

Lastly we invoke the ensure-schema command to create MySQL tables.

hive db ensure-schema --yes

Indexing the blockchain

We can index the blockchain using cli as well.

hive indexer from-steemd

If we have a .json.lst file containing first X blocks, we can index from that (its much faster).

hive indexer from-file /path/to/blocks.json.lst

Starting API Server

hive server dev-server --port 1234

Production Env

BYO MySQL deployment (ie. Amazon RDS). Hive is deployed as Docker container (see Dockerfile).

Environment Variables

Variable Default
ENVIRONMENT DEV
LOG_LEVEL INFO
HTTP_SERVER_PORT 8080
HTTP_SERVER_STATS_PORT 9191
DATABASE_URL

Services

Please see /service.

Other

Documentation

Generate documentation.

cd docs
make html

Then open docs/_build in browser.

Spec

Community Spec Draft

License

MIT

hivemind's People

Contributors

john-g-g avatar netherdrake avatar roadscape 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.