From e0cabf3cb6d97db85197fffb77bb1e592937cfbe Mon Sep 17 00:00:00 2001 From: Scott Lystig Fritchie Date: Wed, 8 Apr 2015 17:58:49 +0900 Subject: [PATCH] Remove 'edoc' dir: it's moved to gh-pages --- edoc/.gitignore | 1 - edoc/edoc-info | 7 - edoc/erlang.png | Bin 2109 -> 0 bytes edoc/index.html | 17 -- edoc/machi_admin_util.html | 60 ------- edoc/machi_app.html | 39 ----- edoc/machi_chain_manager1.html | 155 ----------------- edoc/machi_chash.html | 171 ------------------ edoc/machi_flu1.html | 63 ------- edoc/machi_flu1_client.html | 278 ------------------------------ edoc/machi_flu_sup.html | 41 ----- edoc/machi_projection.html | 70 -------- edoc/machi_projection_store.html | 163 ------------------ edoc/machi_proxy_flu1_client.html | 222 ------------------------ edoc/machi_sequencer.html | 23 --- edoc/machi_sup.html | 39 ----- edoc/machi_util.html | 150 ---------------- edoc/modules-frame.html | 24 --- edoc/overview-summary.html | 185 -------------------- edoc/overview.edoc | 14 -- edoc/packages-frame.html | 11 -- edoc/stylesheet.css | 55 ------ 22 files changed, 1788 deletions(-) delete mode 100644 edoc/.gitignore delete mode 100644 edoc/edoc-info delete mode 100644 edoc/erlang.png delete mode 100644 edoc/index.html delete mode 100644 edoc/machi_admin_util.html delete mode 100644 edoc/machi_app.html delete mode 100644 edoc/machi_chain_manager1.html delete mode 100644 edoc/machi_chash.html delete mode 100644 edoc/machi_flu1.html delete mode 100644 edoc/machi_flu1_client.html delete mode 100644 edoc/machi_flu_sup.html delete mode 100644 edoc/machi_projection.html delete mode 100644 edoc/machi_projection_store.html delete mode 100644 edoc/machi_proxy_flu1_client.html delete mode 100644 edoc/machi_sequencer.html delete mode 100644 edoc/machi_sup.html delete mode 100644 edoc/machi_util.html delete mode 100644 edoc/modules-frame.html delete mode 100644 edoc/overview-summary.html delete mode 100644 edoc/overview.edoc delete mode 100644 edoc/packages-frame.html delete mode 100644 edoc/stylesheet.css diff --git a/edoc/.gitignore b/edoc/.gitignore deleted file mode 100644 index bcd672a..0000000 --- a/edoc/.gitignore +++ /dev/null @@ -1 +0,0 @@ -tmp.* diff --git a/edoc/edoc-info b/edoc/edoc-info deleted file mode 100644 index f119ed0..0000000 --- a/edoc/edoc-info +++ /dev/null @@ -1,7 +0,0 @@ -%% encoding: UTF-8 -{application,machi}. -{packages,[]}. -{modules,[machi_admin_util,machi_app,machi_chain_manager1,machi_chash, - machi_flu1,machi_flu1_client,machi_flu_sup,machi_projection, - machi_projection_store,machi_proxy_flu1_client,machi_sequencer, - machi_sup,machi_util]}. diff --git a/edoc/erlang.png b/edoc/erlang.png deleted file mode 100644 index 987a618e2403af895bfaf8c2f929e3a4f3746659..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2109 zcmV-D2*US?P)rez_nr%N ze)-p~%6|a|LA_bA=l=$|3jjqS$tjbGG?@TN0w$Azq7Z{YeQxKcpLO55vno1^u23DP&V=i9-KAAsU*ECy^#OtaDC!lVSo!+|-%T+LhTHP^Oqwx8m)b4r3V28JmV&6M#iG)&0;P`j>XGfomEIEK6wPkhI{{K?3#uAGq$!`N_F)TNX zAvuspF?^;c9h%CPWyTDc_03%r4N8+Yzzo_VSfa!zo_7F6D?<+-+KkHwXiWQR=Mr(9|K@{{xEjfDvAbS9uNCP&{)NNCoC?XA$aRe>R8-> z5N<#S_)$d|EYpJfPC?{`$Y~f4yjH&dxHXIGG8wiaLBD6usC87cg+dd&3WLJd4_TcmEeAOz8R>ikgW(9821 z{34Se09Y?KoG<_Y;DDSoyTk>fUN0YO5)3^Za{&s1JbidC9}56{px+f|K_0;YuL5h} z_9J3y%7ucwM)E4K#=Cn7tCjjRkKjnQuiFcM6{17Jt#5F}7z8~RYqW24xV?kAU6xQN zh+h4|SmO1;TdsVOaOeD*kKf}6I7=6ZNig_rtqV?Ov1HrU(P%Hi#6npSe>%qGaNK1w zW$v+r`r0>#p~AN^8b)#7Yesu(ys(>3SCYb4sF9%A9=kMHrLmzk}E&WPG~Jx z9!r{qo5M184t;<7I`t1AsNjv912EeKkHKtOSl%wbcjFh7L6|G?Q+{?radOvuEW$>1 zoc+c&F+u$^0f}1_2dN&lS#I#p3e&+|YGHlMzRC)%&8TnGt+p*;Oz z`0=D=n|qcN+f@07;QjB@ktLhZ`+qz;(xYDli^Pex&&wwU2V4N-a3b@veqHg2cvCRb zoi=ZerLk!4t5!s3?|ARuWx_4-VCgl|TY2qa@$Dr~5QdiT8?$oPpZhaF5UOZ&x=+I9 zt((`6wBPM((BS{;2lmSB;o%z{>=mg*1k2oLjI=+zcf5$4BIZmkOrjrE z*VY(<@FO?zBVDc+Q~Lh;LnlYodZ$J3tmWJBN4j~wVOWelzexhft2nY6A3PZAcm!q} z931CL#1Ki6;HM{agTbKF>3(R-yuF1&Apn3Nh@PGvv)K$mkVqu*^z@vaFgQ3kFfg!s z^=f26@{Ny=_w@7x1qHF$bEk5X$)wR}0s{l>V!TCGM=R5Ei1Ll8u7Z*N0G1CPgB zyLPP|0H{-FRUDJv`Ea=9fX zC63D4+FBlumz$eAJv~j5q*|@^_xC?_>XiL0K@bH61$;i=&CLx(QGb8`8#iu{BnjJW zHUvSgUcK7T&~W(h;koN8t5vB~Ha0dgnane1&RA#87dVcaOpEMM)6>)E&YiPZEXBpe zlarHk89g;+G#U#E3hL_W002xT6UTApOeR%UR_5g7q^73!_4PG2Hi|@|ii(Pfi3vIY z0ES^?Mx1IOizO0?e0_a!9483k`PtCk-rm~Unwpw=?b@~O?(WdgP^bMMAYlLg{dIM9 zOy}OcxVTs%k(@q#n$PF+`TXkYYA%;cr_*5ofWcr$PEL-Ai772Db)3`L*|~G)&eqn} zq@*OrbXim`UAiO`3XdK=%H#1=D%HHV>FMbqAtCAM=@!e}C6Cc))ai5zg~H3rYjkup zD=RBMKR+`wv!kN}1^{3fR#a3}RaLcP#}20|H!^bT)~%G3lp{xu!0_{Wr2hW?>({UQ z`T1F`)|D$)*3{IP&1UDKhLn_)sMYHH{QRkzV=$M?#W2idGFh!wf*`b7ZGC-xVPT=c zV1Vs&!otFoN~M>VQ$G_G6}5No-m0pqwzjr;?W@INu~;m#k*%qz(P%VUt#;3zJ^lUt zU0q%G?%kVzvF7cqQmLw|tA~e&XIqun*x2Ug=9-!s48ty7ycil9Di(|7aybkD7#y?%lgQ z9`Ewy%eDpgxlvJ3Cr+GTFc>(F+cg;(8TPc>y?b|jeEgLwR}LLIBoqp1+1c4_HrvO? z$J5g@G&D3gIC$2ITrQ7`iwh4AfA;K|OePZu1oriTVVG1Zl}e@S)~)mK@UU1cI-Ty| z!Gj8gg2UmUD2ibif*{e+(R4bU#bU|j@{Joe^7(uSf+8X!q*7@_M1;L=AqbM3oXp{H nT3T9A6wS=c+_!HZolgHhw9g$%O4Wbp00000NkvXXu0mjf3HKBY diff --git a/edoc/index.html b/edoc/index.html deleted file mode 100644 index be9d1af..0000000 --- a/edoc/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - -The machi application - - - - - - -<h2>This page uses frames</h2> -<p>Your browser does not accept frames. -<br>You should go to the <a href="overview-summary.html">non-frame version</a> instead. -</p> - - - \ No newline at end of file diff --git a/edoc/machi_admin_util.html b/edoc/machi_admin_util.html deleted file mode 100644 index 744230a..0000000 --- a/edoc/machi_admin_util.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - -Module machi_admin_util - - - - -
- -

Module machi_admin_util

-Machi chain replication administration utilities. - - -

Description

Machi chain replication administration utilities. -

Data Types

- -

inet_host()

-

inet_host() = inet:ip_address() | inet:hostname()

- - -

inet_port()

-

inet_port() = inet:port_number()

- - -

Function Index

- - - - -
verify_file_checksums_local/3
verify_file_checksums_local/4
verify_file_checksums_remote/3
verify_file_checksums_remote/4
- -

Function Details

- -

verify_file_checksums_local/3

-
-

verify_file_checksums_local(Sock1::port(), EpochID::machi_flu1_client:epoch_id(), Path::binary() | list()) -> {ok, [tuple()]} | {error, term()}

-
- -

verify_file_checksums_local/4

-
-

verify_file_checksums_local(Host::inet_host(), TcpPort::inet_port(), EpochID::machi_flu1_client:epoch_id(), Path::binary() | list()) -> {ok, [tuple()]} | {error, term()}

-
- -

verify_file_checksums_remote/3

-
-

verify_file_checksums_remote(Sock1::port(), EpochID::machi_flu1_client:epoch_id(), File::binary() | list()) -> {ok, [tuple()]} | {error, term()}

-
- -

verify_file_checksums_remote/4

-
-

verify_file_checksums_remote(Host::inet_host(), TcpPort::inet_port(), EpochID::machi_flu1_client:epoch_id(), File::binary() | list()) -> {ok, [tuple()]} | {error, term()}

-
-
- - -

Generated by EDoc, Apr 8 2015, 17:31:11.

- - diff --git a/edoc/machi_app.html b/edoc/machi_app.html deleted file mode 100644 index 8bba636..0000000 --- a/edoc/machi_app.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - -Module machi_app - - - - -
- -

Module machi_app

-Top-level supervisor for the Machi application. - -

Behaviours: application.

- -

Description

Top-level supervisor for the Machi application. -

Function Index

- - -
start/2
stop/1
- -

Function Details

- -

start/2

-
-

start(StartType, StartArgs) -> any()

-
- -

stop/1

-
-

stop(State) -> any()

-
-
- - -

Generated by EDoc, Apr 8 2015, 17:31:11.

- - diff --git a/edoc/machi_chain_manager1.html b/edoc/machi_chain_manager1.html deleted file mode 100644 index e2d0bec..0000000 --- a/edoc/machi_chain_manager1.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - -Module machi_chain_manager1 - - - - -
- -

Module machi_chain_manager1

-The Machi chain manager, Guardian of all things related to -Chain Replication state, status, and data replica safety. - -

Behaviours: gen_server.

- -

Description

The Machi chain manager, Guardian of all things related to -Chain Replication state, status, and data replica safety.

- -

The Chain Manager is responsible for managing the state of Machi's -"Chain Replication" state. This role is roughly analogous to the -"Riak Core" application inside of Riak, which takes care of -coordinating replica placement and replica repair.

- -

For each primitive data server in the cluster, a Machi FLU, there -is a Chain Manager process that manages its FLU's role within the -Machi cluster's Chain Replication scheme. Each Chain Manager -process executes locally and independently to manage the -distributed state of a single Machi Chain Replication chain.

- - Machi's Chain Manager process performs similar tasks as Riak Core's - claimant. However, Machi has several active Chain Manager - processes, one per FLU server, instead of a single active process - like Core's claimant. Each Chain Manager process acts - independently; each is constrained so that it will reach consensus - via independent computation & action. -

Function Index

- - - - - - - - - - - - - - - - - - -
code_change/3
get_all_hosed/1
handle_call/3
handle_cast/2
handle_info/2
init/1
make_projection_summary/1
ping/1
projection_transitions_are_sane/2
start_link/3
start_link/4
stop/1
terminate/2
test_calc_projection/2
test_calc_proposed_projection/1
test_react_to_env/1
test_read_latest_public_projection/2
test_write_proposed_projection/1
- -

Function Details

- -

code_change/3

-
-

code_change(OldVsn, S, Extra) -> any()

-
- -

get_all_hosed/1

-
-

get_all_hosed(P) -> any()

-
- -

handle_call/3

-
-

handle_call(Call, From, Ch_mgr) -> any()

-
- -

handle_cast/2

-
-

handle_cast(Cast, Ch_mgr) -> any()

-
- -

handle_info/2

-
-

handle_info(Msg, S) -> any()

-
- -

init/1

-
-

init(X1) -> any()

-
- -

make_projection_summary/1

-
-

make_projection_summary(Projection_v1) -> any()

-
- -

ping/1

-
-

ping(Pid) -> any()

-
- -

projection_transitions_are_sane/2

-
-

projection_transitions_are_sane(Ps, RelativeToServer) -> any()

-
- -

start_link/3

-
-

start_link(MyName, All_list, MyFLUPid) -> any()

-
- -

start_link/4

-
-

start_link(MyName, All_list, MyFLUPid, MgrOpts) -> any()

-
- -

stop/1

-
-

stop(Pid) -> any()

-
- -

terminate/2

-
-

terminate(Reason, S) -> any()

-
- -

test_calc_projection/2

-
-

test_calc_projection(Pid, KeepRunenvP) -> any()

-
- -

test_calc_proposed_projection/1

-
-

test_calc_proposed_projection(Pid) -> any()

-
- -

test_react_to_env/1

-
-

test_react_to_env(Pid) -> any()

-
- -

test_read_latest_public_projection/2

-
-

test_read_latest_public_projection(Pid, ReadRepairP) -> any()

-
- -

test_write_proposed_projection/1

-
-

test_write_proposed_projection(Pid) -> any()

-
-
- - -

Generated by EDoc, Apr 8 2015, 17:31:11.

- - diff --git a/edoc/machi_chash.html b/edoc/machi_chash.html deleted file mode 100644 index 7f2f293..0000000 --- a/edoc/machi_chash.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - -Module machi_chash - - - - -
- -

Module machi_chash

-Consistent hashing library. - - -

Description

Consistent hashing library. Also known as "random slicing".

- - This code was originally from the Hibari DB source code at - https://github.com/hibari -

Data Types

- -

float_map()

-

float_map() = [{owner_name(), float()}]

-

A float map subdivides the unit interval, starting at 0.0, to - partitions that are assigned to various owners. The sum of all - floats must be exactly 1.0 (or close enough for floating point - purposes).

- -

float_tree()

-

abstract datatype: float_tree()

-

We can't use gb_trees:tree() because 'nil' (the empty tree) is - never valid in our case. But teaching Dialyzer that is difficult.

- -

nextfloat_list()

-

nextfloat_list() = [{float(), brick()}]

-

A nextfloat_list - differs from a float_map in two respects: 1) nextfloat_list contains - tuples with the brick name in 2nd position, 2) the float() at each - position I_n > I_m, for all n, m such that n > m. - For example, a nextfloat_list of the float_map example above, - [{0.25, {br1, nd1}}, {0.75, {br2, nd1}}, {1.0, {br3, nd1}].

- -

owner_int_range()

-

owner_int_range() = {owner_name(), non_neg_integer(), non_neg_integer()}

-

Used when "prettying" a float map.

- -

owner_name()

-

owner_name() = term()

-

Owner for a range on the unit interval. We are agnostic about its - type.

- -

owner_weight()

-

owner_weight() = {owner_name(), weight()}

- - -

owner_weight_list()

-

owner_weight_list() = [owner_weight()]

-

A owner_weight_list is a definition of brick assignments over the - unit interval [0.0, 1.0]. The sum of all floats must be 1.0. For - example, [{{br1,nd1}, 0.25}, {{br2,nd1}, 0.5}, {{br3,nd1}, 0.25}].

- -

weight()

-

weight() = non_neg_integer()

-

For this library, a weight is an integer which specifies the - capacity of a "owner" relative to other owners. For example, if - owner A with a weight of 10, and if owner B has a weight of 20, - then B will be assigned twice as much of the unit interval as A.

- -

Function Index

- - - - - - - - - - - - -
hash_binary_via_float_map/2Query a float map with a binary (inefficient).
hash_binary_via_float_tree/2Query a float tree with a binary.
make_demo_map1/0Create a sample float map.
make_demo_map2/0Create a sample float map.
make_float_map/1Create a float map, based on a basic owner weight list.
make_float_map/2Create a float map, based on an older float map and a new weight -list.
make_tree/1Create a float tree, which is the rapid lookup data structure - for consistent hash queries.
pretty_with_integers/2Make a pretty/human-friendly version of a float map that describes - integer ranges between 1 and Scale.
pretty_with_integers/3Make a pretty/human-friendly version of a float map (based - upon a float map created from OldWeights and NewWeights) that - describes integer ranges between 1 and Scale.
query_tree/2Low-level function for querying a float tree: the (floating - point) point within the unit interval.
sum_map_weights/1Create a human-friendly summary of a float map.
zzz_usage_details/0Various usage examples, see source code below this function - for full details.
- -

Function Details

- -

hash_binary_via_float_map/2

-
-

hash_binary_via_float_map(Key::binary(), Map::float_map()) -> {float(), owner_name()}

-

Query a float map with a binary (inefficient).

- -

hash_binary_via_float_tree/2

-
-

hash_binary_via_float_tree(Key::binary(), Tree::float_tree()) -> {float(), owner_name()}

-

Query a float tree with a binary.

- -

make_demo_map1/0

-
-

make_demo_map1() -> float_map()

-

Create a sample float map.

- -

make_demo_map2/0

-
-

make_demo_map2() -> float_map()

-

Create a sample float map.

- -

make_float_map/1

-
-

make_float_map(NewOwnerWeights::owner_weight_list()) -> float_map()

-

Create a float map, based on a basic owner weight list.

- -

make_float_map/2

-
-

make_float_map(OldFloatMap::float_map(), NewOwnerWeights::owner_weight_list()) -> float_map()

-

Create a float map, based on an older float map and a new weight -list.

- - The weights in the new weight list may be different than (or the - same as) whatever weights were used to make the older float map.

- -

make_tree/1

-
-

make_tree(Map::float_map()) -> float_tree()

-

Create a float tree, which is the rapid lookup data structure - for consistent hash queries.

- -

pretty_with_integers/2

-
-

pretty_with_integers(Map::float_map(), Scale::integer()) -> [owner_int_range()]

-

Make a pretty/human-friendly version of a float map that describes - integer ranges between 1 and Scale.

- -

pretty_with_integers/3

-
-

pretty_with_integers(OldWeights::owner_weight_list(), NewWeights::owner_weight_list(), Scale::integer()) -> [owner_int_range()]

-

Make a pretty/human-friendly version of a float map (based - upon a float map created from OldWeights and NewWeights) that - describes integer ranges between 1 and Scale.

- -

query_tree/2

-
-

query_tree(Val::float(), Tree::float_tree()) -> {float(), owner_name()}

-

Low-level function for querying a float tree: the (floating - point) point within the unit interval.

- -

sum_map_weights/1

-
-

sum_map_weights(Map::float_map()) -> {{per_owner, float_map()}, {weight_sum, float()}}

-

Create a human-friendly summary of a float map.

- - The two parts of the summary are: a per-owner total of the unit - interval range(s) owned by each owner, and a total sum of all - per-owner ranges (which should be 1.0 but is not enforced).

- -

zzz_usage_details/0

-
-

zzz_usage_details() -> any()

-

Various usage examples, see source code below this function - for full details.

-
- - -

Generated by EDoc, Apr 8 2015, 17:31:11.

- - diff --git a/edoc/machi_flu1.html b/edoc/machi_flu1.html deleted file mode 100644 index 3ce6902..0000000 --- a/edoc/machi_flu1.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - -Module machi_flu1 - - - - -
- -

Module machi_flu1

-The Machi FLU file server + file location sequencer. - - -

Description

The Machi FLU file server + file location sequencer.

- -

This module implements only the Machi FLU file server and its -implicit sequencer. -Please see the EDoc "Overview" for details about the FLU as a -primitive file server process vs. the larger Machi design of a FLU -as a sequencer + file server + chain manager group of processes.

- -

For the moment, this module also implements a rudimentary TCP-based -protocol as the sole supported access method to the server, -sequencer, and projection store. Conceptually, those three -services are independent and ought to have their own protocols. As -a practical matter, there is no need for wire protocol -compatibility. Furthermore, from the perspective of failure -detection, it is very convenient that all three FLU-related -services are accessed using the same single TCP port.

- -

The FLU is named after the CORFU server "FLU" or "FLash Unit" server.

- - TODO There is one major missing feature in this FLU implementation: - there is no "write-once" enforcement for any position in a Machi - file. At the moment, we rely on correct behavior of the client - & the sequencer to avoid overwriting data. In the Real World, - however, all Machi file data is supposed to be exactly write-once - to avoid problems with bugs, wire protocol corruption, malicious - clients, etc. -

Function Index

- - -
start_link/1
stop/1
- -

Function Details

- -

start_link/1

-
-

start_link(Rest) -> any()

-
- -

stop/1

-
-

stop(Pid) -> any()

-
-
- - -

Generated by EDoc, Apr 8 2015, 17:31:11.

- - diff --git a/edoc/machi_flu1_client.html b/edoc/machi_flu1_client.html deleted file mode 100644 index f1f6203..0000000 --- a/edoc/machi_flu1_client.html +++ /dev/null @@ -1,278 +0,0 @@ - - - - -Module machi_flu1_client - - - - -
- -

Module machi_flu1_client

-Erlang API for the Machi FLU TCP protocol version 1. - - -

Description

Erlang API for the Machi FLU TCP protocol version 1. -

Data Types

- -

chunk()

-

chunk() = binary() | iolist()

-

client can use either

- -

chunk_csum()

-

chunk_csum() = {file_offset(), chunk_size(), binary()}

- - -

chunk_pos()

-

chunk_pos() = {file_offset(), chunk_size(), file_name_s()}

- - -

chunk_s()

-

chunk_s() = binary()

-

server always uses binary()

- -

chunk_size()

-

chunk_size() = non_neg_integer()

- - -

epoch_csum()

-

epoch_csum() = binary()

- - -

epoch_id()

-

epoch_id() = {epoch_num(), epoch_csum()}

- - -

epoch_num()

-

epoch_num() = -1 | non_neg_integer()

- - -

file_info()

-

file_info() = {file_size(), file_name_s()}

- - -

file_name()

-

file_name() = binary() | list()

- - -

file_name_s()

-

file_name_s() = binary()

-

server reply

- -

file_offset()

-

file_offset() = non_neg_integer()

- - -

file_prefix()

-

file_prefix() = binary() | list()

- - -

file_size()

-

file_size() = non_neg_integer()

- - -

inet_host()

-

inet_host() = inet:ip_address() | inet:hostname()

- - -

inet_port()

-

inet_port() = inet:port_number()

- - -

projection()

-

projection() = #projection_v1{}

- - -

projection_type()

-

projection_type() = public | private

- - -

Function Index

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
append_chunk/4Append a chunk (binary- or iolist-style) of data to a file - with Prefix.
append_chunk/5Append a chunk (binary- or iolist-style) of data to a file - with Prefix.
checksum_list/3Fetch the list of chunk checksums for File.
checksum_list/4Fetch the list of chunk checksums for File.
delete_migration/3Restricted API: Delete a file after it has been successfully - migrated.
delete_migration/4Restricted API: Delete a file after it has been successfully - migrated.
get_all_projections/2Get all projections from the FLU's projection store.
get_all_projections/3Get all projections from the FLU's projection store.
get_latest_epoch/2Get the latest epoch number + checksum from the FLU's projection store.
get_latest_epoch/3Get the latest epoch number + checksum from the FLU's projection store.
list_all_projections/2Get all epoch numbers from the FLU's projection store.
list_all_projections/3Get all epoch numbers from the FLU's projection store.
list_files/2Fetch the list of all files on the remote FLU.
list_files/3Fetch the list of all files on the remote FLU.
quit/1Quit & close the connection to remote FLU.
read_chunk/5Read a chunk of data of size Size from File at Offset.
read_chunk/6Read a chunk of data of size Size from File at Offset.
read_latest_projection/2Get the latest projection from the FLU's projection store for ProjType
read_latest_projection/3Get the latest projection from the FLU's projection store for ProjType
read_projection/3Read a projection Proj of type ProjType.
read_projection/4Read a projection Proj of type ProjType.
trunc_hack/3Restricted API: Truncate a file after it has been successfully - erasure coded.
trunc_hack/4Restricted API: Truncate a file after it has been successfully - erasure coded.
write_chunk/5Restricted API: Write a chunk of already-sequenced data to - File at Offset.
write_chunk/6Restricted API: Write a chunk of already-sequenced data to - File at Offset.
write_projection/3Write a projection Proj of type ProjType.
write_projection/4Write a projection Proj of type ProjType.
- -

Function Details

- -

append_chunk/4

-
-

append_chunk(Sock::port(), EpochID::epoch_id(), Prefix::file_prefix(), Chunk::chunk()) -> {ok, chunk_pos()} | {error, term()}

-

Append a chunk (binary- or iolist-style) of data to a file - with Prefix.

- -

append_chunk/5

-
-

append_chunk(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), Prefix::file_prefix(), Chunk::chunk()) -> {ok, chunk_pos()} | {error, term()}

-

Append a chunk (binary- or iolist-style) of data to a file - with Prefix.

- -

checksum_list/3

-
-

checksum_list(Sock::port(), EpochID::epoch_id(), File::file_name()) -> {ok, [chunk_csum()]} | {error, term()}

-

Fetch the list of chunk checksums for File.

- -

checksum_list/4

-
-

checksum_list(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), File::file_name()) -> {ok, [chunk_csum()]} | {error, term()}

-

Fetch the list of chunk checksums for File.

- -

delete_migration/3

-
-

delete_migration(Sock::port(), EpochID::epoch_id(), File::file_name()) -> ok | {error, term()}

-

Restricted API: Delete a file after it has been successfully - migrated.

- -

delete_migration/4

-
-

delete_migration(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), File::file_name()) -> ok | {error, term()}

-

Restricted API: Delete a file after it has been successfully - migrated.

- -

get_all_projections/2

-
-

get_all_projections(Sock::port(), ProjType::projection_type()) -> {ok, [projection()]} | {error, term()}

-

Get all projections from the FLU's projection store.

- -

get_all_projections/3

-
-

get_all_projections(Host::inet_host(), TcpPort::inet_port(), ProjType::projection_type()) -> {ok, [projection()]} | {error, term()}

-

Get all projections from the FLU's projection store.

- -

get_latest_epoch/2

-
-

get_latest_epoch(Sock::port(), ProjType::projection_type()) -> {ok, epoch_id()} | {error, term()}

-

Get the latest epoch number + checksum from the FLU's projection store.

- -

get_latest_epoch/3

-
-

get_latest_epoch(Host::inet_host(), TcpPort::inet_port(), ProjType::projection_type()) -> {ok, epoch_id()} | {error, term()}

-

Get the latest epoch number + checksum from the FLU's projection store.

- -

list_all_projections/2

-
-

list_all_projections(Sock::port(), ProjType::projection_type()) -> {ok, [non_neg_integer()]} | {error, term()}

-

Get all epoch numbers from the FLU's projection store.

- -

list_all_projections/3

-
-

list_all_projections(Host::inet_host(), TcpPort::inet_port(), ProjType::projection_type()) -> {ok, [non_neg_integer()]} | {error, term()}

-

Get all epoch numbers from the FLU's projection store.

- -

list_files/2

-
-

list_files(Sock::port(), EpochID::epoch_id()) -> {ok, [file_info()]} | {error, term()}

-

Fetch the list of all files on the remote FLU.

- -

list_files/3

-
-

list_files(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id()) -> {ok, [file_info()]} | {error, term()}

-

Fetch the list of all files on the remote FLU.

- -

quit/1

-
-

quit(Sock::port()) -> ok

-

Quit & close the connection to remote FLU.

- -

read_chunk/5

-
-

read_chunk(Sock::port(), EpochID::epoch_id(), File::file_name(), Offset::file_offset(), Size::chunk_size()) -> {ok, chunk_s()} | {error, term()}

-

Read a chunk of data of size Size from File at Offset.

- -

read_chunk/6

-
-

read_chunk(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), File::file_name(), Offset::file_offset(), Size::chunk_size()) -> {ok, chunk_s()} | {error, term()}

-

Read a chunk of data of size Size from File at Offset.

- -

read_latest_projection/2

-
-

read_latest_projection(Sock::port(), ProjType::projection_type()) -> {ok, projection()} | {error, not_written} | {error, term()}

-

Get the latest projection from the FLU's projection store for ProjType

- -

read_latest_projection/3

-
-

read_latest_projection(Host::inet_host(), TcpPort::inet_port(), ProjType::projection_type()) -> {ok, projection()} | {error, not_written} | {error, term()}

-

Get the latest projection from the FLU's projection store for ProjType

- -

read_projection/3

-
-

read_projection(Sock::port(), ProjType::projection_type(), Epoch::epoch_num()) -> {ok, projection()} | {error, written} | {error, term()}

-

Read a projection Proj of type ProjType.

- -

read_projection/4

-
-

read_projection(Host::inet_host(), TcpPort::inet_port(), ProjType::projection_type(), Epoch::epoch_num()) -> {ok, projection()} | {error, written} | {error, term()}

-

Read a projection Proj of type ProjType.

- -

trunc_hack/3

-
-

trunc_hack(Sock::port(), EpochID::epoch_id(), File::file_name()) -> ok | {error, term()}

-

Restricted API: Truncate a file after it has been successfully - erasure coded.

- -

trunc_hack/4

-
-

trunc_hack(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), File::file_name()) -> ok | {error, term()}

-

Restricted API: Truncate a file after it has been successfully - erasure coded.

- -

write_chunk/5

-
-

write_chunk(Sock::port(), EpochID::epoch_id(), File::file_name(), Offset::file_offset(), Chunk::chunk()) -> ok | {error, term()}

-

Restricted API: Write a chunk of already-sequenced data to - File at Offset.

- -

write_chunk/6

-
-

write_chunk(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), File::file_name(), Offset::file_offset(), Chunk::chunk()) -> ok | {error, term()}

-

Restricted API: Write a chunk of already-sequenced data to - File at Offset.

- -

write_projection/3

-
-

write_projection(Sock::port(), ProjType::projection_type(), Proj::projection()) -> ok | {error, written} | {error, term()}

-

Write a projection Proj of type ProjType.

- -

write_projection/4

-
-

write_projection(Host::inet_host(), TcpPort::inet_port(), ProjType::projection_type(), Proj::projection()) -> ok | {error, written} | {error, term()}

-

Write a projection Proj of type ProjType.

-
- - -

Generated by EDoc, Apr 8 2015, 17:31:11.

- - diff --git a/edoc/machi_flu_sup.html b/edoc/machi_flu_sup.html deleted file mode 100644 index 46a3345..0000000 --- a/edoc/machi_flu_sup.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - -Module machi_flu_sup - - - - -
- -

Module machi_flu_sup

-Supervisor for Machi FLU servers and their related support - servers. - -

Behaviours: supervisor.

- -

Description

Supervisor for Machi FLU servers and their related support - servers. -

Function Index

- - -
init/1
start_link/0
- -

Function Details

- -

init/1

-
-

init(X1) -> any()

-
- -

start_link/0

-
-

start_link() -> any()

-
-
- - -

Generated by EDoc, Apr 8 2015, 17:31:11.

- - diff --git a/edoc/machi_projection.html b/edoc/machi_projection.html deleted file mode 100644 index 59f9229..0000000 --- a/edoc/machi_projection.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - -Module machi_projection - - - - -
- -

Module machi_projection

-API for manipulating Machi projection data structures (i.e., records). - - -

Description

API for manipulating Machi projection data structures (i.e., records). -

Function Index

- - - - - - - -
compare/2Compare two projection records for equality (assuming that the - checksum element has been correctly calculated).
make_projection_summary/1Create a proplist-style summary of a projection record.
new/6Create a new projection record.
new/7Create a new projection record.
new/8Create a new projection record.
update_projection_checksum/1Update the checksum element of a projection record.
update_projection_dbg2/2Update the dbg2 element of a projection record.
- -

Function Details

- -

compare/2

-
-

compare(Projection_v1::#projection_v1{}, Projection_v1::#projection_v1{}) -> integer()

-

Compare two projection records for equality (assuming that the - checksum element has been correctly calculated).

- -

make_projection_summary/1

-
-

make_projection_summary(Projection_v1) -> any()

-

Create a proplist-style summary of a projection record.

- -

new/6

-
-

new(MyName, All_list, UPI_list, Down_list, Repairing_list, Ps) -> any()

-

Create a new projection record.

- -

new/7

-
-

new(EpochNum, MyName, All_list, Down_list, UPI_list, Repairing_list, Dbg) -> any()

-

Create a new projection record.

- -

new/8

-
-

new(EpochNum, MyName, All_list0, Down_list, UPI_list, Repairing_list, Dbg, Dbg2) -> any()

-

Create a new projection record.

- -

update_projection_checksum/1

-
-

update_projection_checksum(P) -> any()

-

Update the checksum element of a projection record.

- -

update_projection_dbg2/2

-
-

update_projection_dbg2(P, Dbg2) -> any()

-

Update the dbg2 element of a projection record.

-
- - -

Generated by EDoc, Apr 8 2015, 17:31:11.

- - diff --git a/edoc/machi_projection_store.html b/edoc/machi_projection_store.html deleted file mode 100644 index ed25ba3..0000000 --- a/edoc/machi_projection_store.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - -Module machi_projection_store - - - - -
- -

Module machi_projection_store

-The Machi write-once projection store service. - - -

Description

The Machi write-once projection store service.

- -

This API is gen_server-style message passing, intended for use -within a single Erlang node to glue together the projection store -server with the node-local process that implements Machi's TCP -client access protocol (on the "server side" of the TCP connection).

- -

All Machi client access to the projection store SHOULD NOT use this -module's API.

- - The projection store is implemented by an Erlang/OTP gen_server - process that is associated with each FLU. Conceptually, the - projection store is an array of write-once registers. For each - projection store register, the key is a 2-tuple of an epoch number - (non_neg_integer() type) and a projection type (public or - private type); the value is a projection data structure - (projection_v1() type). -

Function Index

- - - - - - - - - - - - - - - - - - - -
code_change/3
get_all_projections/2Fetch all projection records of type ProjType.
get_all_projections/3Fetch all projection records of type ProjType.
get_latest_epoch/2Fetch the latest epoch number + checksum for type ProjType.
get_latest_epoch/3Fetch the latest epoch number + checksum for type ProjType.
handle_call/3
handle_cast/2
handle_info/2
init/1
list_all_projections/2Fetch all projection epoch numbers of type ProjType.
list_all_projections/3Fetch all projection epoch numbers of type ProjType.
read/3Fetch the projection record type ProjType for epoch number Epoch .
read/4Fetch the projection record type ProjType for epoch number Epoch .
read_latest_projection/2Fetch the latest projection record for type ProjType.
read_latest_projection/3Fetch the latest projection record for type ProjType.
start_link/3Start a new projection store server.
terminate/2
write/3Write the projection record type ProjType for epoch number Epoch .
write/4Write the projection record type ProjType for epoch number Epoch .
- -

Function Details

- -

code_change/3

-
-

code_change(OldVsn, S, Extra) -> any()

-
- -

get_all_projections/2

-
-

get_all_projections(PidSpec, ProjType) -> any()

-

Fetch all projection records of type ProjType.

- -

get_all_projections/3

-
-

get_all_projections(PidSpec, ProjType, Timeout) -> any()

-

Fetch all projection records of type ProjType.

- -

get_latest_epoch/2

-
-

get_latest_epoch(PidSpec, ProjType) -> any()

-

Fetch the latest epoch number + checksum for type ProjType.

- -

get_latest_epoch/3

-
-

get_latest_epoch(PidSpec, ProjType, Timeout) -> any()

-

Fetch the latest epoch number + checksum for type ProjType. - projection.

- -

handle_call/3

-
-

handle_call(Request, From, S) -> any()

-
- -

handle_cast/2

-
-

handle_cast(Msg, S) -> any()

-
- -

handle_info/2

-
-

handle_info(Info, S) -> any()

-
- -

init/1

-
-

init(X1) -> any()

-
- -

list_all_projections/2

-
-

list_all_projections(PidSpec, ProjType) -> any()

-

Fetch all projection epoch numbers of type ProjType.

- -

list_all_projections/3

-
-

list_all_projections(PidSpec, ProjType, Timeout) -> any()

-

Fetch all projection epoch numbers of type ProjType.

- -

read/3

-
-

read(PidSpec, ProjType, Epoch) -> any()

-

Fetch the projection record type ProjType for epoch number Epoch .

- -

read/4

-
-

read(PidSpec, ProjType, Epoch, Timeout) -> any()

-

Fetch the projection record type ProjType for epoch number Epoch .

- -

read_latest_projection/2

-
-

read_latest_projection(PidSpec, ProjType) -> any()

-

Fetch the latest projection record for type ProjType.

- -

read_latest_projection/3

-
-

read_latest_projection(PidSpec, ProjType, Timeout) -> any()

-

Fetch the latest projection record for type ProjType.

- -

start_link/3

-
-

start_link(RegName, DataDir, NotifyWedgeStateChanges) -> any()

-

Start a new projection store server.

- - The DataDir argument should be the same directory as specified - for use by our companion FLU data server -- all file system paths - used by this server are intended to be stored underneath a common - file system parent directory as the FLU data server & sequencer - servers.

- -

terminate/2

-
-

terminate(Reason, S) -> any()

-
- -

write/3

-
-

write(PidSpec, ProjType, Proj) -> any()

-

Write the projection record type ProjType for epoch number Epoch .

- -

write/4

-
-

write(PidSpec, ProjType, Proj, Timeout) -> any()

-

Write the projection record type ProjType for epoch number Epoch .

-
- - -

Generated by EDoc, Apr 8 2015, 17:31:11.

- - diff --git a/edoc/machi_proxy_flu1_client.html b/edoc/machi_proxy_flu1_client.html deleted file mode 100644 index 4cf46f4..0000000 --- a/edoc/machi_proxy_flu1_client.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - -Module machi_proxy_flu1_client - - - - -
- -

Module machi_proxy_flu1_client

-Erlang API for the Machi FLU TCP protocol version 1, with a -proxy-process style API for hiding messy details such as TCP -connection/disconnection with the remote Machi server. - -

Behaviours: gen_server.

- -

Description

Erlang API for the Machi FLU TCP protocol version 1, with a -proxy-process style API for hiding messy details such as TCP -connection/disconnection with the remote Machi server.

- -

Machi is intentionally avoiding using distributed Erlang for - Machi's communication. This design decision makes Erlang-side code - more difficult & complex, but it's the price to pay for some -language independence. Later in Machi's life cycle, we need to -(re-)implement some components in a non-Erlang/BEAM-based language.

- - This module implements a "man in the middle" proxy between the - Erlang client and Machi server (which is on the "far side" of a TCP - connection to somewhere). This proxy process will always execute - on the same Erlang node as the Erlang client that uses it. The - proxy is intended to be a stable, long-lived process that survives - TCP communication problems with the remote server. -

Function Index

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
append_chunk/4Append a chunk (binary- or iolist-style) of data to a file - with Prefix.
append_chunk/5Append a chunk (binary- or iolist-style) of data to a file - with Prefix.
checksum_list/3Fetch the list of chunk checksums for File.
checksum_list/4Fetch the list of chunk checksums for File.
code_change/3
get_all_projections/2Get all projections from the FLU's projection store.
get_all_projections/3Get all projections from the FLU's projection store.
get_latest_epoch/2Get the latest epoch number + checksum from the FLU's projection store.
get_latest_epoch/3Get the latest epoch number + checksum from the FLU's projection store.
handle_call/3
handle_cast/2
handle_info/2
init/1
list_all_projections/2Get all epoch numbers from the FLU's projection store.
list_all_projections/3Get all epoch numbers from the FLU's projection store.
list_files/2Fetch the list of all files on the remote FLU.
list_files/3Fetch the list of all files on the remote FLU.
quit/1Quit & close the connection to remote FLU and stop our - proxy process.
read_chunk/5Read a chunk of data of size Size from File at Offset.
read_chunk/6Read a chunk of data of size Size from File at Offset.
read_latest_projection/2Get the latest projection from the FLU's projection store for ProjType
read_latest_projection/3Get the latest projection from the FLU's projection store for ProjType
read_projection/3Read a projection Proj of type ProjType.
read_projection/4Read a projection Proj of type ProjType.
start_link/1Start a local, long-lived process that will be our steady - & reliable communication proxy with the fickle & flaky - remote Machi server.
terminate/2
write_projection/3Write a projection Proj of type ProjType.
write_projection/4Write a projection Proj of type ProjType.
- -

Function Details

- -

append_chunk/4

-
-

append_chunk(PidSpec, EpochID, Prefix, Chunk) -> any()

-

Append a chunk (binary- or iolist-style) of data to a file - with Prefix.

- -

append_chunk/5

-
-

append_chunk(PidSpec, EpochID, Prefix, Chunk, Timeout) -> any()

-

Append a chunk (binary- or iolist-style) of data to a file - with Prefix.

- -

checksum_list/3

-
-

checksum_list(PidSpec, EpochID, File) -> any()

-

Fetch the list of chunk checksums for File.

- -

checksum_list/4

-
-

checksum_list(PidSpec, EpochID, File, Timeout) -> any()

-

Fetch the list of chunk checksums for File.

- -

code_change/3

-
-

code_change(OldVsn, S, Extra) -> any()

-
- -

get_all_projections/2

-
-

get_all_projections(PidSpec, ProjType) -> any()

-

Get all projections from the FLU's projection store.

- -

get_all_projections/3

-
-

get_all_projections(PidSpec, ProjType, Timeout) -> any()

-

Get all projections from the FLU's projection store.

- -

get_latest_epoch/2

-
-

get_latest_epoch(PidSpec, ProjType) -> any()

-

Get the latest epoch number + checksum from the FLU's projection store.

- -

get_latest_epoch/3

-
-

get_latest_epoch(PidSpec, ProjType, Timeout) -> any()

-

Get the latest epoch number + checksum from the FLU's projection store.

- -

handle_call/3

-
-

handle_call(Request, From, S) -> any()

-
- -

handle_cast/2

-
-

handle_cast(Msg, S) -> any()

-
- -

handle_info/2

-
-

handle_info(Info, S) -> any()

-
- -

init/1

-
-

init(X1) -> any()

-
- -

list_all_projections/2

-
-

list_all_projections(PidSpec, ProjType) -> any()

-

Get all epoch numbers from the FLU's projection store.

- -

list_all_projections/3

-
-

list_all_projections(PidSpec, ProjType, Timeout) -> any()

-

Get all epoch numbers from the FLU's projection store.

- -

list_files/2

-
-

list_files(PidSpec, EpochID) -> any()

-

Fetch the list of all files on the remote FLU.

- -

list_files/3

-
-

list_files(PidSpec, EpochID, Timeout) -> any()

-

Fetch the list of all files on the remote FLU.

- -

quit/1

-
-

quit(PidSpec) -> any()

-

Quit & close the connection to remote FLU and stop our - proxy process.

- -

read_chunk/5

-
-

read_chunk(PidSpec, EpochID, File, Offset, Size) -> any()

-

Read a chunk of data of size Size from File at Offset.

- -

read_chunk/6

-
-

read_chunk(PidSpec, EpochID, File, Offset, Size, Timeout) -> any()

-

Read a chunk of data of size Size from File at Offset.

- -

read_latest_projection/2

-
-

read_latest_projection(PidSpec, ProjType) -> any()

-

Get the latest projection from the FLU's projection store for ProjType

- -

read_latest_projection/3

-
-

read_latest_projection(PidSpec, ProjType, Timeout) -> any()

-

Get the latest projection from the FLU's projection store for ProjType

- -

read_projection/3

-
-

read_projection(PidSpec, ProjType, Epoch) -> any()

-

Read a projection Proj of type ProjType.

- -

read_projection/4

-
-

read_projection(PidSpec, ProjType, Epoch, Timeout) -> any()

-

Read a projection Proj of type ProjType.

- -

start_link/1

-
-

start_link(P_srvr) -> any()

-

Start a local, long-lived process that will be our steady - & reliable communication proxy with the fickle & flaky - remote Machi server.

- -

terminate/2

-
-

terminate(Reason, S) -> any()

-
- -

write_projection/3

-
-

write_projection(PidSpec, ProjType, Proj) -> any()

-

Write a projection Proj of type ProjType.

- -

write_projection/4

-
-

write_projection(PidSpec, ProjType, Proj, Timeout) -> any()

-

Write a projection Proj of type ProjType.

-
- - -

Generated by EDoc, Apr 8 2015, 17:31:11.

- - diff --git a/edoc/machi_sequencer.html b/edoc/machi_sequencer.html deleted file mode 100644 index 0956867..0000000 --- a/edoc/machi_sequencer.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - -Module machi_sequencer - - - - -
- -

Module machi_sequencer

-"Mothballed" sequencer code, perhaps to be reused sometime in - the future?. - - -

Description

"Mothballed" sequencer code, perhaps to be reused sometime in - the future?
- - -

Generated by EDoc, Apr 8 2015, 17:31:11.

- - diff --git a/edoc/machi_sup.html b/edoc/machi_sup.html deleted file mode 100644 index aaa08c6..0000000 --- a/edoc/machi_sup.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - -Module machi_sup - - - - -
- -

Module machi_sup

-Top Machi application supervisor. - -

Behaviours: supervisor.

- -

Description

Top Machi application supervisor. -

Function Index

- - -
init/1
start_link/0
- -

Function Details

- -

init/1

-
-

init(X1) -> any()

-
- -

start_link/0

-
-

start_link() -> any()

-
-
- - -

Generated by EDoc, Apr 8 2015, 17:31:11.

- - diff --git a/edoc/machi_util.html b/edoc/machi_util.html deleted file mode 100644 index f85a247..0000000 --- a/edoc/machi_util.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - -Module machi_util - - - - -
- -

Module machi_util

-Miscellaneous utility functions. - - -

Description

Miscellaneous utility functions. -

Function Index

- - - - - - - - - - - - - - - - - - - -
bin_to_hexstr/1Convert a binary() to a hexadecimal string.
checksum_chunk/1Calculate a checksum for a chunk of file data.
connect/2Create a TCP connection to a remote Machi server.
connect/3Create a TCP connection to a remote Machi server.
hexstr_to_bin/1Convert a hexadecimal string to a binary().
hexstr_to_int/1Convert a hexadecimal string to an integer.
increment_max_filenum/2Increase the file size of a config file, which is used as the - basis for a minimum sequence number.
info_msg/2Log an 'info' level message.
int_to_hexbin/2Convert an integer into a hexadecimal string (in binary() - form) whose length is based on I_size.
int_to_hexstr/2Convert an integer into a hexadecimal string whose length is - based on I_size.
make_binary/1Convert a compatible Erlang data type into a binary() equivalent.
make_checksum_filename/2Calculate a checksum file path, by common convention.
make_data_filename/2Calculate a file data file path, by common convention.
make_projection_filename/2Calculate a projection store file path, by common convention.
make_regname/1Create a registered name atom for FLU sequencer internal - rendezvous/message passing use.
make_string/1Convert a compatible Erlang data type into a string() equivalent.
read_max_filenum/2Read the file size of a config file, which is used as the - basis for a minimum sequence number.
verb/1Log a verbose message.
verb/2Log a verbose message.
- -

Function Details

- -

bin_to_hexstr/1

-
-

bin_to_hexstr(X1) -> any()

-

Convert a binary() to a hexadecimal string.

- -

checksum_chunk/1

-
-

checksum_chunk(Chunk) -> any()

-

Calculate a checksum for a chunk of file data.

- -

connect/2

-
-

connect(Host::inet:ip_address() | inet:hostname(), Port::inet:port_number()) -> port()

-

Create a TCP connection to a remote Machi server.

- -

connect/3

-
-

connect(Host::inet:ip_address() | inet:hostname(), Port::inet:port_number(), Timeout::timeout()) -> port()

-

Create a TCP connection to a remote Machi server.

- -

hexstr_to_bin/1

-
-

hexstr_to_bin(S) -> any()

-

Convert a hexadecimal string to a binary().

- -

hexstr_to_int/1

-
-

hexstr_to_int(X) -> any()

-

Convert a hexadecimal string to an integer.

- -

increment_max_filenum/2

-
-

increment_max_filenum(DataDir, Prefix) -> any()

-

Increase the file size of a config file, which is used as the - basis for a minimum sequence number.

- -

info_msg/2

-
-

info_msg(Fmt, Args) -> any()

-

Log an 'info' level message.

- -

int_to_hexbin/2

-
-

int_to_hexbin(I, I_size) -> any()

-

Convert an integer into a hexadecimal string (in binary() - form) whose length is based on I_size.

- -

int_to_hexstr/2

-
-

int_to_hexstr(I, I_size) -> any()

-

Convert an integer into a hexadecimal string whose length is - based on I_size.

- -

make_binary/1

-
-

make_binary(X) -> any()

-

Convert a compatible Erlang data type into a binary() equivalent.

- -

make_checksum_filename/2

-
-

make_checksum_filename(DataDir, FileName) -> any()

-

Calculate a checksum file path, by common convention.

- -

make_data_filename/2

-
-

make_data_filename(DataDir, File) -> any()

-

Calculate a file data file path, by common convention.

- -

make_projection_filename/2

-
-

make_projection_filename(DataDir, File) -> any()

-

Calculate a projection store file path, by common convention.

- -

make_regname/1

-
-

make_regname(Prefix) -> any()

-

Create a registered name atom for FLU sequencer internal - rendezvous/message passing use.

- -

make_string/1

-
-

make_string(X) -> any()

-

Convert a compatible Erlang data type into a string() equivalent.

- -

read_max_filenum/2

-
-

read_max_filenum(DataDir, Prefix) -> any()

-

Read the file size of a config file, which is used as the - basis for a minimum sequence number.

- -

verb/1

-
-

verb(Fmt) -> any()

-

Log a verbose message.

- -

verb/2

-
-

verb(Fmt, Args) -> any()

-

Log a verbose message.

-
- - -

Generated by EDoc, Apr 8 2015, 17:31:11.

- - diff --git a/edoc/modules-frame.html b/edoc/modules-frame.html deleted file mode 100644 index fbe4efc..0000000 --- a/edoc/modules-frame.html +++ /dev/null @@ -1,24 +0,0 @@ - - - -The machi application - - - -

Modules

- - - - - - - - - - - - - -
machi_admin_util
machi_app
machi_chain_manager1
machi_chash
machi_flu1
machi_flu1_client
machi_flu_sup
machi_projection
machi_projection_store
machi_proxy_flu1_client
machi_sequencer
machi_sup
machi_util
- - \ No newline at end of file diff --git a/edoc/overview-summary.html b/edoc/overview-summary.html deleted file mode 100644 index a29913c..0000000 --- a/edoc/overview-summary.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - -Machi: a small village of replicated files - - - - - -

Machi: a small village of replicated files -

- - -

About This EDoc Documentation

- -

This EDoc-style documentation will concern itself only with Erlang -function APIs and function & data types. Higher-level design and -commentary will remain outside of the Erlang EDoc system; please see -the "Pointers to Other Machi Documentation" section below for more -details.

- -

Readers should beware that this documentation may be out-of-sync with -the source code. When in doubt, use the make edoc command to -regenerate all HTML pages.

- -

It is the developer's responsibility to re-generate the documentation -periodically and commit it to the Git repo.

- -

Machi Code Overview

- -

Chain Manager

- -

The Chain Manager is responsible for managing the state of Machi's -"Chain Replication" state. This role is roughly analogous to the -"Riak Core" application inside of Riak, which takes care of -coordinating replica placement and replica repair.

- -

For each primitive data server in the cluster, a Machi FLU, there is a -Chain Manager process that manages its FLU's role within the Machi -cluster's Chain Replication scheme. Each Chain Manager process -executes locally and independently to manage the distributed state of -a single Machi Chain Replication chain.

- -
    - -
  • To contrast with Riak Core ... Riak Core's claimant process is - solely responsible for managing certain critical aspects of - Riak Core distributed state. Machi's Chain Manager process - performs similar tasks as Riak Core's claimant. However, Machi - has several active Chain Manager processes, one per FLU server, - instead of a single active process like Core's claimant. Each - Chain Manager process acts independently; each is constrained - so that it will reach consensus via independent computation - & action.

    - - Full discussion of this distributed consensus is outside the - scope of this document; see the "Pointers to Other Machi - Documentation" section below for more information. -
  • -
  • Machi differs from a Riak Core application because Machi's - replica placement policy is simply, "All Machi servers store - replicas of all Machi files". - Machi is intended to be a primitive building block for creating larger - cluster-of-clusters where files are - distributed/fragmented/sharded across a large pool of - independent Machi clusters. -
  • -
  • See - https://www.usenix.org/legacy/events/osdi04/tech/renesse.html - for a copy of the paper, "Chain Replication for Supporting High - Throughput and Availability" by Robbert van Renesse and Fred - B. Schneider. -
  • -
- -

FLU

- -

The FLU is the basic storage server for Machi.

- -
    -
  • The name FLU is taken from "flash storage unit" from the paper - "CORFU: A Shared Log Design for Flash Clusters" by - Balakrishnan, Malkhi, Prabhakaran, and Wobber. See - https://www.usenix.org/conference/nsdi12/technical-sessions/presentation/balakrishnan -
  • -
  • In CORFU, the sequencer step is a prerequisite step that is - performed by a separate component, the Sequencer. - In Machi, the append_chunk() protocol message has - an implicit "sequencer" operation applied by the "head" of the - Machi Chain Replication chain. If a client wishes to write - data that has already been assigned a sequencer position, then - the write_chunk() API function is used. -
  • -
- -

For each FLU, there are three independent tasks that are implemented -using three different Erlang processes:

- -
    -
  • A FLU server, implemented primarily by machi_flu.erl. -
  • -
  • A projection store server, implemented primarily by - machi_projection_store.erl. -
  • -
  • A chain state manager server, implemented primarily by - machi_chain_manager1.erl. -
  • -
- -

From the perspective of failure detection, it is very convenient that -all three FLU-related services (file server, sequencer server, and -projection server) are accessed using the same single TCP port.

- -

Projection (data structure)

- -

The projection is a data structure that specifies the current state -of the Machi cluster: all FLUs, which FLUS are considered -up/running or down/crashed/stopped, which FLUs are actively -participants in the Chain Replication protocol, and which FLUs are -under "repair" (i.e., having their data resyncronized when -newly-added to a cluster or when restarting after a crash).

- -

Projection Store (server)

- -

The projection store is a storage service that is implemented by an -Erlang/OTP gen_server process that is associated with each -FLU. Conceptually, the projection store is an array of -write-once registers. For each projection store register, the -key is a 2-tuple of an epoch number (non_neg_integer() type) -and a projection type (public or private type); the value is -a projection data structure (projection_v1() type).

- -

Client and Proxy Client

- -

Machi is intentionally avoiding using distributed Erlang for Machi's -communication. This design decision makes Erlang-side code more -difficult & complex but allows us the freedom of implementing -parts of Machi in other languages without major -protocol&API&glue code changes later in the product's -lifetime.

- -

There are two layers of interface for Machi clients.

- -
    -
  • The machi_flu1_client module implements an API that uses a - TCP socket directly. -
  • -
  • The machi_proxy_flu1_client module implements an API that - uses a local, long-lived gen_server process as a proxy for - the remote, perhaps disconnected-or-crashed Machi FLU server. -
  • -
- -

The types for both modules ought to be the same. However, due to -rapid code churn, some differences might exist. Any major difference -is (almost by definition) a bug: please open a GitHub issue to request -a correction.

- -

TODO notes

- -

Any use of the string "TODO" in upper/lower/mixed case, anywhere in -the code, is a reminder signal of unfinished work.

- -

Pointers to Other Machi Documentation

- -
    -
  • If you are viewing this document locally, please look in the - ../doc/ directory, -
  • -
  • If you are viewing this document via the Web, please find the - documentation via this link: - http://github.com/basho/machi/tree/master/doc/ - Please be aware that this link points to the master branch - of the Machi source repository and therefore may be - out-of-sync with non-master branch code. -
  • - -
- -
- -

Generated by EDoc, Apr 8 2015, 17:31:11.

- - diff --git a/edoc/overview.edoc b/edoc/overview.edoc deleted file mode 100644 index 04cf4cc..0000000 --- a/edoc/overview.edoc +++ /dev/null @@ -1,14 +0,0 @@ - -@title Machi: a small village of replicated files - -@doc - -Documentation for Machi is an ongoing challenge. Much of the -high-level design & commentary are outside of the Erlang EDoc system - -Zoom2 zoom zoom zoom boom boom boom boom - -Rumba tango Rumba tango Rumba tango Rumba tango Rumba tango Rumba -tango Rumba tango Rumba tango Rumba tango Rumba tango Rumba tango -Rumba tango Rumba tango Rumba tango Rumba tango Rumba tango Rumba -tango Rumba tango Rumba tango Rumba tango Rumba tango diff --git a/edoc/packages-frame.html b/edoc/packages-frame.html deleted file mode 100644 index 189d01c..0000000 --- a/edoc/packages-frame.html +++ /dev/null @@ -1,11 +0,0 @@ - - - -The machi application - - - -

Packages

-
- - \ No newline at end of file diff --git a/edoc/stylesheet.css b/edoc/stylesheet.css deleted file mode 100644 index e426a90..0000000 --- a/edoc/stylesheet.css +++ /dev/null @@ -1,55 +0,0 @@ -/* standard EDoc style sheet */ -body { - font-family: Verdana, Arial, Helvetica, sans-serif; - margin-left: .25in; - margin-right: .2in; - margin-top: 0.2in; - margin-bottom: 0.2in; - color: #000000; - background-color: #ffffff; -} -h1,h2 { - margin-left: -0.2in; -} -div.navbar { - background-color: #add8e6; - padding: 0.2em; -} -h2.indextitle { - padding: 0.4em; - background-color: #add8e6; -} -h3.function,h3.typedecl { - background-color: #add8e6; - padding-left: 1em; -} -div.spec { - margin-left: 2em; - background-color: #eeeeee; -} -a.module,a.package { - text-decoration:none -} -a.module:hover,a.package:hover { - background-color: #eeeeee; -} -ul.definitions { - list-style-type: none; -} -ul.index { - list-style-type: none; - background-color: #eeeeee; -} - -/* - * Minor style tweaks - */ -ul { - list-style-type: square; -} -table { - border-collapse: collapse; -} -td { - padding: 3 -}