From c131227282d2d1a260054fab0554b2aef8de2b4a Mon Sep 17 00:00:00 2001 From: despiegk Date: Tue, 24 Jul 2018 08:08:25 +0200 Subject: [PATCH 1/4] docserver --- docs/gedis.md | 46 +++++++++++++++++++------------------ docs/recordchain_install.md | 14 +++++++++++ 2 files changed, 38 insertions(+), 22 deletions(-) diff --git a/docs/gedis.md b/docs/gedis.md index a34e583..9a7a6f2 100644 --- a/docs/gedis.md +++ b/docs/gedis.md @@ -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 @@ -17,25 +24,18 @@ 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 @@ -43,13 +43,15 @@ js9 'j.servers.gedis.test()' **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 diff --git a/docs/recordchain_install.md b/docs/recordchain_install.md index e69de29..fa3c7b0 100644 --- a/docs/recordchain_install.md +++ b/docs/recordchain_install.md @@ -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 + +``` + From 6bbeb16a93b089a600268ecd4d7e680a7a80158a Mon Sep 17 00:00:00 2001 From: despiegk Date: Tue, 24 Jul 2018 08:09:23 +0200 Subject: [PATCH 2/4] docserver --- docs/_sidebar.md | 2 +- docs/{recordchain_install.md => rc_install.md} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename docs/{recordchain_install.md => rc_install.md} (100%) diff --git a/docs/_sidebar.md b/docs/_sidebar.md index b390c52..fc7d86c 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -4,5 +4,5 @@ * [gedis](/gedis.md) * [BCDB](/bcdb.md) -* [install](/recordchain_install.md) +* [install](/rc_install.md) * [schema](/bcdb.md) diff --git a/docs/recordchain_install.md b/docs/rc_install.md similarity index 100% rename from docs/recordchain_install.md rename to docs/rc_install.md From b09f401a8c876f8bc4d37fd815fcd5cd55cfcfba Mon Sep 17 00:00:00 2001 From: despiegk Date: Tue, 24 Jul 2018 08:10:02 +0200 Subject: [PATCH 3/4] docserver --- docs/_sidebar.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_sidebar.md b/docs/_sidebar.md index fc7d86c..5e858a8 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -5,4 +5,4 @@ * [gedis](/gedis.md) * [BCDB](/bcdb.md) * [install](/rc_install.md) -* [schema](/bcdb.md) +* [schema](/schema.md) From 0d1fd6d264fe3f933429ab214e8c90b4af514427 Mon Sep 17 00:00:00 2001 From: PeterNashaat Date: Tue, 24 Jul 2018 10:39:13 +0200 Subject: [PATCH 4/4] update_sidebar file Links wasn't working --- docs/_sidebar.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 5e858a8..c66c9d5 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -2,7 +2,7 @@ ---- -* [gedis](/gedis.md) -* [BCDB](/bcdb.md) -* [install](/rc_install.md) -* [schema](/schema.md) +* [gedis](/docs/gedis.md) +* [BCDB](/docs/bcdb.md) +* [install](/docs/rc_install.md) +* [schema](/docs/schema.md)