• Stars
    star
    135
  • Rank 269,297 (Top 6 %)
  • Language
    Go
  • License
    MIT License
  • Created over 11 years ago
  • Updated almost 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

content management server

Bytengine

BQL

About

Bytengine is a scalable content repository built with Go. Its API is accessible from any Http client library so you can start coding in your favorite language!

Bytengine stores your JSON data and digital assets in a pseudo hierarchical file system which you query using it's inbuilt SQL like language.

Some of the server's features are:

  • JSON data management
  • Digital assets management
  • HTTP based API
  • Bytengine Query language (BQL)
  • Pluggable data storage backends (currently supports Mongodb, Diskv, Redis)
  • Command line interface bshell

Installation

Current Build Prerequisites:

You can download Bytengine binaries for:

Extract downloaded file, 'cd' into directory and run:

    ./bytengine createadmin -u="admin" -p="yourpassword"
    ./bytengine run

Development

Bytengine is developed on OS X so you should adapt the following instructions to your Os/Distro (Only tested on OS X, Ubuntu Linux, Raspbian)

Current Build Prerequisites:

  1. Get Bytengine go get -d github.com/johnwilson/bytengine/cmd/bytengine

  2. cd $GOPATH/src/github.com/johnwilson/bytengine/cmd/bytengine

  3. Build Bytengine go build

  4. Rename config.json.sample to config.json

  5. Running Bytengine

	./bytengine createadmin -u="admin" -p="yourpassword"
	./bytengine run

Quick Tutorial

Using Python + Requests

    >>> import requests
    >>> url = "http://localhost:8500/bfs/token"
    >>> data = {"username":"user","password":"password"}
    >>> r = requests.post(url, data=data)
    >>> j = r.json()
    >>> print j["status"]
    ok
    >>> token = j["data"]
    >>> cmd = 'server.newdb "test"; server.listdb;'  # issue two commands
    >>> url = "http://localhost:8500/bfs/query"
    >>> data = {"token":token,"query":cmd}
    >>> r = requests.post(url, data=data)
    >>> j = r.json()
    >>> print j["status"]
    ok
    >>> print j["data"][-1]  # get last result
    [u'test']

Using Bytengine Shell bshell

Login:

    bshell run -u=user -p=password

Enter commands:

    bql> server.newdb "test"; server.listdb;
    {
      "data": [
        true,
        [
          "test"
        ]
      ],
      "status": "ok"
    }
    bql> \s lastresult().status
    ok

Some handy links

Documentation - Bytengine Docs

Twitter - Follow Bytengine

Hemi v6 - Deploy to Heroku

Thanks

Go project

golang-nuts community

Third-party libraries/framework developers