-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update README.md #3
Open
jean-michel-perli-sonsin
wants to merge
1
commit into
th2-net:master
Choose a base branch
from
jean-michel-perli-sonsin:patch-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,16 +1,16 @@ | ||||||
# Connect | ||||||
|
||||||
The "Connect" component is responsible for the communication with a target system. | ||||||
This component implements the logic of the interaction protocol, receiving and sending messages from and to the system, respectively. | ||||||
The "Connect" component is responsible for the communication with the target system. | ||||||
This component implements the logic of the interaction protocol, by receiving and sending messages from and to the system respectively. | ||||||
|
||||||
This project includes only an adapter for using the Sailfish service in the th2 packed into a Docker Image. | ||||||
This image should be used as a base to implement extensions with the real logic for specific protocols using services in the Sailfish format. | ||||||
This project includes only one adapter for using the Sailfish service in the th2 package into the Docker Image. | ||||||
This image should be used as a base to implement extensions with the real logic for the specific protocols, by using services in the Sailfish format. | ||||||
|
||||||
As an example, the [th2-conn-generic](https://github.com/th2-net/th2-conn-generic) project implements the extension for connecting via FIX protocol using standard Sailfish's FIX service. | ||||||
|
||||||
## Configuration | ||||||
|
||||||
This configuration should be specified in the custom configuration block in schema editor. | ||||||
This configuration should be specified in the custom configuration block at the schema editor. | ||||||
|
||||||
```yaml | ||||||
session-alias: "connectivity-alias" | ||||||
|
@@ -22,23 +22,23 @@ settings: | |||||
``` | ||||||
|
||||||
Parameters: | ||||||
+ session-alias - that session alias will be set for all messages received or sent by this component. **It should be unique for each "Connect" component**; | ||||||
+ workspace - the folder inside the container that will contain a plugin adapted to use in the TH2; | ||||||
+ type - the service type from **services.xml** file. If service name from services.xml file contains `-` symbols they must be replaced with `_` symbol; | ||||||
+ name - the service name that will be displayed in the events in the report; | ||||||
+ session-alias - the session alias specified in this field, will be set for all messages received or sent by this component. **It should be unique for each "Connect" component**; | ||||||
+ workspace - the folder inside the container which will contain a plugin adapted for using with TH2; | ||||||
+ type - the service type specified from **services.xml** file. If the service name from services.xml file contains the symbols `-`, they must be replaced with the symbol `_`; | ||||||
+ name - the service name which will be displayed into the events inside the report; | ||||||
+ settings - the parameters that will be transformed to the actual service's settings specified in the **services.xml** file. | ||||||
|
||||||
## Extension | ||||||
|
||||||
You can add the ability to connect to a target system by implementing your own service in the Sailfish format and putting it and its configuration to the correct places in the base image. | ||||||
You can add the ability to connect to a target system by implementing your own service in the Sailfish format and by putting it together with its configuration to the correct places into the base image. | ||||||
|
||||||
You need to take the following steps: | ||||||
You need to perform the following steps: | ||||||
|
||||||
1. Create the implementation of the [com.exactpro.sf.services.IService](https://github.com/exactpro/sailfish-core/blob/master/BackEnd/Core/sailfish-core/src/main/java/com/exactpro/sf/services/IService.java). | ||||||
1. Create the implementation of [com.exactpro.sf.services.IService](https://github.com/exactpro/sailfish-core/blob/master/BackEnd/Core/sailfish-core/src/main/java/com/exactpro/sf/services/IService.java). | ||||||
The examples of implementing this interface can be found [here](https://github.com/exactpro/sailfish-core/tree/master/BackEnd/Service). | ||||||
If the protocol is already implemented in the Sailfish services you can simply use the dependencies on the service's artifact for that protocol. | ||||||
|
||||||
2. Create the **services.xml** configuration file that contains the description for services you can use from that "Connect" component. | ||||||
2. Create the **services.xml** configuration file which contains the description for the services that you can use from the "Connect" component. | ||||||
You can find the example [here](https://github.com/th2-net/th2-conn-generic/blob/master/conn-fix/src/main/plugin/cfg/services.xml). | ||||||
This file must contain: | ||||||
+ service name - the alias to use it from the "Connect" component; | ||||||
|
@@ -58,28 +58,28 @@ This file must contain: | |||||
version: 3.2.0.0 | ||||||
core_version: 3.2.0 | ||||||
``` | ||||||
4. Create you own image based on the current one and put all files to the correct places in the base image: | ||||||
4. Create you own image based on the current one and put all the files to the correct places into the base image: | ||||||
+ Create the following directory - **${workspace}/plugins/th2_service**. | ||||||
_**${workspace}**_ - it is a folder from the "Connect" configuration. | ||||||
If you use the _plugin_alias_ and _name_ different from _th2_service_ in the VERSION file correct the _th2_service_ folder name according to value you use. | ||||||
_**${workspace}**_ - is a folder from the "Connect" configuration. | ||||||
If you use the _plugin_alias_ and _name_ different from _th2_service_ in the VERSION file correct the _th2_service_ folder name according to the value that you use. | ||||||
Let's name that directory as **PLUGIN_DIRECTORY** for simplicity. This name will be used in future steps. | ||||||
+ Artifact with the service(s) implementation(s) and all its dependencies should be put to the following directory - **${PLUGIN_DIRECTORY}/libs**. | ||||||
+ The configuration file created on the step 2 should be put to the following directory - **${PLUGIN_DIRECTORY}/cfg**. | ||||||
+ The _VERSION_ file created on step 3 should be put to the following directory - **${PLUGIN_DIRECTORY}/**. | ||||||
+ Artifact with the service(s) implementation(s) and all its dependencies should be placed into the following directory - **${PLUGIN_DIRECTORY}/libs**. | ||||||
+ The configuration file created on the step 2 should be placed into the following directory - **${PLUGIN_DIRECTORY}/cfg**. | ||||||
+ The _VERSION_ file created on step 3 should be placed into the following directory - **${PLUGIN_DIRECTORY}/**. | ||||||
|
||||||
## Pins | ||||||
|
||||||
Connect has 4 types of pins for interacting with th2 components. Messages that were received from / sent to the target system will be sent to the following queues: | ||||||
Connect has 4 types of pins for interacting with the th2 components. Messages that were received from / sent to the target system will be directed to the following queues: | ||||||
|
||||||
- incoming parsed messages // it will be removed in future | ||||||
- outgoing parsed messages // it will be removed in future | ||||||
- incoming raw messages | ||||||
- outgoing raw messages | ||||||
|
||||||
The "Connect" component uses a separate queue to send messages. The component subscribes to that pin at the start and waits for the messages. | ||||||
The messages received from that pin will be sent to the target system. | ||||||
Also, this component is responsible for maintaining connections and sessions in the cases where this is provided by the communication protocol. | ||||||
Here you can automatically send heartbeat messages, send a logon/logout, requests to retransmit messages in the event of a gap, etc. | ||||||
The "Connect" component uses a separate queue to send messages. The component subscribes to that pin at the start and wait for messages to be received. | ||||||
The received messages from that pin will be sent to the target system. | ||||||
Besides, this component is responsible for maintaining connections and sessions , in the cases provided by the communication protocol. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Redundant space before the colon
Suggested change
|
||||||
Here you can automatically send heartbeat messages, logon/logout, requests to retransmit messages in the event of a gap, etc. | ||||||
|
||||||
## Custom resources for infra-mgr | ||||||
|
||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence has completely changed its meaning.
This project is the adapter that is packed into the Docker Image. This adapter allows users to use the Sailfish services in the th2