Skip to content

Cloudxtreme/bytengine

 
 

Repository files navigation

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. Get Godep go get github.com/tools/godep

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

  4. Restore dependency versions godep restore

  5. Build Bytengine go build

  6. Rename config.json.sample to config.json

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

About

content management server

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%