Bytengine
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:
-
Get Bytengine
go get -d github.com/johnwilson/bytengine/cmd/bytengine
-
cd $GOPATH/src/github.com/johnwilson/bytengine/cmd/bytengine
-
Build Bytengine
go build
-
Rename
config.json.sample
toconfig.json
-
Running Bytengine
./bytengine createadmin -u="admin" -p="yourpassword"
./bytengine run
Quick Tutorial
Requests
Using Python + >>> 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']
bshell
Using Bytengine ShellLogin:
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
Third-party libraries/framework developers