2015-04-08 08:52:58 +00:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
|
<title>Module machi_flu1</title>
|
|
|
|
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
|
|
|
|
</head>
|
|
|
|
<body bgcolor="white">
|
|
|
|
<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
<h1>Module machi_flu1</h1>
|
|
|
|
<ul class="index"><li><a href="#description">Description</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>The Machi FLU file server + file location sequencer.
|
|
|
|
|
|
|
|
|
|
|
|
<h2><a name="description">Description</a></h2><p>The Machi FLU file server + file location sequencer.</p>
|
|
|
|
|
|
|
|
<p>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.</p>
|
|
|
|
|
2015-05-20 03:37:28 +00:00
|
|
|
<p>The FLU is named after the CORFU server "FLU" or "FLash Unit" server.</p>
|
|
|
|
|
|
|
|
<h4><a name="Protocol_origins">Protocol origins</a></h4>
|
|
|
|
|
|
|
|
<p>The protocol implemented here is an artisanal, hand-crafted, silly
|
|
|
|
thing that was very quick to put together for a "demo day" proof of
|
|
|
|
concept. It will almost certainly be replaced with something else,
|
|
|
|
both in terms of wire format and better code separation of
|
|
|
|
serialization/deserialization vs. network transport management,
|
|
|
|
etc.</p>
|
|
|
|
|
|
|
|
<p>For the moment, this module implements a rudimentary TCP-based
|
2015-04-08 08:52:58 +00:00
|
|
|
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.</p>
|
|
|
|
|
2015-05-20 03:37:28 +00:00
|
|
|
<h4><a name="TODO_items">TODO items</a></h4>
|
2015-04-08 08:52:58 +00:00
|
|
|
|
2015-05-20 02:14:55 +00:00
|
|
|
<p>TODO There is a major missing feature in this FLU implementation:
|
2015-04-08 08:52:58 +00:00
|
|
|
there is no "write-once" enforcement for any position in a Machi
|
|
|
|
file. At the moment, we rely on correct behavior of the client
|
2015-05-20 02:14:55 +00:00
|
|
|
& 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.</p>
|
|
|
|
|
|
|
|
<p>TODO The per-file metadata tuple store is missing from this implementation.</p>
|
|
|
|
|
|
|
|
<p>TODO Section 4.1 ("The FLU") of the Machi design doc suggests that
|
|
|
|
the FLU keep track of the epoch number of the last file write (and
|
|
|
|
perhaps last metadata write), as an optimization for inter-FLU data
|
|
|
|
replication/chain repair.</p>
|
|
|
|
|
|
|
|
TODO Section 4.2 ("The Sequencer") says that the sequencer must
|
|
|
|
change its file assignments to new & unique names whenever we move
|
|
|
|
to wedge state. This is not yet implemented. In the current
|
|
|
|
Erlang process scheme (which will probably be changing soon), a
|
|
|
|
simple implementation would stop all existing processes that are
|
|
|
|
running run_seq_append_server().
|
2015-04-08 08:52:58 +00:00
|
|
|
<h2><a name="index">Function Index</a></h2>
|
2015-05-20 02:14:55 +00:00
|
|
|
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#make_listener_regname-1">make_listener_regname/1</a></td><td></td></tr>
|
|
|
|
<tr><td valign="top"><a href="#make_projection_server_regname-1">make_projection_server_regname/1</a></td><td></td></tr>
|
|
|
|
<tr><td valign="top"><a href="#start_link-1">start_link/1</a></td><td></td></tr>
|
2015-04-08 08:52:58 +00:00
|
|
|
<tr><td valign="top"><a href="#stop-1">stop/1</a></td><td></td></tr>
|
2015-05-20 02:14:55 +00:00
|
|
|
<tr><td valign="top"><a href="#update_wedge_state-3">update_wedge_state/3</a></td><td></td></tr>
|
2015-04-08 08:52:58 +00:00
|
|
|
</table>
|
|
|
|
|
|
|
|
<h2><a name="functions">Function Details</a></h2>
|
|
|
|
|
2015-05-20 02:14:55 +00:00
|
|
|
<h3 class="function"><a name="make_listener_regname-1">make_listener_regname/1</a></h3>
|
|
|
|
<div class="spec">
|
|
|
|
<p><tt>make_listener_regname(BaseName) -> any()</tt></p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h3 class="function"><a name="make_projection_server_regname-1">make_projection_server_regname/1</a></h3>
|
|
|
|
<div class="spec">
|
|
|
|
<p><tt>make_projection_server_regname(BaseName) -> any()</tt></p>
|
|
|
|
</div>
|
|
|
|
|
2015-04-08 08:52:58 +00:00
|
|
|
<h3 class="function"><a name="start_link-1">start_link/1</a></h3>
|
|
|
|
<div class="spec">
|
|
|
|
<p><tt>start_link(Rest) -> any()</tt></p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h3 class="function"><a name="stop-1">stop/1</a></h3>
|
|
|
|
<div class="spec">
|
|
|
|
<p><tt>stop(Pid) -> any()</tt></p>
|
|
|
|
</div>
|
2015-05-20 02:14:55 +00:00
|
|
|
|
|
|
|
<h3 class="function"><a name="update_wedge_state-3">update_wedge_state/3</a></h3>
|
|
|
|
<div class="spec">
|
|
|
|
<p><tt>update_wedge_state(PidSpec, Boolean, EpochId) -> any()</tt></p>
|
|
|
|
</div>
|
2015-04-08 08:52:58 +00:00
|
|
|
<hr>
|
|
|
|
|
|
|
|
<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
|
2015-05-20 03:51:25 +00:00
|
|
|
<p><i>Generated by EDoc, May 20 2015, 12:50:53.</i></p>
|
2015-04-08 08:52:58 +00:00
|
|
|
</body>
|
|
|
|
</html>
|