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

Commit

Permalink
Merge remote-tracking branch 'origin/master' into v1.0.0
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
#	docs/ReatMetric System Manual.adoc
#	docs/ReatMetric System Manual.pdf
#	eu.dariolucia.reatmetric.api/pom.xml
#	eu.dariolucia.reatmetric.core/pom.xml
#	eu.dariolucia.reatmetric.driver.automation.base/pom.xml
#	eu.dariolucia.reatmetric.driver.automation.groovy/pom.xml
#	eu.dariolucia.reatmetric.driver.automation.js/pom.xml
#	eu.dariolucia.reatmetric.driver.automation.python/pom.xml
#	eu.dariolucia.reatmetric.driver.example.test/Documentation.adoc
#	eu.dariolucia.reatmetric.driver.example.test/pom.xml
#	eu.dariolucia.reatmetric.driver.example/Documentation.adoc
#	eu.dariolucia.reatmetric.driver.example/pom.xml
#	eu.dariolucia.reatmetric.driver.httpserver/pom.xml
#	eu.dariolucia.reatmetric.driver.remote/pom.xml
#	eu.dariolucia.reatmetric.driver.serial/pom.xml
#	eu.dariolucia.reatmetric.driver.socket/pom.xml
#	eu.dariolucia.reatmetric.driver.spacecraft.test/pom.xml
#	eu.dariolucia.reatmetric.driver.spacecraft/pom.xml
#	eu.dariolucia.reatmetric.driver.test/pom.xml
#	eu.dariolucia.reatmetric.persist/pom.xml
#	eu.dariolucia.reatmetric.processing/pom.xml
#	eu.dariolucia.reatmetric.remoting.connector/pom.xml
#	eu.dariolucia.reatmetric.remoting.spacecraft/pom.xml
#	eu.dariolucia.reatmetric.remoting.test/pom.xml
#	eu.dariolucia.reatmetric.remoting/pom.xml
#	eu.dariolucia.reatmetric.scheduler/pom.xml
#	eu.dariolucia.reatmetric.ui.remoting/pom.xml
#	eu.dariolucia.reatmetric.ui.socket/pom.xml
#	eu.dariolucia.reatmetric.ui.spacecraft/pom.xml
#	eu.dariolucia.reatmetric.ui.test/pom.xml
#	eu.dariolucia.reatmetric.ui/pom.xml
#	pom.xml
  • Loading branch information
dariol83 committed Jul 11, 2024
2 parents f238dcd + 766954a commit 4cc49ae
Show file tree
Hide file tree
Showing 86 changed files with 4,053 additions and 292 deletions.
84 changes: 15 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
![ReatMetric](eu.dariolucia.reatmetric.ui/src/main/resources/eu/dariolucia/reatmetric/ui/fxml/images/logos/logo-full-color-640px.png)
![ReatMetric](docs/docimg/ReatMetric-Logo.png)

ReatMetric is a well-documented Java-based software infrastructure for the implementation of Monitoring & Control (M&C) systems,
with a strong focus on the space domain. ReatMetric components provide a simple but efficient implementation of the typical
functions used in an M&C system.
ReatMetric is a well-documented Java-based software infrastructure for the implementation of Monitoring & Control (M&C) systems.

![GitHub Release](https://img.shields.io/github/v/release/dariol83/reatmetric)

![Displays](docs/images/reatmetric-windows-01.PNG "ReatMetric")

## Documentation
The system concepts, design, configuration and usage are described in the [documentation](docs/ReatMetric%20System%20Manual.adoc).

Suggestions on how to improve the documentation and on missing description of features can be provided opening an issue on
GitHub.

## Dependencies
ReatMetric is based on a very limited set of dependencies:
- [eu.dariolucia.ccsds](https://www.github.com/dariol83/ccsds): providing support for SLE/TM/TC/PUS handling of the _spacecraft_ driver;
- [openJFX](https://openjfx.io): for the graphical user interface of the _ui_ module;
- [ControlsFX](https://github.com/controlsfx/controlsfx): advanced UI controls for the _ui_ module;
- [eu.dariolucia.jfx.timeline](https://www.github.com/dariol83/timeline): providing support for schedule rendering in the _ui_ module;
Expand All @@ -23,71 +19,18 @@ ReatMetric is based on a very limited set of dependencies:
- [Groovy](https://groovy-lang.org): for the Groovy language support in the _processing_ and _automation_ modules (best choice);
- [GraalVM](https://www.graalvm.org): for the Javascript language support in the _automation_ modules;
- [Jython](https://www.jython.org/): for the Python language support in the _automation_ modules;
- [Json Path](https://github.com/json-path/JsonPath): for the parsing of JSON objects and files.

Including also the indirect dependencies, a typical ReatMetric backend deployment (i.e. without UI) is composed by 33 Jars,
10 from ReatMetric and 23 from external dependencies, for a total of 19.4 MB.

## Performance
The performance of the processing model and of the spacecraft driver have been measured on the following 2 platforms:

1) Zotac Magnus EN72070V: Intel Core i7-9750H, Hexa-core, 2.6 GHz without turbo boost; 32 GB DDR4 2666 MHz; Windows 10 Professional 64 bits; openJDK 11.
2) Raspberry PI 4: Broadcom BCM2711, Quad Core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz, 8 GB DDR4 3200 MHz; Manjaro Linux 64 bits; openJDK 11.

Each platform runs only the backend application, without UI.

The data definition of the processing model included:
- 80'000 processing parameters
- 5'000 synthetic parameters
- 10'000 reported events
- 2'000 condition-based events
- 10'000 activities

The TM/TC data definition of the spacecraft included:
- 3'600 PUS (3,25) TM packets
- 10'000 PUS 5 TM packets
- time packet, verification reports
- 10'000 TC commands

TM/TC setup:
- single RAF SLE in online complete mode;
- single CLTU SLE;
- TM frame: 1115 bytes with CLCW, no FECF;
- TM packets: with packet CRC.

### Platform 1 results
- Processing start-up time (as per logs - first run, no cache): 26 seconds
- Processing start-up time (as per logs - with cache): 10 seconds
- Max TM rate: 23.1 Mbit/sec (SLE TML level - RAF complete mode - processing backpressure propagated to the data generator)
- Nb. of TM frames per second: ca 2.300/sec
- Nb. of TM packets per second: ca 8.000/sec
- Nb. of TM parameter samples decoded per second: ca 435.000/sec
- Nb. of processed items generated per second: ca 530.000/sec
- Memory usage (heap size): between 2 and 4 GB, Windows reports 5 GB
- CPU load: between 35% and 45% (equivalent of almost 6 cores fully utilised)

![Connector Performance](docs/images/reatmetric-test-all-in-a-box-01.PNG "Connector Performance")
![System Performance](docs/images/reatmetric-test-all-in-a-box-02.PNG "System Performance")

### Platform 2 results
- Processing start-up time (as per logs - first run, no cache): 113 seconds
- Processing start-up time (as per logs - with cache): 56 seconds
- Max TM rate: 4.6 Mbit/sec (peak: 7 Mbit/sec, no backlog: 2.5 Mbit/sec)
- Nb. of TM frames per second (peak): ca 450/sec, no backlog: 250/sec
- Nb. of TM packets per second (peak): ca 1270/sec, no backlog: 900/sec
- Nb. of TM parameter samples decoded per second (peak): 70.000/sec
- Nb. of processed items generated per second (peak): 100.000/sec
- Memory usage server (heap size): between 2 and 4 GB, top reports 4.6 GB (capped with -Xmx4G)
- Memory usage UI (Windows Task Monitor): 1.6 GB
- CPU load: between 320% and 350% (all 4 cores above 80%)

![Connector Performance](docs/images/reatmetric-test-raspberry-01.PNG "Connector Performance")
![System Performance](docs/images/reatmetric-test-raspberry-02.PNG "System Performance")
- [eu.dariolucia.ccsds](https://www.github.com/dariol83/ccsds): providing support for SLE/TM/TC/PUS handling of the _spacecraft_ driver;
- [Json Path](https://github.com/json-path/JsonPath): for the parsing of JSON objects and files;
- [SNMP4J](https://www.snmp4j.org/): for the support of SNMP in the _snmp_ module;

Including also the indirect dependencies, a typical ReatMetric backend deployment (i.e. without UI) is composed by 40 Jars,
16 from ReatMetric and 24 from external dependencies, for a total of **16.5 MB**. This size can be further reduced depending
on the needs, since some drivers and related dependencies might not be needed.

## Getting Started

### All-in-one
If you want to quickly try ReatMetric out, I suggest the following approach:
If you want to quickly try ReatMetric out, use the following approach:
- Build the complete tree with maven: mvn clean install
- Create a folder called 'reatmetric' inside your home folder and decompress there the configuration zip inside eu.dariolucia.reatmetric.ui.test/src/main/resources
- Update the configuration data as appropriate. There is no need to change the processing definition data
Expand Down Expand Up @@ -134,6 +77,9 @@ Example of remoting configuration:
<connector local-name="Test System" remote-name="Test System" host="192.168.2.106" port="19000" />
</ns1:connectors>

## Roadmap
The development of ReatMetric is considered completed and no further updates will be performed.

## Acknowledgements and Credits
A special mention goes to Theresa Köster from the University of Gießen, who evaluated ReatMetric (among other tools)
against the Flying Laptop operational simulator. With her contributions, ideas and suggestions, she helped greatly to
Expand Down
10 changes: 5 additions & 5 deletions docs/ReatMetric System Manual.adoc
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
= System Manual
Dario Lucia <dario[email protected]>
v1.0.1, 2024-05-20
v1.0.2, 2024-07-11
:title-logo-image: image:docimg/ReatMetric-Logo.png[top=42%,align=left,pdfwidth=6in]
:doctype: book
:toc:
:homepage: https://github.com/dariol83/reatmetric

== Applicable Version
This manual described the design, behaviour and configuration of ReatMetric version 1.0.x.
This manual described the design, behaviour and configuration of ReatMetric version 1.0.2.

== System Overview
ReatMetric is a Java-based software infrastructure for the implementation of Monitoring & Control (M&C) systems,
Expand Down Expand Up @@ -234,9 +234,6 @@ For instance, _raw data_ can be used to distribute and optioanlly store low leve
level between ReatMetric and the target devices. In the same way, it can be used to store changes of state or internal
states of modules and drivers, as required.

=== ReatMetric Main Interface
To be written

=== Drivers
A _driver_ is the object that connect ReatMetric with an external device or system. A driver is responsible for:

Expand Down Expand Up @@ -318,6 +315,9 @@ include::../eu.dariolucia.reatmetric.driver.spacecraft/Documentation.adoc[]
=== Serial
include::../eu.dariolucia.reatmetric.driver.serial/Documentation.adoc[]

=== SNMP
include::../eu.dariolucia.reatmetric.driver.snmp/Documentation.adoc[]

== User Interface
include::../eu.dariolucia.reatmetric.ui/Documentation.adoc[]

Expand Down
Binary file modified docs/ReatMetric System Manual.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion eu.dariolucia.reatmetric.api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>eu.dariolucia.reatmetric</groupId>
<artifactId>eu.dariolucia.reatmetric</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
7 changes: 6 additions & 1 deletion eu.dariolucia.reatmetric.core/Documentation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ eu.dariolucia.reatmetric.core.configuration. It is an XML file using namespace d
_http://dariolucia.eu/reatmetric/core/configuration_.

The elements that can contain a path support the special value $HOME, which is replaced at runtime with the contents
of the _user.home_ system variable.
of the _user.home_ system variable. A special value $PREFIX can also be used, which is replaced at runtime with the
contents of the _reatmetric.prefix.dir_ system variable, which can be provided as Java property at start-up:

----
-Dreatmetric.prefix.dir=<path>
----

A commented example of such file is presented below.

Expand Down
2 changes: 1 addition & 1 deletion eu.dariolucia.reatmetric.core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>eu.dariolucia.reatmetric</groupId>
<artifactId>eu.dariolucia.reatmetric</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,30 @@ public class ServiceCoreConfiguration {
private static final String HOME_VAR = "$HOME";
private static final String HOME_DIR = System.getProperty("user.home");

private static final String PREFIX_VAR = "$PREFIX";
private static final String PREFIX_DIR = System.getProperty("reatmetric.prefix.dir", "");

public static ServiceCoreConfiguration load(InputStream is) throws JAXBException {
JAXBContext jc = JAXBContext.newInstance(ServiceCoreConfiguration.class);
Unmarshaller u = jc.createUnmarshaller();
ServiceCoreConfiguration configuration = (ServiceCoreConfiguration) u.unmarshal(is);
// Update $HOME
// Update $HOME and $PREFIX
if(configuration.getArchiveLocation() != null) {
configuration.setArchiveLocation(configuration.getArchiveLocation().replace(HOME_VAR, HOME_DIR));
configuration.setArchiveLocation(configuration.getArchiveLocation().replace(PREFIX_VAR, PREFIX_DIR));
}
configuration.setDefinitionsLocation(configuration.getDefinitionsLocation().replace(HOME_VAR, HOME_DIR));
if(configuration.getLogPropertyFile() != null) {
configuration.setLogPropertyFile(configuration.getLogPropertyFile().replace(HOME_VAR, HOME_DIR));
configuration.setLogPropertyFile(configuration.getLogPropertyFile().replace(PREFIX_VAR, PREFIX_DIR));
}
if(configuration.getSchedulerConfiguration() != null) {
configuration.setSchedulerConfiguration(configuration.getSchedulerConfiguration().replace(HOME_VAR, HOME_DIR));
configuration.setSchedulerConfiguration(configuration.getSchedulerConfiguration().replace(PREFIX_VAR, PREFIX_DIR));
}
for(DriverConfiguration dc : configuration.getDrivers()) {
dc.setConfiguration(dc.getConfiguration().replace(HOME_VAR, HOME_DIR));
dc.setConfiguration(dc.getConfiguration().replace(PREFIX_VAR, PREFIX_DIR));
}
//
return configuration;
Expand Down
15 changes: 15 additions & 0 deletions eu.dariolucia.reatmetric.deployment/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# syntax=docker/dockerfile:1

FROM eclipse-temurin:17-jre-alpine
WORKDIR /reatmetric
COPY target/deps .
CMD ["java", "-Djava.rmi.server.hostname=127.0.0.1", "-Dreatmetric.core.config=/etc/reatmetric/configuration.xml", "-Dreatmetric.remoting.rmi.export.port=4000", "--module-path=/reatmetric", "-m", "eu.dariolucia.reatmetric.remoting/eu.dariolucia.reatmetric.remoting.ReatmetricRemotingServer", "3000"]
# Java RMI registry
EXPOSE 3000
# Java RMI exported objects
EXPOSE 4000
# HTTP server driver port
EXPOSE 8081

# docker build -t reatmetric-1.1.0-snapshot .
# docker run -it --mount type=bind,src="C:\Users\dario\Reatmetric\reatmetric_docker",target="/etc/reatmetric" -d -p 127.0.0.1:3000:3000 -p 127.0.0.1:4000:4000 -p 127.0.0.1:8081:8081 reatmetric-1.1.0-snapshot
Loading

0 comments on commit 4cc49ae

Please sign in to comment.