gnunet-handbook

The GNUnet Handbook
Log | Files | Refs

commit 5c20e0aaa95c7cebc225d02231221d18fdcbdb53
parent 7a3306788f1d0f366e796447217a5341af0d9234
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date:   Wed, 13 Dec 2023 19:42:05 +0100

remove fcfsd

Diffstat:
Mdevelopers/apis/gns.rst | 134-------------------------------------------------------------------------------
1 file changed, 0 insertions(+), 134 deletions(-)

diff --git a/developers/apis/gns.rst b/developers/apis/gns.rst @@ -436,138 +436,4 @@ namely the single threaded implementation and inefficient, sequential calls of gnunet-namestore. In the future a solution that uses the C API would be cleaner and better. -.. _Registering-names-using-the-FCFS-daemon: - -Registering names using the FCFS daemon -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -This section describes FCFSD, a daemon used to associate names with PKEY -records following a "First Come, First Served" policy. This policy means -that a certain name can not be registered again if someone registered it -already. - -The daemon can be started by using ``gnunet-namestore-fcfsd``, which -will start a simple HTTP server on localhost, using a port specified by -the ``HTTPORT`` value in its configuration. - -Communication is performed by sending GET or POST requests to specific -paths ("endpoints"), as described in the following sections. - -The daemon will always respond with data structured using the JSON -format. The fields to be expected will be listed for each endpoint. - -The only exceptions are for the "root" endpoint (i.e. ``/``) which will -return a HTML document, and two other HTML documents which will be -served when certain errors are encountered, like when requesting an -unknown endpoint. - -FCFSD GET requests -.. _Obtaining-information-from-the-daemon: - -Obtaining information from the daemon -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -To query the daemon, a GET request must be sent to these endpoints, -placing parameters in the address as per the HTTP specification, like -so: - -:: - - GET /endpoint?param1=value&param2=value - -Each endpoint will be described using its name (``/endpoint`` in the -example above), followed by the name of each parameter (like ``param1`` -and ``param2``.) - - -**Endpoint: /search** :bolditalic:`name` - This endpoint is used to query about the state of <name>, that is, - whether it is available for registration or not. - - The response JSON will contain two fields: - - - error - - - free - - ``error`` can be either the string ``"true"`` or the string - ``"false"``: when ``"true"``, it means there was an error within the - daemon and the name could not be searched at all. - - ``free`` can be either the string ``"true"`` or the string - ``"false"``: when ``"true"``, the requested name can be registered. - -FCFSD POST requests -.. _Submitting-data-to-the-daemon: - -Submitting data to the daemon -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -To send data to the daemon, a POST request must be sent to these -endpoints, placing the data to submit in the body of the request, -structured using the JSON format, like so: - -:: - - POST /endpoint - Content-Type: application/json - ... - - {"param1": value1, "param2": value2, ...} - -Each endpoint will be described using its name (``/endpoint`` in the -example above), followed by the name of each JSON field (like ``param1`` -and ``param2``.) - -**Endpoint: /register** :bolditalic:`name key` - This endpoint is used to register a new association between <name> - and <key>. - - For this operation to succeed, both <NAME> and <KEY> **must not** be - registered already. - - The response JSON will contain two fields: - - - error - - - message - - ``error`` can be either the string ``"true"`` or the string - ``"false"``: when ``"true"``, it means the name could not be - registered. Clients can get the reason of the failure from the HTTP - response code or from the ``message`` field. - - ``message`` is a string which can be used by clients to let users - know the result of the operation. It might be localized to the daemon - operator's locale. - -.. _Customizing-the-HTML-output: - -Customizing the HTML output -^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -In some situations, the daemon will serve HTML documents instead of JSON -values. It is possible to configure the daemon to serve custom documents -instead of the ones provided with GNUnet, by setting the ``HTMLDIR`` -value in its configuration to a directory path. - -Within the provided path, the daemon will search for these three files: - -- fcfsd-index.html - -- fcfsd-notfound.html - -- fcfsd-forbidden.html - -The ``fcfsd-index.html`` file is the daemon's "homepage": operators -might want to provide information about the service here, or provide a -form with which it is possible to register a name. - -The ``fcfsd-notfound.html`` file is used primarily to let users know -they tried to access an unknown endpoint. - -The ``fcfsd-forbidden.html`` file is served to users when they try to -access an endpoint they should not access. For example, sending an -invalid request might result in this page being served. - .. |ascension| image:: /images/ascension_ssd.png