machi/edoc/machi_flu_psup.html

113 lines
5.3 KiB
HTML
Raw Normal View History

2015-05-20 02:14:55 +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_flu_psup</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_flu_psup</h1>
2015-05-20 03:37:28 +00:00
<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>Supervisor for Machi FLU servers and their related support
servers.
2015-05-20 02:14:55 +00:00
<p><b>Behaviours:</b> <a href="supervisor.html"><tt>supervisor</tt></a>.</p>
2015-05-20 03:37:28 +00:00
<h2><a name="description">Description</a></h2><p>Supervisor for Machi FLU servers and their related support
servers.</p>
<p>Our parent supervisor, <a href="machi_flu_sup.html"><code>machi_flu_sup</code></a>, is responsible for
managing FLUs as a single entity. However, the actual
implementation of a FLU includes three major Erlang processes (not
including support/worker procs): the FLU itself, the FLU's
projection store, and the FLU's local chain manager. This
supervisor is responsible for managing those three major services
as a single "package", to be started &amp; stopped together.</p>
2015-05-20 03:51:25 +00:00
<p>The illustration below shows the OTP process supervision tree for
the Machi application. Two FLUs are running, called <code>a</code> and <code>b</code>.
The chain is configured for a third FLU, <code>c</code>, which is not running
at this time.</p>
<p><img src="/machi//images/supervisor-2flus.png"></p>
<ul>
<li> The FLU process itself is named <code>a</code>.
</li>
<li> The projection store process is named <code>a_pstore</code>.
</li>
<li> The chain manager process is named <code>a_chmgr</code>. The three
linked subprocesses are long-lived <a href="machi_proxy_flu1_client.html"><code>machi_proxy_flu1_client</code></a> processes for communicating to all
chain participants' projection stores (including the local
store <code>a_pstore</code>).
</li>
<li> A fourth major process, <code>a_listener</code>, which is responsible for
listening on a TCP socket and creating new connections.
Currently, each listener has two processes handling incoming
requests, one from each chain manager proxy.
</li>
<li> Note that the sub-supervisor parent of <code>a</code> and <code>a_listener</code> does
not have a registered name.
</li>
</ul>
2015-05-20 02:14:55 +00:00
<h2><a name="index">Function Index</a></h2>
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#init-1">init/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#make_mgr_supname-1">make_mgr_supname/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#make_p_regname-1">make_p_regname/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#make_package_spec-4">make_package_spec/4</a></td><td></td></tr>
<tr><td valign="top"><a href="#make_proj_supname-1">make_proj_supname/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#start_flu_package-4">start_flu_package/4</a></td><td></td></tr>
<tr><td valign="top"><a href="#start_link-4">start_link/4</a></td><td></td></tr>
<tr><td valign="top"><a href="#stop_flu_package-1">stop_flu_package/1</a></td><td></td></tr>
</table>
<h2><a name="functions">Function Details</a></h2>
<h3 class="function"><a name="init-1">init/1</a></h3>
<div class="spec">
<p><tt>init(X1) -&gt; any()</tt></p>
</div>
<h3 class="function"><a name="make_mgr_supname-1">make_mgr_supname/1</a></h3>
<div class="spec">
<p><tt>make_mgr_supname(MgrName) -&gt; any()</tt></p>
</div>
<h3 class="function"><a name="make_p_regname-1">make_p_regname/1</a></h3>
<div class="spec">
<p><tt>make_p_regname(FluName) -&gt; any()</tt></p>
</div>
<h3 class="function"><a name="make_package_spec-4">make_package_spec/4</a></h3>
<div class="spec">
<p><tt>make_package_spec(FluName, TcpPort, DataDir, Props) -&gt; any()</tt></p>
</div>
<h3 class="function"><a name="make_proj_supname-1">make_proj_supname/1</a></h3>
<div class="spec">
<p><tt>make_proj_supname(ProjName) -&gt; any()</tt></p>
</div>
<h3 class="function"><a name="start_flu_package-4">start_flu_package/4</a></h3>
<div class="spec">
<p><tt>start_flu_package(FluName, TcpPort, DataDir, Props) -&gt; any()</tt></p>
</div>
<h3 class="function"><a name="start_link-4">start_link/4</a></h3>
<div class="spec">
<p><tt>start_link(FluName, TcpPort, DataDir, Props) -&gt; any()</tt></p>
</div>
<h3 class="function"><a name="stop_flu_package-1">stop_flu_package/1</a></h3>
<div class="spec">
<p><tt>stop_flu_package(FluName) -&gt; any()</tt></p>
</div>
<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-05-20 02:14:55 +00:00
</body>
</html>