Current section
Files
Jump to
Current section
Files
doc/overview-summary.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Safe and Fast Bloom Filter</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>
<h1>Safe and Fast Bloom Filter</h1>
<p>Copyright © 2018-2020 Maxim Molchanov</p>
<p><b>Version:</b> 2.1.0</p>
<p><b>Authors:</b> Maxim Molchanov (<a href="mailto:m.molchanov@vonmo.com"><tt>m.molchanov@vonmo.com</tt></a>).</p>
<p>erbloom is a safe and fast Bloom filter (Including Forgetful filters and False Positive Rate option) for Erlang/Elixir</p>
<p><b>Updated</b>: May 25 2020</p>
<h3><a name="Contents">Contents</a></h3>
<ol>
<li><a href="#Using_as_a_lib">Using as a lib</a></li>
<li><a href="#API_overview">API overview</a></li>
<li><a href="#Docker-based_sandbox">Docker-based sandbox</a></li>
<li><a href="#Contributors">Contributors</a></li>
</ol>
<h3><a name="Using_as_a_lib_in_Erlang">Using as a lib in Erlang</a></h3>
<p><b>rebar.conf:</b><br>
{erbloom, "2.1.0-rc.0"}
<br>or<br>
{erbloom, ".*", {git, "https://github.com/Vonmo/erbloom.git", {tag, "v2.1.0"}}}</p>
<p><b>erlang.mk:</b><br>
dep_erbloom = hex 2.1.0-rc.0</p>
<p><b>mix.exs:</b><br>
{:erbloom, "~> 2.1.0-rc.0"}</p>
<h3><a name="Workflow">Workflow</a></h3><p>
Now you can create a new filter instance:<br>
{ok, Filter} = <a href="bloom.html#new-2"><b>bloom:new</b></a>(9585059,1000000).
or filter with wanted rate of false positives: <a href="bloom.html#new_optimal-2"><b>bloom:new_optimal</b></a>(1000000, 0.55).</p>
<p>Create a new forgetful filter:<br>
{ok, Filter} = <a href="bloom.html#new_forgetful-4"><b>bloom:new_forgetful</b></a>(BitmapSize, ItemsCount, NumFilters, RotateAfter).
or with fp_rate: <a href="bloom.html#new_forgetful_optimal-4"><b>bloom:new_forgetful_optimal</b></a>(ItemsCount, NumFilters, RotateAfter, FpRate).</p>
<p>Set a new element:<br>
ok | true = <a href="bloom.html#set-2"><b>bloom:set</b></a>(Filter, "somekey").</p>
<p>Check up element:<br>
true | false = <a href="bloom.html#check-2"><b>bloom:check</b></a>(Filter, "anotherkey").</p>
<p>Serialize:<br>
{ok, Binary} = <a href="bloom.html#serialize-1"><b>bloom:serialize</b></a>(Filter).</p>
<p>Deserialize:<br>
<a href="bloom.html#deserialize-1"><b>bloom:deserialize</b></a>(Binary).</p>
<h3><a name="Docker-based_sandbox">Docker-based sandbox</a></h3>
<p><i>make build_imgs</i> - build docker images</p>
<p><i>make up</i> - run sandbox</p>
<p><i>make down</i> - terminate sandbox</p>
<p><i>make tests</i> - run tests</p>
<p><i>make lint</i> - linter</p>
<p><i>make xref</i> - xref analysis</p>
<p><i>make prod</i> - generate release for target</p>
<p><i>make doc</i> - generate documentation from EDoc</p>
<h3><a name="Contributors">Contributors</a></h3>
<ul>
<li><a href="https://github.com/Vagabond" target="_blank">Andrew Thompson</a></li>
<li><a href="https://github.com/russelldb" target="_blank">Russell Brown</a></li>
</ul>
<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>
<p><i>Generated by EDoc</i></p>
</body>
</html>