Connection to D2000 is realized through D2Connector.exe process which is run on the D2000 side. The connection may be defined as direct (through object connections) or as reserved (through object listenableConnection) during which the D2Connector process connects to the port opened by the SmartWeb server (more precisely the JAPI library used by the server). SmartWeb can never be configured by both methods at the same time but always by only one method, meaning that there will be either definition of connections or listenableConnection object in the configuration file. 

Note: For a successful connection of the SmartWeb Servera with D2000, it is necessary for the version of the SmartWeb platform to correspond with the version of the D2000 system. For example, with the D2000 version 11.0.53, it is possible to use only SmartWeb version 11.0.53.Bxx, in which the xx is the number of build for the given version.

Direct connection to D2000

{
    /* objects'field with configurations of direct connections to D2000 */ 
	"connections": [ 
		{
  			"host": "localhost", // hostname or IP address
  			"port": "3120",
			"certificatePath" : "C:/path to X509 certificate/d2connector-cert.crt"
		},
		{
  			"host": "localhost", // hostname or IP address
  			"port": "3121",
			"certificatePath" : "C:/path to X509 certificate/d2connector-cert.crt"
		},
		...
	]   
}

Object connections in the configuration file smartweb.json contain the field of redundant connections to D2000 processes D2Connector through attributes host and port. Additionally, it is possible to define the path to X509 certificate in the file with the suffix crt for secured connection with D2Connector. SmartWeb (JAPI) automatically manages connections to processes D2Connector, so in every time one connection is active. In the case of an outage of an active connection, it tries to establish a connection with another process. In such a situation, all current sessions with users of the universal API interface or web application are automatically closed, and users must log in again or else they are automatically redirected to a login display.

Reversed connection to D2000

{
    /* object with configuration of reversed connection because of DMZ (from D2000 -> SmartWeb) */
	"listenableConnection": { 
		"bindingInterface": "0.0.0.0",
		"port": "3120",
		"certificatePath" : "C:/path to X509 certificate/d2connector-cert.crt",
		"allowedHosts": ["168.12.35.40"]
	}		
}

A configuration of a reversed connection contains the following attributes. The attribute bindingInterface defines the network interface on which the given port is opened. By setting values 0.0.0.0, the port opens on every network interface; the value 127.0.0.1 opens the port only for connections from a local computer. The attribute port defines the number of a port. Optional attribute certificatePath is a path to X509 key to a file with the suffix crt for secured connection with D2Connector. Another optional attribute allowedHosts defines the list of IP addresses or names of computers from which it is allowed to connect with the D2Connector process.

Napíšte komentár