You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuweni.apache.org by hu...@apache.org on 2021/05/04 10:07:56 UTC
[incubator-tuweni-website] 21/25: Add gossip docs
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-tuweni-website.git
commit 9817f31c8a7a36826236241d7a203668481890d2
Author: Antoine Toulme <an...@lunar-ocean.com>
AuthorDate: Sun Jan 3 01:16:01 2021 -0800
Add gossip docs
---
tutorials/apps/gossip.md | 55 ++++++++++++++++++++++++
tutorials/apps/index.md | 20 +++++++--
tutorials/networking/getting-started-with-net.md | 22 +++++++++-
3 files changed, 92 insertions(+), 5 deletions(-)
diff --git a/tutorials/apps/gossip.md b/tutorials/apps/gossip.md
new file mode 100644
index 0000000..9d43e3f
--- /dev/null
+++ b/tutorials/apps/gossip.md
@@ -0,0 +1,55 @@
+---
+layout: tutorial
+title: Gossip
+description: Gossip
+group: nav-right
+previous: index.md
+categories: [applications]
+---
+
+The `gossip` application is an example showing how the Plumtree gossip implementation functions.
+
+`gossip` is distributed as part of the binary distribution of Apache Tuweni, which you can download from this [page](/download)
+
+{%highlight bash%}
+./gossip --help
+Usage: <main class> [-h] [--sending] [--numberOfMessages=<numberOfMessages>]
+ [--payloadSize=<payloadSize>]
+ [--sendInterval=<sendInterval>] [-c=<configPath>]
+ [-l=<port>] [-m=<messageLog>] [-n=<networkInterface>]
+ [-r=<rpcPort>] [-p[=<peers>...]]...
+ --numberOfMessages=<numberOfMessages>
+ Number of messages to publish (load testing)
+ --payloadSize=<payloadSize>
+ Size of the random payload to send to other peers (load
+ testing)
+ --sending Whether this peer sends random messages to all other
+ peers (load testing)
+ --sendInterval=<sendInterval>
+ Interval to wait in between sending messages in
+ milliseconds (load testing)
+ -c, --config=<configPath> Configuration file.
+ -h, --help Prints usage prompt
+ -l, --listen=<port> Port to listen on
+ -m, --messageLog=<messageLog>
+ Log file where messages are stored
+ -n, --networkInterface=<networkInterface>
+ Network interface to bind to
+ -p, --peer[=<peers>...] Static peers list
+ -r, --rpc=<rpcPort> RPC port to listen on
+{%endhighlight%}
+
+You can set up a `gossip` app to listen with this command:
+{%highlight bash%}
+./gossip -l 9000 -m /tmp/log
+{%endhighlight%}
+
+In a separate shell, you can send messages to the listener with:
+
+{%highlight bash%}
+./gossip -l 9001 -p 127.0.0.1:9000 --sending --payloadSize=32 --numberOfMessages=10 -p tcp://127.0.0.1:9000 --sendInterval=1000
+{%endhighlight%}
+
+This will send 10 messages, of 32 random bytes each. Open the file `/tmp/log` to see them.
+
+You can create more complex scenarios with multiple gossip listeners, showing the path by which gossip circulates across peers.
diff --git a/tutorials/apps/index.md b/tutorials/apps/index.md
index c2fc50a..d7e93bb 100644
--- a/tutorials/apps/index.md
+++ b/tutorials/apps/index.md
@@ -5,10 +5,22 @@ description: Applications
group: nav-right
---
-TODO !
+Apache Tuweni bundles applications, directly available in the binary distribution. You can download the binary distro on this [page](/download).
+
+# gossip
+
+The `gossip` application is an example showing how the Plumtree gossip implementation functions.
+
+[More](/tutorials/apps/gossip)
+
+# hobbits-relayer
+
+[More](/tutorials/apps/hobbits-relayer)
+
+# tuweni
+
+[More](/tutorials/apps/tuweni)
+
-gossip
-hobbits-relayer
-eth-client-app
devp2p
eth-faucet
\ No newline at end of file
diff --git a/tutorials/networking/getting-started-with-net.md b/tutorials/networking/getting-started-with-net.md
index 9b38c0e..7973870 100644
--- a/tutorials/networking/getting-started-with-net.md
+++ b/tutorials/networking/getting-started-with-net.md
@@ -3,4 +3,24 @@ layout: tutorial
title: Getting Started With TLS
description: Getting Started With TLS
group: nav-right
----
\ No newline at end of file
+---
+
+
+To get started, install the `net` library.
+
+With Maven:
+
+{% highlight xml %}
+<dependency>
+ <groupId>org.apache.tuweni</groupId>
+ <artifactId>net</artifactId>
+ <version>{{site.data.project.latest_release}}</version>
+</dependency>
+{% endhighlight %}
+
+Or using Gradle:
+
+{% highlight groovy %}
+implementation("org.apache.tuweni:net:{{site.data.project.latest_release}}")
+{% endhighlight %}
+
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tuweni.apache.org
For additional commands, e-mail: commits-help@tuweni.apache.org