[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet-scheme] 187/324: doc: Document the ‘network size estimation’ API
From: |
gnunet |
Subject: |
[gnunet-scheme] 187/324: doc: Document the ‘network size estimation’ API. |
Date: |
Tue, 21 Sep 2021 13:23:47 +0200 |
This is an automated email from the git hooks/post-receive script.
maxime-devos pushed a commit to branch master
in repository gnunet-scheme.
commit ac352798ac978e5ee242de66a043dfdcbe74ed06
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Thu Aug 19 21:29:27 2021 +0200
doc: Document the ‘network size estimation’ API.
* doc/scheme-gnunet.tm (Estimation of the size of the network):
Unstub.
---
doc/scheme-gnunet.tm | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 50 insertions(+), 2 deletions(-)
diff --git a/doc/scheme-gnunet.tm b/doc/scheme-gnunet.tm
index 607c87c..7157d0b 100644
--- a/doc/scheme-gnunet.tm
+++ b/doc/scheme-gnunet.tm
@@ -258,8 +258,56 @@
<section|Estimation of the size of the network>
- GNUnet has a service that roughly estimates the size of the network \U
- i.e., the number of peers
+ <index|network size estimation>GNUnet has a service that roughly estimates
+ the size of the network \U i.e., the number of peers.<space|1em>The module
+ <scm|(gnu gnunet nse client)> can be used to interact with this
+ service.<space|1em>The connection is made with the procedure <scm|connect>,
+ which is accepts a <with|font-shape|italic|configuration> (see
+ <todo|reference>) and some optional keyword arguments.<space|1em>This
+ procedure can be called as <scm|(connect config #:updated updated
+ #:connected connected)>.<space|1em>It returns a <with|font-shape|italic|NSE
+ server object>.
+
+ The connection is made asynchronuously; the thunk <var|updated> will be
+ called when the connection has actually been made.<space|1em>Whenever a new
+ estimate becomes available, the (optional) procedure <var|connected> is
+ called with the new
<with|font-shape|italic|estimate>.<space|1em>Alternatively,
+ the procedure <scm|estimate> can be called on the server object to return
+ the latest available estimate.<space|1em>If the
+ <with|font-shape|italic|server object> doesn't have an estimate yet, that
+ procedure will return <scm|#false> instead of an estimate.
+
+ The estimate object has a number of accessors:
+
+ <\explain>
+ <scm|(estimate:logarithmic-number-peers <var|estimate>)>
+ </explain|The base-2 logarithm of the number of peers (estimated), as a
+ flonum>
+
+ <\explain>
+ <scm|(estimate:number-peers <var|estimate>)>
+ </explain|The number of peers (estimated), as a flonum.<space|1em>This is
+ not necessarily an (inexact) <scm|integer?>, as it is only an estimate.>
+
+ <\explain>
+ <scm|(estimate:timestamp estimate)>
+ </explain|A timestamp when the estimate was made <todo|something about
+ epoch?>>
+
+ <\explain>
+ <scm|(estimate:standard-deviation <var|estimate>)>
+ </explain|The estimated standard deviation on the base-2 logarithm of
+ peers, calculated over the last 64 rounds, with the <math|<frac|N|N-1>>
+ correction.>
+
+ Assuming the network size is stable and the errors on the logarithmic
+ estimate are normally distributed, the procedure
+ <scm|estimate:standard-deviation> can be used to put probablistic error
+ bounds on the number of peers on the network. <todo|example>
+
+ <todo|reconnecting, disconnecting, <text-dots>>
+
+ <todo|what if the server sends bogus data (e.g. negative)>
<chapter|Implementation details>
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet-scheme] 184/324: cmsg: Fix broken tests., (continued)
- [gnunet-scheme] 184/324: cmsg: Fix broken tests., gnunet, 2021/09/21
- [gnunet-scheme] 185/324: tests/utils: Use set-value! instead of hashtable-set!., gnunet, 2021/09/21
- [gnunet-scheme] 163/324: util/time: Add time units and implement bounded exponential back-off., gnunet, 2021/09/21
- [gnunet-scheme] 169/324: mq-stream: Allow turning ports into message queues., gnunet, 2021/09/21
- [gnunet-scheme] 177/324: nse/client: Implement connecting to the NSE service., gnunet, 2021/09/21
- [gnunet-scheme] 181/324: ROADMAP: Start a TODO list for version 0.1., gnunet, 2021/09/21
- [gnunet-scheme] 183/324: tests/utils: Use a better hash function., gnunet, 2021/09/21
- [gnunet-scheme] 182/324: doc: Document the asynchronuousity of connecting., gnunet, 2021/09/21
- [gnunet-scheme] 189/324: ROADMAP: Mark ‘Document NSE’ as done, gnunet, 2021/09/21
- [gnunet-scheme] 188/324: nse/client: Document the optionality of callbacks., gnunet, 2021/09/21
- [gnunet-scheme] 187/324: doc: Document the ‘network size estimation’ API.,
gnunet <=
- [gnunet-scheme] 197/324: mq-impl/stream: Stop all fibers when EOF is reached (part 2)., gnunet, 2021/09/21
- [gnunet-scheme] 165/324: mq-impl/stream: Implement connecting to unix sockets., gnunet, 2021/09/21
- [gnunet-scheme] 171/324: util/struct: Define /time-absolute., gnunet, 2021/09/21
- [gnunet-scheme] 168/324: README: Remove paragraph about avoiding callbacks., gnunet, 2021/09/21
- [gnunet-scheme] 175/324: mq/handler: Handle the case where no handler exists., gnunet, 2021/09/21
- [gnunet-scheme] 178/324: Makefile.am: Compile with more optimisations., gnunet, 2021/09/21
- [gnunet-scheme] 174/324: nse/struct: Add missing imports., gnunet, 2021/09/21
- [gnunet-scheme] 186/324: nse: Allow 'updated' to be absent., gnunet, 2021/09/21
- [gnunet-scheme] 166/324: guix: Use fixed version of guile., gnunet, 2021/09/21
- [gnunet-scheme] 176/324: tests/utils: New utilities for tests., gnunet, 2021/09/21