Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Documentation #33

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/dtnd/configuration.toml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ endpoint = ":4556"

# Specify routing algorithm
[routing]
# One of "epidemic", "spray", "binary_sparay", "dtlsr", "prophet", "sensor-mule"
# One of ["epidemic", "spray", "binary_spray", "dtlsr", "prophet", "sensor-mule"]
algorithm = "epidemic"


Expand Down
17 changes: 17 additions & 0 deletions docs/agents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!--
SPDX-FileCopyrightText: 2021 Markus Sommer

SPDX-License-Identifier: GPL-3.0-or-later
-->

# Application Agents

## Web Server

### REST-interface

Specify the endpoints

### WebSockets-interface

Same here
73 changes: 73 additions & 0 deletions docs/config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<!--
SPDX-FileCopyrightText: 2021 Markus Sommer

SPDX-License-Identifier: GPL-3.0-or-later
-->

# Daemon Configuration

Here, we'll go over the [sample config-file](https://github.com/dtn7/dtn7-go/blob/master/cmd/dtnd/configuration.toml) and explain the available options in-depth.

## [core]

### store

Path to the on-disk store used to persis bundles, may be either a relative or absolute path.
CryptoCopter marked this conversation as resolved.
Show resolved Hide resolved

The store consist of a [badgerhold](https://github.com/timshannon/badgerhold) database for metadata, the bundle contents are written directly to disk.

### inspect-all-bundles

Hell if I know what that does....
CryptoCopter marked this conversation as resolved.
Show resolved Hide resolved

### node-id

Public name of the node. Will be set as the default Endoint id for all CLAs, unless a different one has been speified.
CryptoCopter marked this conversation as resolved.
Show resolved Hide resolved

According to the [standard](https://tools.ietf.org/html/draft-ietf-dtn-bpbis-31#section-4.2.5.1.1), your ID should be:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Node ID must be an unique identifier, as specified in section 4.2.5.2. Thus, it cannot be the null endpoint or a multicast address.


- `dtn:none`, if you are actually nothing
- `dtn://` + the actual name + `/` <- for a unicast enpoint
- `dtn://~` + the name of your multicast group + `/` <- for something that is not a unicast enpoint (it does not neccessarily have to be a multicast group, but that's the only use case I can think off the top of my head)

You might also use the [other](https://tools.ietf.org/html/draft-ietf-dtn-bpbis-31#section-4.2.5.1.2) adressing scheme, but we can't guarantee that such behaviour won't lead to death and/or dismemberment.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if I also dislike the ipn URI scheme, it should be properly implemented and should work as well. Thus, no need for such harsh words.


## [logging]

## [discovery]

## [agents]

## [[listen]]

## [[peer]]

## [routing]

Select the routing algorithm, you can choose on from the list `["epidemic", "spray", "binary_spray", "dtlsr", "prophet", "sensor-mule"]`

### epidemic

*Epidemic Routing* is the simplest delay-tolerant routing algorithm.
Alls bundles are always sent to all peers, which gives the best delivery probabilty, but also the highest overhead.
CryptoCopter marked this conversation as resolved.
Show resolved Hide resolved
Note that `dtnd` keeps track of peers who have already been sent a specific bundle, so each bundle should nly be forwarded to each peer once.
CryptoCopter marked this conversation as resolved.
Show resolved Hide resolved

### spray

The *Spray & Wait* routing algorithm.

### binary_spray

The *Binary Spray & Wait* routing algorithm.

### dtlsr

The *Delay-Tolerant Link-State Routing* algorithm.

### prophet

The *PRoPHET* routing algorithm.

### sensor-mule

For dtn over equine carriers.
7 changes: 7 additions & 0 deletions docs/dtn-tool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
SPDX-FileCopyrightText: 2021 Markus Sommer

SPDX-License-Identifier: GPL-3.0-or-later
-->

# Use the `dtn-tool` or die trying
18 changes: 18 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!--
SPDX-FileCopyrightText: 2021 Markus Sommer

SPDX-License-Identifier: GPL-3.0-or-later
-->

# dtn7-go Documentation

Here be dragons.

## Contents

| Topic | Description |
|:--------------------------------|:------------------------------------------------------------------------|
| [Installation](install.md) | Instructions for manual & automatic installations |
| [Configuration](config.md) | Explanation of the `dtnd` configuration options |
| [Application Agents](agents.md) | APIs of the provided *Application Agents* |
| [dtn-tool](dtn-tool.md) | How to use use the dtn tool, because it's not really all that intuitive |
58 changes: 58 additions & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<!--
SPDX-FileCopyrightText: 2021 Markus Sommer

SPDX-License-Identifier: GPL-3.0-or-later
-->

# Installation Instructions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about providing a dockerized / Kubernetes option? I'd be interested in working on that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mogren: I would be very happy about a short documentation and a possible example of use. Thanks a lot for your help.

By the way, there are already two Dockerfiles for dnt7-go. One from @jonashoechst exists for CORE in the tutorial branch. Another one is in the dtn7-playground repository. Thus, there should already be some inspiration for the Docker part.


## Manual

- Install the *Go Programming language*, either through your package manager, or from [here](https://golang.org/dl/).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps add a note to always use the latest release or at least one greater than 1.13.

- Clone the [source repository](https://github.com/dtn7/dtn7-go).
- Check out the most recent release tag. Or don't and just build the `HEAD`, but we don't promise that it won't be broken.
- (Optional) Run `GO111MODULE=on go test ./...` in the repository root to make sur we didn't screw up too badly.
CryptoCopter marked this conversation as resolved.
Show resolved Hide resolved
- Run `GO111MODULE=on go build ./...` in the repositry root to build both `dtnd` and `dtn-tool`
CryptoCopter marked this conversation as resolved.
Show resolved Hide resolved

If you want to run `dtnd` as a service, you might also want to do the following:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following section is very targeted to a specific setup; a generic GNU/Linux with systemd. Thus, this might be moved to the "Other Linux" section. You might wanna also add a reference from, e.g., Arch Linux to this section.


- Put the config-file (`cmd/dtnd/configuration.toml`) in `/etc/dtn7`
- Put the systemd-service (`contrib/systemd/service/dtn7.service`) in `/etc/systemd/system`
- Probably run `systemctl daemon-reload` for good measure
- Create the working directory `/var/lib/dtn7`
- Create a `dtn7` user like this: `sudo useradd -r -s /sbin/nologin -d /var/lib/dtn7 dtn7`
CryptoCopter marked this conversation as resolved.
Show resolved Hide resolved
- Set ownership of the working directory `chown dtn7:dtn7 /var/lib/dtn7`
- Start the service: `systemctl start dtn7`

If you install the arch-package, we do all of that for you.

## Automatic

For some select platforms, packages are provided. (Footnote: ''select'' in this case means those platforms that don't make it
prohibitively complicated to package for them - looking at you, Debian)

### NixOS

If you're the kind of person who uses Nix, I assume you know how to install software on your system.
Because I most certainl don't.
oxzi marked this conversation as resolved.
Show resolved Hide resolved

### Arch Linux

Install it from the [AUR](https://aur.archlinux.org/packages/dtn7) either manually, or using your favourite aur-helper.

The package also installs the config file & systemd-service.
Also takes care of directory & user creation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be nitpicking, but can you please replace & with and in the two previous lines.


Start daemon using `systemctl start dtn7`

### Other Linux

We would like to provide packages for all distributions, however we're not really sure how.
Attempts at using the *Open SUSE Build Service* were unsuccessfull, since the build VMs don't have internet access and therefore can't get the dependencies from `go.mod`.
CryptoCopter marked this conversation as resolved.
Show resolved Hide resolved

If you know how to (automatically) build and packe go applications for other distros, please contact us.
CryptoCopter marked this conversation as resolved.
Show resolved Hide resolved

### MacOS

Use [brew](https://github.com/jonashoechst/homebrew-hoechst/blob/master/dtn7.rb), I guess.
If there's anything special about doing it, someone should probably describe that here.
oxzi marked this conversation as resolved.
Show resolved Hide resolved