Skip to content
This repository was archived by the owner on Jul 28, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

----

* [gedis](/gedis.md)
* [BCDB](/bcdb.md)
* [install](/recordchain_install.md)
* [schema](/bcdb.md)
* [gedis](/docs/gedis.md)
* [BCDB](/docs/bcdb.md)
* [install](/docs/rc_install.md)
* [schema](/docs/schema.md)
46 changes: 24 additions & 22 deletions docs/gedis.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
# Gedis

A framework that allows for creating applications that are `redis protocol` compatible
Application server which amongst others use the `redis protocol`
and have their own set of `custom redis commands`
Gedis exposes these commands automatically.

You create an `app/instance server` and you can get a `client` that can connect tpo your app
and execute the commands easily
Functions of gedis

- interfaces
- redis commands (tcp)
- websockets (to use from javascript library)
- super easy to create
- goal is no boilerplate code, all code gets generated
- schema's are in


Since `gedis` is a `TCP` level framework, it's very fast and efficient
You create an `app/instance server` and you can get a `client` that can connect to your app
and execute the commands easily

A `Gedis` server uses [BCDB DB](/JumpScale9RecordChain/data/bcdb/README.md)
that saysm, you can add `schema` toml files to your generated server directory and
Expand All @@ -17,39 +24,34 @@ This is the `Model layer`

### installation

```bash
##OPTIONAL IF UBUNTU
#apt install libssl-dev`

#install recordchain
js9_code get --url="git@github.com:rivine/recordchain.git"
cd $HOMEDIR/code/github/rivine/recordchain && sh install.sh
see [recordchain_install](/recordchain_install.md)

```bash
#build zdb
js9 'j.servers.zdb.build()'
```

### Tests
### Test

```bash
cd $HOMEDIR/code/github/rivine/recordchain/apps/orderbook/
python3 test.py
js9 'j.clients.gedis.test()'
js9 'j.servers.gedis.test()'
```

### Running

**Hello world example**
Get the `example` app in [HERE](/JumpScale9RecordChain/apps/)

- Configure & Run server `j.servers.gedis.get('example').start(background=False, reset=True)`
- Configure & Get client `client = j.clients.gedis.get('example', reset=True)`
- execute system command `ping`
```
client.system.ping()
b'PONG'
```
```python
#Configure & Run server
j.servers.gedis.get('example').start(background=False, reset=True)
#Configure & Get client
client = j.clients.gedis.get('example', reset=True)
#execute system command ping
assert client.system.ping()==b'PONG'
```

- Instance name here refers to application name. In this case our app is called `example`
- During configuration phase for this helloworld example, leve `apps_dir` empty for both server & client
This ensures that apps dir will be set to `/JumpScale9RecordChain/apps/` and that the `helloworld` app called `example` will be loaded from there
Expand Down
14 changes: 14 additions & 0 deletions docs/rc_install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## install record chain

```bash

##OPTIONAL IF UBUNTU
#apt install libssl-dev`

#install recordchain
js9_code get --url="git@github.com:rivine/recordchain.git"
cd $HOMEDIR/code/github/rivine/recordchain
sh install.sh

```

Empty file removed docs/recordchain_install.md
Empty file.