Giter Site home page Giter Site logo

marianoguerra / tanodb Goto Github PK

View Code? Open in Web Editor NEW
45.0 45.0 9.0 347 KB

distributed in memory key value store on top of riak_core, example for the little riak core book

Home Page: http://marianoguerra.github.io/little-riak-core-book/

Makefile 2.49% Erlang 85.67% Shell 9.76% CSS 1.52% HTML 0.57%

tanodb's Introduction

Mariano Guerra's Index Page

Hi! I'm Mariano Guerra, an Information's System Engineer from Córdoba, Argentina

I'm the Co-founder of Instadeq a product to do data analysis, visualization and collaboration for individuals and teams and GlooData an Extensible Conversational UI for Interactive Components

I'm writing the book WebAssembly from the Ground Up with Patrick Dubroy

Previously Co-founder of Event Fabric

I do a Weekly Newsletter about the Future of Coding

Main Projects

(most recent first)

Me Around the Web

Talks

(most recent first)

Interviews & Podcasts

Language Projects

Academic-ish Stuff

Parser Projects

Deprecated Projects

tanodb's People

Contributors

bryanhuntesl avatar marianoguerra avatar ricardobcl avatar thanos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tanodb's Issues

Listing Keys from a Bucket no longer works

Due to a change in what riak_core expects, the instructions for the chapter 'Listing Keys from a Bucket' no longer works because of the following causing a badmatch:

init(_, [ReqId, From, Request, Timeout]) ->
State = #state{req_id=ReqId, from=From, request=Request},
{Request, allup, 1, 1, tanodb, tanodb_vnode_master, Timeout, State}.

Changing it to this fixes it:

{Request, allup, 1, 1, tanodb, tanodb_vnode_master, Timeout, riak_core_coverage_plan, State}.

Season II planned?

Hi

Thanks for this tanodb.

I wonder if there could be some following up steps, such as:

  • eleveldb/erocksdb as backend
  • crdt
  • more riak_core related logic

rebar3 release - fails

rebar3 release gives me:

===> release successfully created!
===> Unable to copy from /Users/thanos/work/tanodb/_build/default/rel/tanodb/releases/0.1.0/vm.args to /Users/thanos/work/tanodb/_build/default/rel/tanodb/etc/vm.args because of {copy_failed,
                                                                                                                                                                              enoent}

/Users/thanos/work/tanodb/_build/default/rel/tanodb/releases/0.1.0/vm.args was not created:

Admins-MacBook-Air:tanodb thanos$  ls -lR /Users/thanos/work/tanodb/_build/default/rel/tanodb/releases/
total 16
drwxr-xr-x  8 thanos  staff   272 Apr  9 11:44 0.1.0
-rw-r--r--  1 thanos  staff  1929 Apr  9 11:44 RELEASES
-rw-r--r--  1 thanos  staff     9 Apr  9 11:44 start_erl.data

/Users/thanos/work/tanodb/_build/default/rel/tanodb/releases//0.1.0:
total 208
-rw-r--r--  1 thanos  staff   5332 Apr  9 11:44 start_clean.boot
lrwxr-xr-x  1 thanos  staff     43 Apr  9 11:41 sys.config.orig -> /Users/thanos/work/tanodb/config/sys.config
-rw-r--r--  1 thanos  staff  35881 Apr  9 11:44 tanodb.boot
-rw-r--r--  1 thanos  staff   1041 Apr  9 11:44 tanodb.rel
-rw-r--r--  1 thanos  staff  46874 Apr  9 11:44 tanodb.script
lrwxr-xr-x  1 thanos  staff     40 Apr  9 11:41 vm.args.orig -> /Users/thanos/work/tanodb/config/vm.args

couldn't find 'nodename' in ../tanodb_config/tanodb.conf

I met following problem when I try to do rebar3 run

:~/tanodb/tanodb (ping-as-a-service-fix-1)$ rebar3 run
===> Verifying dependencies...
===> Compiling tanodb
===> Running cuttlefish schema generator
===> Starting relx build process ...
===> Resolving OTP Applications from directories:
/home/id/tanodb/tanodb/_build/default/lib
/home/id/tanodb/tanodb/apps
/usr/local/lib/erlang/lib
/home/id/tanodb/tanodb/_build/default/rel
===> Resolved tanodb-0.1.0
===> Dev mode enabled, release will be symlinked
===> release successfully created!
vm.args needs to have a -name parameter.
-sname is not supported.
couldn't find 'nodename' in ../tanodb_config/tanodb.conf
$PWD is /home/id/tanodb/tanodb

I have tried follow "Little Riak Core Book" to install through template, but I still got above problem.
Then I use commit "ping-as-a-service-fix-1", problem is same
I also checked file, it is there.
~/tanodb/tanodb/config (ping-as-a-service-fix-1)$ ll vm.args

My rebar3 version is
~$rebar3 -v
rebar 3.2.0 on Erlang/OTP 18 Erts 7.0

Anyone met this before?
Thanks a lot!

riak_core_util not being added to the Erlang code path

Hi there,

I suspect that the Erlang code path is not being set up correctly. An indication could be the fact that I receive the following error message when attempting to execute tanodb:put("foo","bar")..

 no function clause matching riak_core_util:chash_key("foo")

But if I perform a search, the beam file is on the path. Checking the source confirms that the function is defined.

[/common/tanodb%]find ./ | grep riak_core_util
.//_build/default/lib/riak_core/ebin/riak_core_util.beam
.//_build/default/lib/riak_core/src/riak_core_util.erl

The full error message was as follows:

(tanodb3@127.0.0.1)6> tanodb:put("foo","bar").
22:20:12.505 [error] gen_fsm <0.1365.0> in state prepare terminated with reason: no function clause matching riak_core_util:chash_key("foo") line 247
22:20:12.506 [error] CRASH REPORT Process <0.1365.0> with 0 neighbours exited with reason: no function clause matching riak_core_util:chash_key("foo") line 247 in gen_fsm:terminate/7 line 626
22:20:12.506 [error] Supervisor tanodb_write_fsm_sup had child undefined started with {tanodb_write_fsm,start_link,undefined} at <0.1365.0> exit with reason no function clause matching riak_core_util:chash_key("foo") line 247 in context child_terminated
{error,timeout}
(tanodb3@127.0.0.1)7>

I can dynamically add the code path using code:add_patha/1 but I'd like to actually fix the problem. I don't have any prior knowledge of 'rebar3' and I'm unfamiliar with the build system.

If you could send me a pointer, I'll submit a P/R to fix the issue.

B

Ping as a Service (PaaS) - rebar3 run fails

Under the section

Ping as a Service (PaaS)

and subsection

Testing it

trying to do

rebar3 run

fails:

===> release successfully created!
Exec: /Users/thanos/erlangs/18.1/erts-7.1/bin/erlexec -boot /Users/thanos/work/tanodb/_build/default/rel/tanodb/releases/0.1.0/quantumdb -boot_var ERTS_LIB_DIR /Users/thanos/erlangs/18.1/erts-7.1/../lib  -mode embedded  -config /Users/thanos/work/tanodb/_build/default/rel/tanodb/generated.conf/app.2016.04.19.22.07.13.config -args_file /Users/thanos/work/tanodb/_build/default/rel/tanodb/generated.conf/vm.2016.04.19.22.07.13.args -vm_args /Users/thanos/work/tanodb/_build/default/rel/tanodb/generated.conf/vm.2016.04.19.22.07.13.args  -- console
Root: /Users/thanos/work/tanodb/_build/default/rel/tanodb
Erlang/OTP 18 [erts-7.1] [source] [64-bit] [smp:4:4] [async-threads:64] [kernel-poll:true]

Setup running ...
Directories verified. Res = {[ok],[]}
Setup finished processing hooks ...
22:07:14.421 [info] Application lager started on node '[email protected]'
22:07:14.423 [info] Starting reporters with []
22:07:14.423 [info] Application exometer_core started on node '[email protected]'
22:07:14.423 [info] Application poolboy started on node '[email protected]'
22:07:14.423 [info] Application pbkdf2 started on node '[email protected]'
22:07:14.423 [info] Application eleveldb started on node '[email protected]'
22:07:14.429 [info] Application sasl started on node '[email protected]'
22:07:14.429 [info] Application basho_stats started on node '[email protected]'
22:07:14.434 [info] Application os_mon started on node '[email protected]'
22:07:14.439 [info] Application riak_sysmon started on node '[email protected]'
22:07:14.441 [info] Application crypto started on node '[email protected]'
22:07:14.446 [info] alarm_handler: {set,{{disk_almost_full,"/"},[]}}
22:07:14.516 [info] New capability: {riak_core,vnode_routing} = proxy
22:07:14.533 [info] New capability: {riak_core,staged_joins} = true
22:07:14.548 [info] New capability: {riak_core,resizable_ring} = true
22:07:14.561 [info] New capability: {riak_core,fold_req_version} = v2
22:07:14.578 [info] New capability: {riak_core,security} = true
22:07:14.591 [info] New capability: {riak_core,bucket_types} = true
22:07:14.607 [info] New capability: {riak_core,net_ticktime} = true
22:07:14.656 [info] Stopped  application riak_core.
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed
{"Kernel pid terminated",application_controller,"{application_start_failure, tanodb,{bad_return,{{tanodb_app,start,[normal,[]]},{'EXIT',{undef,[{cowboy_router,compile,[[{'_',[{\"/ping\", tanodb_http_ping,[]}]}]],[]},{quantumdb_app,init_http,0,[{file,\"/Users/thanos/work/tanodb/_build/default/lib/quantumdb/src/tanodb_app.erl\"},{line,36}]},{quantumdb_app,start,2,[{file,\"/Users/thanos/work/tanodb/_build/default/lib/tanodb/src/quantumdb_app.erl\"},{line,13}]},{application_master,start_it_old,4,[{file,\"application_master.erl\"},{line,273}]}]}}}}}"}

when you run rebar3 run (using R18)

vm.args needs to have a -name parameter.
-sname is not supported.
couldn't find 'nodename' in ../tanodb_config/tanodb.conf
$PWD is /Users/gyanendraaggarwal/tanodb

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.