foundation-techstack

CYBNITY PROTOTYPE SYSTEMS DEPLOYMENT & RUN

BUILD OF COMPONENTS & SYSTEMS

Java components build

All the prototype components are built and available into the local Maven artifacts repository.

Proto backend UI server

Vert.x components layer

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:

Proto frontend UI server

ReactJS components layer

Requirements: install Node (see Nodejs documentation) and NPM tools according to the development workstation’s operating system.

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.

START OF SYSTEMS

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;

RTS Computation Unit server

Start the RTS Computation Unit server from the proto-rts-computation-unit-server Maven sub-project directory:

When start process is executed:

Domains Gateway servers

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:

When start process is executed:

Backend UI server

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):

When start process is executed:

Frontend UI server

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).

When start process is executed:

INTEGRATION TEST PROTOCOL

TEST OF UI BACKEND ENDPOINTS (static contents)

From shell command line

  1. 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/
    
  2. 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"
    

From web browser

  1. Test that UI backend give static resources with default index.html reactive page display

     http://localhost:8080/static/
    
  2. Test that UI backend give answer about sent parameter (over HTTP/GET protocol)

     http://localhost:8080/assetcontrol/?name=olivier
    

TEST OF WEB UI (static contents and dynamic interactions)

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).