From shell command line executed from the root directory:
mvn clean install
All the prototype components are built and available into the local Maven artifacts repository.
Regarding static web page and contents, Babel JavaScript compiler (allowing code to works in current browsers) is used into the backend’s static index.html page for integration between Vert.x.
Integration with Keycloak OAuth2 SSO server is supported by Vert.x module (see https://vertx.io/blog/easy-sso-for-vert-x-with-keycloak/ tutorial about SSO integration between Vert.x and Keycloak).
During coding activity of this component, the Vert.x modified contents can be considered by the runtime with the shell command lines:
Package the server service:
mvn package
Start the server Vert.x server-side backend system:
mvn exec:java
Requirements: install Node (see Nodejs documentation) and NPM tools according to the development workstation’s operating system.
Check the Node and NPM versions supported by the development workstation via shell command line:
node --version
npm --version
Navigate into the proto-frontend-ui-server directory
Install all the project’s required modules relative to NodeJS with shell command line (command should be executed under sudo to avoid problem of some modules directories installation):
// install project required modules
sudo npm install
// check the security vulnerability and report found issues
sudo npm audit
// fix possible sub-modules vulnerabilities
sudo npm audit fix --force
// upgrade to the latest version (install globally)
sudo npm i -g npm-check-updates
// detect which pacakges have newer versions
sudo ncu -g
// remove the lock on packages and install the latest versions
sudo npm update
// check outdated modules (show latest versions compared to versions specified in package.json)
sudo npm outdated
Documentation about integration between Vert.x and ReactJS is available on Eclipse Vert.x How-To. Documentation about React-Bootstrap library is available on React Bootstrap github web site. Tutorial about security of ReactJS routes with Keycloack.
The start of infrastructure services is required before to execute the start of prototyped systems.
The CYBNITY prototyped systems are managed into the Maven sub-project named proto-asset-control.
The systems are integrated according to an even-based architecture supported by an integration chain of events (e.g Command, Query, Notification):
flowchart LR
subgraph cybnity_systems[POC CYBNITY systems]
subgraph uibackend[Proto Backend UI Server]
AreasAssetsProtectionUICapabilityHandler:::system;
end
subgraph areasassetsprotectiongateway[Proto Domain Gateways Server]
AreasAssetsProtectionSecurityCapabilitiesDispatcher:::system;
DownloadReportProcessingCapabilityHandler:::system;
AssetControlSecurityFeaturesDispatcher:::system;
end
subgraph assetcontrol_cpunit[Proto RTS Computation Unit Server]
CreateAssetFeature:::system;
end
end
subgraph dmbroker[Domains Interactions Space]
ac_createAsset:::techcomp;
ac_findAssets:::techcomp;
end
subgraph uibroker[Users Interactions Space]
aapdp[aap_downloadReport]:::techcomp;
aap[areas_assets_protection]:::techcomp;
asset_control_api[asset_control]:::techcomp;
end
subgraph busbroker[localhost:8080/eventbus]
aap_in[aap.in]:::techcomp;
aap_out[aap.out]:::techcomp;
end
AreasAssetsProtectionUICapabilityHandler -- 1.2, 2.2 : in progress notification --> aap_out;
aap_in -- 2: findAssets query --> AreasAssetsProtectionUICapabilityHandler -- 2.1 findAsset event --> aap --> AreasAssetsProtectionSecurityCapabilitiesDispatcher;
aap_in -- 1: createAsset command --> AreasAssetsProtectionUICapabilityHandler -- 1.1 createAsset event --> aap --> AreasAssetsProtectionSecurityCapabilitiesDispatcher;
aap_in -- 3: downloadReport command --> AreasAssetsProtectionUICapabilityHandler;
AreasAssetsProtectionUICapabilityHandler -- 3.1 downloadReport event --> aapdp --> DownloadReportProcessingCapabilityHandler;
AreasAssetsProtectionSecurityCapabilitiesDispatcher -- 1.3: createAsset event --> asset_control_api;
AreasAssetsProtectionSecurityCapabilitiesDispatcher -- 2.3: findAsset event --> asset_control_api;
asset_control_api --> AssetControlSecurityFeaturesDispatcher;
AssetControlSecurityFeaturesDispatcher -- 1.4: createAsset command --> ac_createAsset -- 1.5: createAsset event --> CreateAssetFeature;
AssetControlSecurityFeaturesDispatcher -- 2.4: findAssets query --> ac_findAssets;
uibackend:::componentlayer;
areasassetsprotectiongateway:::componentlayer;
assetcontrol_cpunit:::componentlayer;
busbroker:::area;
uibroker:::area;
dmbroker:::area;
cybnity_systems:::techsys;
classDef system fill:#3a5572,stroke:#3a5572,color:#fff;
classDef componentlayer fill:#97A5B5,stroke:#97A5B5,color:#fff;
classDef techcomp fill:#fff,stroke:#3a5572,color:#3a5572;
classDef techsys fill:#fff,stroke:#e5302a,color:#e5302a;
classDef area fill:#fff,stroke:#3a5572,color:#3a5572,stroke-width:1px,stroke-dasharray: 5 5;
Start the RTS Computation Unit server from the proto-rts-computation-unit-server Maven sub-project directory:
From Eclipse IDE (since src/test/java sub-directory), execute the org.cybnity.application.asset_control.domain.system.AssetControlRTComputationUnitLauncher class as Java application.
or from shell command line (since the project’s target sub-directory), execute the java main class with command line instruction java org.cybnity.application.asset_control.domain.system.AssetControlComputationUnit.
When start process is executed:
From the proto-domain-gateway-server Maven sub-project directory, start the multi domains gateway (simulated in unique project including implementation of a gateway about UI capabilities, and of a gateway about the asset control features domain) which manage the start of two Vert.x Verticles dedicated to each gateway instance:
From Eclipse IDE (since src/test/java sub-directory), execute the org.cybnity.application.MultipleDomainGatewayLauncher class as Java application.
or from shell command line (since the project’s target sub-directory), execute the java main class with command line instruction java org.cybnity.application.MultipleDomainGateway.
When start process is executed:
From the proto-backend-ui-server Maven sub-project directory, start the backend service ensuring the web exposure of web UI, and CYBNITY prototype UI layer (e.g html/javascript, ui services API via Vert.x event bus over HTTP):
From Eclipse IDE (since src/test/java sub-directory), execute the org.cybnity.application.asset_control.ui.system.backend.SockJSReactiveBackendServerLauncher class as Java application.
of from shell command line (since the project’s target sub-directory), execute the java main class with command line instruction java org.cybnity.application.asset_control.ui.system.backend.SockJSReactiveBackendServer.
When start process is executed:
From the proto-frontend-ui-server Maven sub-project directory, start the frontend service ensuring the reactive web exposure of web UI, and CYBNITY UI layer (e.g html/css/Javascript/JSX, reactive components and integration with call to proto-backend-ui-server over Vert.x event bus on HTTP).
Navigate into the proto-frontend-ui-server directory
Start the React web application (usable from web browser at http://localhost:3000) via the execution of the shell command line (which execute the scripts defined by the package.json file):
npm start
When start process is executed:
With the http://localhost:3000 url called from a web browser, a test of asset creation can be tested to validate the integration chains to the RTS computation unit.
A possible tests execution can be started from shell command line:
npm test
Test that ui backend give answer about sent parameter (over HTTP/GET protocol) without specific route to defined UI capability:
curl -v http://localhost:8080/assetcontrol/
Test that UI backend give answer about sent parameter (over HTTP/GET protocol) from specific route defined about UI capability handled:
curl -v http://localhost:8080/assetcontrol/\?name\="olivier"
Test that UI backend give static resources with default index.html reactive page display
http://localhost:8080/static/
Test that UI backend give answer about sent parameter (over HTTP/GET protocol)
http://localhost:8080/assetcontrol/?name=olivier
The scope of test implementing the usage of static contents and event-bus interactions over Vert.x event bus is accessible with a web browser calling the url http://localhost:8080/static/.
When the main test page is shown, some automatic requests are executed by the page in asynchronous process (e.g implemented via javascript instructions using the Vert.x web client connected to the ui backend server).
The sent and received events are displayed into the web console of the web browser allowing to follow the JSON commands and responses exchanged between the frontend layer (browser) and the backend layer (proto-backend-ui-server system).
Each command (which is automatically generated by this page) produce automatic and reactive treatment into the backend, domain gateways and RTS computation unit server components (e.g traces generated in each of their consoles).