Server
The ESD/SPD Web Editor relies on the ESD/SPD Web server. This server provides web services for:
- Licensing
- Delivering diagram templates to the client
- Converting diagrams created by Windows versions of ESD and SPD to SVG diagrams
- Converting SVG diagrams to PNG or JPEG images
The server also delivers HTML pages that include samples, documentation, and configuration
information.
Setup Instructions:
- Run the setup.exe for the ESD/SPD Web SDK.
- When prompted, activate the product by entering your license code and password.
- When the install is complete, the server will be running as a Windows service. Your browser
should open to the server's default page (http://localhost:3000).
Configuration:
The configuration file for server is located at <install location>\nodejs\config\config.json.
This file contains settings that control the behavior of the server.
The settings in the server configuration file include:
-
hostname: The interface(s) the server will to listen on. This must be either a host name that
resolves to the address of an interface on the host, the address of an interface on
the host, or the value "0.0.0.0" which will cause the server to listen on all
interfaces on the host machine.
-
port: The port the server will listen on.
-
compression: If set to true, the web server will compress data.
-
samples: If set to true, the editor sample pages will be enabled.
-
drawService: If set to true, the web service will be enabled.
-
maxLogSize: The maximum size in bytes of the log files before they roll over.
-
maxLogCount: The maximum number of each log file that will be kept.
-
logDir: The directory where the log files will be created. This can be a relative
or absolute path. If a relative path is specified, the log directory will
be relative to <Web SDK install location>\server. The log directory will be
created if it does not exist.
-
cacheTimeout: The amount of time static files should be cached. (1d, 15m, etc)
-
proxyWhiteList: A list of allowed target domain names for proxying map images and data.
If not defined, the map proxy will be disabled. Valid values will have the form:
[ "valid.domain.com", "other.valid.domain.com", ...]
-
valid-origins: Controls cross origin access to the web service. This is either a list of valid
request origins or a regular expression that request origins must match
to be considered. Valid values will have the form:
[ "valid origin 1", "valid origin 2", ...] or "<regular expression>"
-
ssl: Defines the server's SSL configuration. Valid values will have the form:
{ key: "<key file path>", cert: "<cert file path>" }
-
rasterizeLifetimeRequests: The target maximum number of requests handled by an instance of the
rasterizer service. When this number is exceeded the rasterizer instance will be retired and a
new instance started.
Type: Integer > 0
-
rasterizeLifetimeSeconds: The target lifetime of a rasterizer service instance in seconds.
When a rasterizer's lifetime exceeds this value it will be retired and a new instance started.
Type: Integer > 0
-
rasterizeMaxActiveRequests: The maximum number of concurrent rasterize requests.
Type:
Integer > 0
-
rasterizeMaxRequestDelay: The target maximum execution time in milliseconds for rasterize
requests. When the server is busy and is unlikely to meet this goal,
it will reject rasterize requests.
Type: Integer > 0
-
rasterizeRenderTasks: The number of processes in the rasterizer task pool. Increasing
this value may improve rasterization performance when there are many simultaneous requests.
Type: Integer >= 2
-
rasterizeTcpPortRange: A 2 element array defining the range of TCP ports available for use by
the rasterizer. The range must encompass at least 4 port numbers.
Type: Numeric array
-
rasterizeTimeout: Timeout for rasterize requests in milliseconds.
Type: Integer > 0
-
rasterizeVerboseLog Include more verbose content in the rasterizer log?
Type: Boolean
Other Considerations
SSL: The standard web server functionality of Node.js is used in the server. There are many optional
features and settings available which can be referenced in the Node.js documentation
here.
Operation Behind a Reverse Proxy: The web service does not keep state and
generally does not require special treatment.
Load Balancing: To assist with load balancing, a status end-point is provided at /rest/status
which always returns a 200 status code and the text "OK" when the server is running.