This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(fmk@127.0.0.1)1>rpc:call('antidote@127.0.0.1',antidote,append, | |
[patients,riak_dt_map,{update, | |
[{add, {key, riak_dt_lwwreg}}, | |
{add, {val, riak_dt_pncounter}} | |
] | |
}]). | |
{error, | |
{type_check, | |
{update, | |
{patients,riak_dt_map, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(goncalo@127.0.0.1)1> Node = 'antidote@127.0.0.1'. | |
'antidote@127.0.0.1' | |
(goncalo@127.0.0.1)2> StartTxn = fun() -> rpc:call(Node,antidote,start_transaction,[ignore, []]) end. | |
#Fun<erl_eval.20.50752066> | |
(goncalo@127.0.0.1)3> AddRead = fun(Bucket,Txn) -> rpc:call(Node, antidote, read_objects, [[Bucket],Txn]) end. | |
#Fun<erl_eval.12.50752066> | |
(goncalo@127.0.0.1)4> AddWrite = fun(Bucket,Op,Param,Txn) -> rpc:call(Node, antidote, update_objects, [[{Bucket,Op,Param}], Txn]) end. | |
#Fun<erl_eval.4.50752066> | |
(goncalo@127.0.0.1)5> CommitTxn = fun(Txn) -> rpc:call(Node,antidote,commit_transaction,[Txn]) end. | |
#Fun<erl_eval.6.50752066> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21:57:49.860 [error] gen_server '11890602560248518965780370444936484965102833893376antidote@127.0.0.1' terminated with reason: no match of right hand value [{tx_id,1462222378056234,<0.3403.0>}] in riak_dt_vclock:descends/2 line 66 | |
21:57:49.861 [error] CRASH REPORT Process <0.2165.0> with 0 neighbours exited with reason: no match of right hand value [{tx_id,1462222378056234,<0.3403.0>}] in riak_dt_vclock:descends/2 line 66 in gen_server:terminate/6 line 744 | |
21:57:49.861 [error] Exception caught: {{{badmatch,[{tx_id,1462222378056234,<0.3403.0>}]},[{riak_dt_vclock,descends,2,[{file,"src/riak_dt_vclock.erl"},{line,66}]},{riak_dt_map,is_dot_unseen,2,[{file,"src/riak_dt_map.erl"},{line,517}]},{dict,filter_bucket,4,[{file,"dict.erl"},{line,482}]},{dict,filter_bkt_list,4,[{file,"dict.erl"},{line,476}]},{dict,filter_seg_list,4,[{file,"dict.erl"},{line,470}]},{dict,filter_dict,2,[{file,"dict.erl"},{line,465}]},{riak_dt_map,'-filter_unique/4-fun-1-',4,[{file,"src/riak_dt_map.erl"},{line,489}]},{sets,fold_bucket,3,[{file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(goncalo@127.0.0.1)1> Node = 'antidote@127.0.0.1'. | |
'antidote@127.0.0.1' | |
(goncalo@127.0.0.1)2> StartTxn = fun() -> rpc:call(Node,antidote,start_transaction,[ignore, []]) end. | |
#Fun<erl_eval.20.50752066> | |
(goncalo@127.0.0.1)3> StartTxnWTS = fun(TimeStamp) -> rpc:call(Node,antidote,start_transaction,[TimeStamp, []]) end. | |
#Fun<erl_eval.6.50752066> | |
(goncalo@127.0.0.1)4> AddRead = fun(Bucket,Txn) -> rpc:call(Node, antidote, read_objects, [[Bucket],Txn]) end. | |
#Fun<erl_eval.12.50752066> | |
(goncalo@127.0.0.1)5> AddWrite = fun(Bucket,Op,Param,Txn) -> rpc:call(Node, antidote, update_objects, [[{Bucket,Op,Param}], Txn]) end. | |
#Fun<erl_eval.4.50752066> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Node = 'antidote@127.0.0.1'. | |
StartTxn = fun() -> rpc:call(Node,antidote,start_transaction,[ignore, []]) end. | |
AddRead = fun(Bucket,Txn) -> rpc:call(Node, antidote, read_objects, [[Bucket],Txn]) end. | |
AddWrite = fun(Bucket,Op,Param,Txn) -> rpc:call(Node, antidote, update_objects, [[{Bucket,Op,Param}], Txn]) end. | |
CommitTxn = fun(Txn) -> rpc:call(Node,antidote,commit_transaction,[Txn]) end. | |
%% riak_dt:actor() :: term(), hardcodedactor is a term | |
AddWriteWithActor = fun(Bucket,Op,Param,Txn) -> rpc:call(Node, antidote, update_objects,[[{Bucket,Op,{Param,hardcodedactor}}], Txn]) end. | |
%% This is working, and so far it makes a lot of sense... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Node = 'antidote@127.0.0.1'. | |
StartTxn = fun() -> rpc:call(Node,antidote,start_transaction,[ignore, []]) end. | |
AddRead = fun(Bucket,Txn) -> rpc:call(Node, antidote, read_objects, [[Bucket],Txn]) end. | |
AddWrite = fun(Bucket,Op,Param,Txn) -> rpc:call(Node, antidote, update_objects, [[{Bucket,Op,Param}], Txn]) end. | |
CommitTxn = fun(Txn) -> rpc:call(Node,antidote,commit_transaction,[Txn]) end. | |
%% riak_dt:actor() :: term(), hardcodedactor is a term | |
AddWriteWithActor = fun(Bucket,Op,Param,Txn) -> rpc:call(Node, antidote, update_objects,[[{Bucket,Op,{Param,hardcodedactor}}], Txn]) end. | |
%% This is working, and so far it makes a lot of sense... | |
{ok, TxnId1} = StartTxn(). | |
CounterBucket = {counter,antidote_crdt_counter,bucket}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Single node cluster -> antidote@127.0.0.1. Multi-node cluster -> dev1@127.0.0.1 | |
%% Node = 'antidote@127.0.0.1'. | |
Node = 'dev1@127.0.0.1'. | |
StartTxn = fun() -> rpc:call(Node,antidote,start_transaction,[ignore, []]) end. | |
AddRead = fun(Bucket,Txn) -> rpc:call(Node, antidote, read_objects, [[Bucket],Txn]) end. | |
AddWrite = fun(Bucket,Op,Param,Txn) -> rpc:call(Node, antidote, update_objects, [[{Bucket,Op,Param}], Txn]) end. | |
CommitTxn = fun(Txn) -> rpc:call(Node,antidote,commit_transaction,[Txn]) end. | |
WriteValue = fun(V) -> {ok,Tx} = StartTxn(), ok = AddWrite({V,antidote_crdt_counter,bucket},increment,1,Tx), CommitTxn(Tx) end. | |
FloodGates3 = fun(F,0) -> WriteValue(key0); (F,V) -> WriteValue(list_to_atom(lists:flatten(io_lib:format("key~p", [V])))), F(F,V-1) end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias _add="git add" | |
alias _checkout="git checkout" | |
alias _checkoutnbranch="git checkout -b" | |
alias _commit="git commit -m" | |
alias _pull="git pull" | |
alias _pullmaster="git pull origin master" | |
alias _push="git push" | |
alias _pushmaster="git push origin master" | |
alias _status="git status" | |
alias _init="git init" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
00:55:39.812 [error] Exception caught: {noproc,{gen_server,call,[{global,'3730750818665451459101842416358141509827966271488antidote@127.0.0.1'},{perform_read,{<<"patient1">>,bucket},antidote_crdt_map,{transaction,1472946939749222,undefined,{dict,1,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[[{'antidote@127.0.0.1',{1472,946692,80751}}|1472946939749222]],[],[],[],[],[],[],[],[],[],[],[],[],[]}}},{tx_id,1472946939749222,<0.2102.0>}}},infinity]}}, starting read server to fix | |
00:55:39.845 [error] Exception caught: {noproc,{gen_server,call,[{global,'12548063113999088594326381812268606132370974703616antidote@127.0.0.1'},{perform_read,{<<"patient_name_index">>,bucket},antidote_crdt_orset,{transaction,1472946939827244,undefined,{dict,1,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[[{'antidote@127.0.0.1',{1472,946692,80751}}|1472946939827244]],[],[],[],[],[],[],[],[],[],[],[],[],[]}}},{tx_id,1472946939827244,<0.2127.0>}}},infinity]}}, starting read server to fix | |
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fmk_core:create_facility(1,"Weill Cornell Medical Center","New York NY,USA","Hospital"). | |
fmk_core:create_facility(2,"Florida Hospital Orlando","Orlando FL, USA","Hospital"). | |
fmk_core:create_facility(3,"Jackson Memorial Hospital","Miami FL, USA","Hospital"). | |
fmk_core:create_pharmacy(1,"Chai Pharmacy","Costa da Caparica, Portugal"). | |
fmk_core:create_pharmacy(2,"Carlos Pharmacy","Costa da Caparica, Portugal"). | |
fmk_core:create_pharmacy(3,"Definitely not an online scam!","Lisbon, Portugal"). | |
fmk_core:create_staff(1,"Paula Pinto","Lisboa","Alergologia"). | |
fmk_core:create_staff(2,"Gonçalo Tomás","Costa da Caparica","Shenanigans"). | |
fmk_core:create_staff(3,"Tânia Pires","Pragal","Enfermagem"). | |
fmk_core:create_patient(1,"Goncalo Tomas","Somewhere over the rainbow"). |
OlderNewer