synrc / kvs Goto Github PK
View Code? Open in Web Editor NEW๐ฟ KVS: NVMe Key-Value Store
Home Page: https://kvs.n2o.dev
License: Other
๐ฟ KVS: NVMe Key-Value Store
Home Page: https://kvs.n2o.dev
License: Other
1> kvs:add(#user{id="[email protected]"}).
2> kvs:add(#user{id="[email protected]"}).
{error,no_container}
id_seq is table required for store_mnesia:next_id/2
to work. And now id_seq is defined in kvs_subscription schema.
So, it should be moved to something like kvs_system schema. Or there could be a note in readme that kvs_subscription is required.
subj
Would you mind using some kind of semantic versioning?
Right now the README promises a lot of features, but have you delivered them all?
If not, then at what stage are you?
I understand that this is a working progress, but having some version could have the potential users.
And probably prevent contributors to step on each other's toes.
Hello every one,
I have been following the readme instructions related to mongodb. The kvs module gives me this
settings:
>kvs:config(dba). store_mongo
>kvs:version(). {version,"KVS MONGO"}
Then after kvs:join().
I got the error message.
I don't see any 'mongo.erl' module in comtihon/mongodb-erlang sources nore in kvs's package.
Would you help me understand my wrongs?
Thanks for your time,
Best regards
Successful scenario:
> require ERP
ERP
> :kvs.feed '/crm/towns', KVS.kvs(mod: :kvs_mnesia, st: :kvs_stream)
@doxtop knows his stuff
this also has to be documented
remove useless code & dirty hacks
create(ContainerName) -> create(ContainerName, kvs:next_id(atom_to_list(ContainerName), 1)).
atom_to_list(ContainerName)
[ Init(atom_to_list(Name)) || {Name,_Fields} <- containers() ].
atom_to_list(Name)
etc.
As far as I know there are implementations for Kai and Riak but in other repo.
It will be great add them to current repo.
I have created a new table with mnesia.
mnesia:schema(text).
-- Properties for text table ---
access_mode -> read_write
active_replicas -> [nonode@nohost]
all_nodes -> [nonode@nohost]
arity -> 4
attributes -> [id,title,body]
checkpoints -> []
commit_work -> []
cookie -> {{1514407290293049786,-576460752303422623,1},
nonode@nohost}
disc_copies -> [nonode@nohost]
disc_only_copies -> []
external_copies -> []
frag_properties -> []
index -> []
index_info -> {index,bag,[]}
load_by_force -> false
load_node -> nonode@nohost
load_order -> 0
load_reason -> local_only
local_content -> false
majority -> false
master_nodes -> []
memory -> 306
ram_copies -> []
record_name -> text
record_validation -> {text,4,bag}
setorbag -> bag
size -> 0
snmp -> []
storage_properties -> []
storage_type -> disc_copies
subscribers -> []
user_properties -> []
version -> {{2,0},[]}
where_to_commit -> [{nonode@nohost,disc_copies}]
where_to_read -> nonode@nohost
where_to_wlock -> {[nonode@nohost],false}
where_to_write -> [nonode@nohost]
wild_pattern -> {text,'_','_','_'}
Now I try to add an entry via
event(submit) ->
Title = wf:q(title),
Body = wf:q(body),
kvs:add(#text{id=kvs:next_id("text",1),title=Title,body=Body});
but get
<<"g2gCaAVkAAJldmQABXNtb2tlZAAGc3VibWl0bQAAAAZzdWJtaXRkAAVldmVudGgDYgAABepiAAY3fGIAC32Q">>,
[{{"submit",<<"detail">>},[]},
{title,"Test title"},
{body,"Test body"}]}
n2o_nitrogen:Catch: error:badarg
[{erlang,atom_to_list,[<<"Test title">>],undefined},
{kvs,rname,1,383},
{kvs,range,2,334},
{kvs,get,3,261},
{kvs,ensure_link,2,103},
{n2o_nitrogen,html_events,2,73},
{n2o_nitrogen,info,3,35},
{n2o_proto,push,5,44}]
And I am unable to insert a new record.
What am I missing?
Thank you!
Edit: It works well when I attemt to insert a new record with mnesia
insert () ->
Record = #text{id=1,title="Test title",body="Test body"},
F = fun() ->
mnesia:write(Record)
end,
mnesia:transaction(F).
leads to
database_logic:insert().
{atomic,ok}
and
kvs:all(text).
[{text,1,"Test title","Test body"}]
It looks like kvs_stream:remove doesn't actually delete Rec from DB - only counter in writer is updated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.