-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #683 from nklincoln/messenger-docs
Document the messenger use
- Loading branch information
Showing
2 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
layout: pageNext | ||
title: "Messengers" | ||
categories: reference | ||
permalink: /vNext/caliper-messengers/ | ||
order: 6 | ||
--- | ||
|
||
## Table of Contents | ||
|
||
* [Overview](#overview) | ||
* [Messengers](#monitors) | ||
|
||
## Overview | ||
Caliper uses an orchestrator to control workers that interact with the SUT in order to perform a benchmark. Messages are passed between the orchestrator and all workers in order to keep the workers synchronized, and to progress the specified benchmark tests. A user may specify the messaging protocol that is user by Caliper in order to facilitate communications between the orchestrator and worker. | ||
|
||
## Messengers | ||
The messaging protocol to be used for communications between the orchestrator and worker during a benchmark is declared in the `caliper runtime configuration file`. Unspecified values will default to those specified in the [default configuration file](https://github.com/hyperledger/caliper/blob/master/packages/caliper-core/lib/config/default.yaml). | ||
|
||
Permitted messengers are: | ||
- **Process:** The `process` messenger is the default messenger and is based on native NodeJS `process` based communications. This messenger type is only valid for instances when local workers are being used to perform a benchmark. | ||
- **MQTT:** The `mqtt` messenger uses [MQTT](https://mqtt.org/) to facilitate communication between the orchestrator and workers. This messenger type is valid for both local and distributed workers, and assumes the existence of an MQTT broker service that may be used, such as [mosquitto](https://mosquitto.org/). | ||
|
||
The following yaml extract specifies the use of an MQTT communication method, using an existing MQTT broker that may be connected to via the specified address: | ||
``` | ||
worker: | ||
communication: | ||
method: mqtt | ||
address: mqtt://localhost:1883 | ||
``` | ||
|
||
If not specifying a `caliper.yaml` configuration file, the above may be specified as command line arguments to the CLI process as: | ||
``` | ||
--caliper-worker-communication-method mqtt --caliper-worker-communication-address mqtt://localhost:1883 | ||
``` |