Skip to content

Commit

Permalink
[docs] Add the documentation of "janusnode".
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Nov 15, 2020
1 parent 4aa6786 commit 97b4a9a
Show file tree
Hide file tree
Showing 4 changed files with 650 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/io.sarl.docs.markdown/src/main/documentation/index.md
Expand Up @@ -33,6 +33,10 @@

* [English Auction with Holons](./tutorials/HolonicAuction.md)

### SARL Run-time Environment

* [Creating an extension for the Janus SRE](./tutorials/SreExtension.md)

## Best Practices with SARL

* [Event Creation with a Builder](./bestpractices/EventBuilder.md)
Expand Down Expand Up @@ -121,6 +125,7 @@
* [sarlc](./tools/Sarlc.md): command-line SARL compiler.
* [sarldoc](./tools/Sarldoc.md): command-line SARL documentation generator.
* [janus](./tools/Janus.md): launching SARL agents with the Janus platform.
* [janusnode](./tools/Janusnode.md): launching SARL agents with the Janus platform over a computer network.

## Documentation Format

Expand Down
Expand Up @@ -9,6 +9,13 @@ Its role is to provide all the libraries and plugins that are needed for running

For launching the Janus platform from a command-line shell, you could use the [:name:] tool.

> **_Caution:_** The [:name:] does not provide a support for exchaning events over a computer
> network. If you would like to have benefit of this feature, you should use one of the following
> methods:
> 1. Add a library on the classpath that includes the networking feature to the SRE; or
> 2. Use the version of the SRE that includes the standard network feature: [janusnode](./Janusnode.md).

## Usage

The [:name:] tool takes arguments:
Expand Down
@@ -0,0 +1,86 @@
# Janus Command-line Launcher with Network Support

[:Outline:]

[Janus](http://www.janusproject.io) is the default SARL Run-time Environment (SRE).
Its role is to provide all the libraries and plugins that are needed for running SARL agents.

The [`janus`](./Janus.md) tool is the base command-line tool for launching the SRE.
But, it does not provide a support for exchaning events over a computer
network. If you would like to have benefit of this feature, you should use one of the following
methods:

1. Add on the classpath of the `janus` command a library that includes the networking feature to the SRE; or
2. Use the version of the SRE that already includes the standard network feature: `[:name](janusnode)`.

The [:name:] is explained on this page.

## Basics of the Networking Feature

Basically, the networking feature of the SRE enables you to launch instances of the Janus kernel on different
computers, and exchange events between these instances.

In order to implement this feature, the [Hazelcast](http://www.hazelcast.com) library is used.
Hazelcast is an open source in-memory data grid based on Java. In a Hazelcast grid, data is
evenly distributed among the nodes of a computer cluster, allowing for horizontal scaling of
processing and available storage. Backups are also distributed among nodes to protect against
failure of any single node.

In addition to the data-sharing and efficient communication means, Hazelcast provides the ability
to build the node network automatically. Each Hazelcast node that is associated to a given cluster
name is *connected automatically* to the other nodes in the same cluster on the local network.
It means that you do not need to provide a network configuration to the [:name:] tool.

## Usage

The [:name:] tool takes arguments:

```text
[:name!] [OPTIONS] <[:agname](agent_fully_qualified_name)>
```


The [:agname:] is the name of the agent to launch. This name is equal to the
fully qualified name of the agent's type.

> **_Note::_** Janus enables to launch only one agent from the command-line shell. If you want to launch
> more than one agent, you should launch a first agent, which will create the other agents.
You could change the behavior of the [:name:] tool with the command-line options.
For obtaining a list of the options, type:

```texts
[:name!] -help
```


## Command-Line Options

The Janus framework provides options on the command-line.
The list of the options is displayed below. This list includes
all the standard modules of Janus, and the networking features.
If you add an extra module into the classpath of your application,
more options may become available.



| Option | Description |
| ------ | ----------- |
[:Dynamic:]{
runShellSilently(
makeExecName("..", "..", "..", "..", "..", "..", "sre", "io.janusproject", "io.janusproject.kernel.network", "target", "janusnode"),
"generatemarkdownhelp".makeCliOption)

}



## List of Errors and Warnings

The list of error and warning messages that may be generated by Janus are provided on the
help page of the [main command-line tool](./Janus.md).



[:Include:](../legal.inc)

0 comments on commit 97b4a9a

Please sign in to comment.