MapleSim Server Administrator Guide

Copyright © Maplesoft, a division of Waterloo Maple Inc.
2021

MapleSim Server Administrator Guide
Copyright
Maplesoft, MapleSim Server and Maple are all trademarks of Waterloo Maple Inc.
© Maplesoft, a division of Waterloo Maple Inc. 2021. All rights reserved.
No part of this book may be reproduced, stored in a retrieval system, or transcribed, in any form or by any means — electronic, mechanical, photocopying, recording, or otherwise. Information in this document is subject to change without notice and does not represent a commitment on the partof the vendor. The software described in this document is furnished under a license agreement and may be used or copied only in accordance withthe agreement. It is against the law to copy the software on any medium except as specifically allowed in the agreement.
Oracle, Java and all Java-based marks are trademarks or registered trademarks of Oracle and/or its affiliates. Docker is a registered trademark ofDocker, Inc.
All other trademarks are the property of their respective owners.
This document was produced using Maple and DocBook.

Contents
Overview .......................................................................................................................................... v
1 Basics of Running MapleSim Server ..................................................................................................... 1
1.1 Glossary of Variables Used in This Chapter ..................................................................................... 1
1.2 Loading the MapleSim Server Docker Image ................................................................................... 1
1.3 Starting MapleSim Server ............................................................................................................ 1
Starting MapleSim Server Using the docker run Command ................................................................. 1
Starting MapleSim Server Using a docker compose File ..................................................................... 2
Replacing the Landing Page .......................................................................................................... 3
1.4 Stopping MapleSim Server ........................................................................................................... 3
1.5 Removing a Docker Image ........................................................................................................... 3
1.6 Adding Content to MapleSim Server .............................................................................................. 3
1.7 MapleNet Logging ...................................................................................................................... 3
docker log ................................................................................................................................. 4
MapleNet options ....................................................................................................................... 4
2 Environment Variable Configuration ..................................................................................................... 5
2.1 Licensing .................................................................................................................................. 5
2.2 Directory Setup .......................................................................................................................... 5
2.3 Managing Connections ................................................................................................................ 5
2.4 Directory Listings ....................................................................................................................... 6
2.5 Sendfile Usage ........................................................................................................................... 6
2.6 Content Delivery Network ............................................................................................................ 6
2.7 Worksheet Template Location ....................................................................................................... 6
2.8 Web Server Endpoints ................................................................................................................. 7
2.9 CORS ...................................................................................................................................... 7
2.10 SSL ........................................................................................................................................ 8
2.11 Client Configuration .................................................................................................................. 8
2.12 Managing Maple Engines ........................................................................................................... 9
2.13 Maple Configuration ................................................................................................................ 10
2.14 Configuring Logging ............................................................................................................... 11
2.15 Data Limit ............................................................................................................................. 11
2.16 Compute Engine ..................................................................................................................... 11
2.17 Document Engine .................................................................................................................... 12
3 Security Issues ................................................................................................................................ 15
3.1 Untrusted Users ........................................................................................................................ 15
3.2 Trusted Users ........................................................................................................................... 15
4 MapleNet Metrics and Monitoring ...................................................................................................... 17
4.1 Metrics and Monitoring Tools ..................................................................................................... 17
Health Check ........................................................................................................................... 17
Monitoring .............................................................................................................................. 18
Metrics over Prometheus ............................................................................................................ 19
5 Example Configurations ................................................................................................................... 23
5.1 Basic Document Hosting ............................................................................................................ 23
Mounting as a subdirectory of /webroot ......................................................................................... 23
Mounting on top of /webroot ....................................................................................................... 24
Using a Content Delivery Network for JavaScript libraries ................................................................ 24
Logging Configuration ............................................................................................................... 25
5.2 Basic Compute Hosting .............................................................................................................. 25
Cross-Origin Resource Sharing (CORS) ........................................................................................ 25
5.3 Adding Maple Libraries and Help Databases .................................................................................. 26
Changing the URL for the Help Database ...................................................................................... 26
5.4 Enabling the Upload Page ........................................................................................................... 27iii

iv • Contents

5.5 Security Options ....................................................................................................................... 27
5.6 Troubleshooting ........................................................................................................................ 28
Docker not starting .................................................................................................................... 28
MapleNet is not starting ............................................................................................................. 28
Performances Issues .................................................................................................................. 29
6 Copyright ...................................................................................................................................... 31
6.1 Client Side Software Copyright Statements .................................................................................... 31
error_prone_annotations ............................................................................................................. 31
j2objc-annotations 1.3 ................................................................................................................ 31
guava 23.0 .............................................................................................................................. 31
guava-gwt 23.0 ........................................................................................................................ 31
gwtquery 1.5 beta 1 .................................................................................................................. 31
gwtexporter 2.5.0 ..................................................................................................................... 31
eventbinder 1.10 ...................................................................................................................... 31
akjava .................................................................................................................................... 31
gwt-log 3.3.2 ........................................................................................................................... 31
GWT 2.8.1 .............................................................................................................................. 31
6.2 Server Side Software Copyright Statements ................................................................................... 32
Maple Licensed Code ................................................................................................................ 32
Open Source ............................................................................................................................ 33
Font Licenses ........................................................................................................................... 46
MapleSim Open Source .............................................................................................................. 47
Index .............................................................................................................................................. 57

Overview
About MapleSim Server
MapleSim Server provides an easy web deployment option for your MapleSim-based solutions. The MapleSim Server
allows engineers throughout your organization to explore MapleSim simulation models from a web browser, even if
they do not have MapleSim.

Docker Container for MapleSim Server
The MapleSim Server server is intended to be deployed in the Docker container generated by the MapleSim Server
installer. Running it requires the Docker container engine. We recommend using the latest stable release of Docker.
The Docker container contains all the dependencies of the MapleSim Server binary. The Docker container can also be
deployed to various cloud hosting environments.
For more information on where to obtain the Docker engine for your platform, installing MapleSim Server and running
the MapleSim Server container see the MapleSim Server Installation Guide.
Note: Attempting to run MapleSim Server outside of the Docker container is not supported.

MapleSim Server Resources
Since MapleSim Server is built on and shares much if its content with MapleNet (including APIs), some additional
documentation is listed below to help you further explore MapleNet.
Resource

Description
System requirements and installation instructions for MapleSim Server. The
MapleSim Server Installation Guide is available in the Install.html file locatedMapleSim Server Installation Guide
either on your MapleSim Server installation DVD or the folder where you installed
MapleSim Server.
MapleNet Services Guide
Outline of MapleNet services. Information on limitations of services provided as well
as a summary of MapleNet API endpoints.
MapleNet API Programming Guide A detailed description of the MapleNet API with examples.

For additional resources, visit http://www.maplesoft.com/site_resources.

Getting Help
To request customer support or technical support, visit http://www.maplesoft.com/support.

Customer Feedback
Maplesoft welcomes your feedback. For comments related to the MapleSim Server product documentation, contact
doc@maplesoft.com.

vvi • Overview

1 Basics of Running MapleSim Server
1.1 Glossary of Variables Used in This Chapter
The following variables are used in this chapter, and should be replaced with the correct values:
SIMLICENSEFILE: The location of the MapleSim license file (on the host machine).
LICENSEFILE: The location of the MapleNet license file (on the Docker host)
HOSTPORT: The port on the host machine on which MapleNet should accept connections
IMAGETAG: The tag of the Docker image created by the installer
CONTENTDIR: The directory containing content for hosting by MapleSim Server (on the Docker host)
MAPLEONLINECDNURL: The URL of a Content Delivery Network hosting the MapleNet JavaScript libraries
MATHJAXCDNURL: The URL of a Content Delivery Network hosting the Math Jax JavaScript package
HOSTADDRESS: Is either the ip address or machine address of the machine running the MapleSim Server Docker
container
CONTAINERID: The container id obtained from running docker container ls
Additional documentation for the configuration variables used in these examples is available in the Configuration
section of the Administrators Guide

1.2 Loading the MapleSim Server Docker Image
After you have installed MapleSim Server, you must load the MapleSim Server image into Docker.
To load the MapleSim Server image:
1. Open a command prompt and navigate to the MapleSim Server installation folder, before running this command.
2. Run the following command:
docker load --input MapleSimServer-2021.1.tar
Note: This process could take several minutes.

Next, find the MapleSim Server container image tag using the command:
docker images.
You are now ready to start MapleSim Server.

1.3 Starting MapleSim ServerStarting MapleSim Server Using the docker run Command

To start MapleSim Server, run the following Docker command:
docker un --mount type=bind,source=$LICENSEFILE,target=/maple/license/license.dat,readonly--mount type=bind,source=$SIMLICENSEFILE,target=/maple/toolbox/MapleSim/license/MapleSim.dat,readonly

12 • 1 Basics of Running MapleSim Server--mount type=bind,source=$CONTENTDIR,target=/webroot/content--publish $HOSTPORT:8080--rm -e MAPLENET_WEBSERVER_ENABLEDIRECTORYLISTING=true maplesoft/maplesimserver:$IMAGETAG(1.1)

In this example:$LICENSEFILE$SIMLICENSEFILE$CONTENTDIR$HOSTPORT$IMAGETAG

=
=
=
=
=

"/home/qa/maplenet/2021.1/license/license.dat""/home/qa/maplenet/2021.1/license/license.dat""/home/qa/Desktop/Worksheets"
8080
2019.2-1460361

Note: If $LICENSEFILE contains spaces, then you must enclose the path in quotation marks. For example,
source="C:\Program Files\MapleNet\2021\license.dat".
To test if MapleSim Server is running properly navigate to http://$HOSTADDRESS:8080 in your browser.
You should see a page displayed with a link to a Maple demo worksheet.
For more information on using the docker run command, see https://docs.docker.com/engine/reference/commandline/run/Starting MapleSim Server Using a docker compose File
Alternatively, you can specify MapleSim Server options using a docker compose (YAML) file:version: 3.7
services:
maplesimserver:
image: maplesoft/maplesimserver:$IMAGETAG
ports:- "$HOSTPORT:8080"
volumes:- type: "bind"source: $LICENSEFILE
target: "/maple/license/license.dat"
read_only: true
- type: "bind"source: $SIMLICENSEFILE
target: "/maple/toolbox/MapleSim/license/MapleSim.dat"
read_only: true

The command used to deploy MapleSim Server isdocker stack deploy maplenet --compose-file <path to above file>
To test if MapleSim Server is running properly navigate to http://$HOSTADDRESS:8080 in your browser.
You should see a page displayed with a link to a Maple demo worksheet.
For more information on the docker stack command, see https://docs.docker.com/engine/reference/commandline/stack/.

1.4 Stopping MapleSim Server • 3

For more information on docker compose files, see https://docs.docker.com/compose/gettingstarted/

Replacing the Landing Page
The MapleSim Server container, by default, includes a landing page, index.html. Located at the bottom of the
MapleSim Server file directory. To replace this page, mount a directory from your host machine, with the replacement
landing page (called index.html) onto your MapleSim Server Docker container, mapping it to the directory containing
your current index.html file. For more information on mounting host machine directories into the MapleSim Server
Docker container, see Basic Document Hosting (page 23).

1.4 Stopping MapleSim Server
To stop the MapleSim Server:
1. At the prompt, to list your running containers, enter:docker container ls
Find the running MapleSim Server container ID in the list.
2. Next, you must stop the MapleSim Server Docker container. To do this, enter:docker container stop $CONTAINERID
Where $CONTAINERID is the container id obtained from step 1.
For more information on the docker stop command see https://docs.docker.com/engine/reference/commandline/stop/

1.5 Removing a Docker Image
At some point, you may want to remove some docker images from your machine.
To remove a Docker image, enter:docker image rm $IMAGETAG
For more information on the docker image command, see:https://docs.docker.com/engine/reference/commandline/image/

1.6 Adding Content to MapleSim Server
MapleSim Server is capable of rendering both classic and standard Maple worksheets, and Maple workbooks, as wellas MapleSim models, for display in a web browser. This is the easiest way to create web content for use with
MapleSim Server. Placing content in the correct location on MapleSim Server makes the content available to users.
Without an installed copy of Maple, users can interact with a posted worksheet using their web browser, and evenperform new computations.
For instructions and examples on how to configure MapleNet to host Maple documents, see the Basic Document
Hosting (page 23).

1.7 MapleNet Logging
MapleNet is a server process and as such it generates informative logs by default. It is important to understand how
MapleNet logging working so its logs can be properly maintained and used.

4 • 1 Basics of Running MapleSim Server

docker log
MapleNet is deployed as a Docker container therefore its logs are captured by docker. You can access these logs byusing the docker logs command. Docker has extensive logging configuration options for how it maintains its logs
and for sending docker logs to other logging systems. You can also add command line arguments to the docker run
command to configure how docker maintains MapleNet's logs. See Logging Configuration (page 25) for a basic log
configuration example. For more information about docker's logging options, see
docker log: https://docs.docker.com/engine/reference/commandline/logs/
docker log driver configuration: https://docs.docker.com/config/containers/logging/configure/

MapleNet options
MapleNet has various options for configuring the generated logs. All these options are documented in the Configuration
section. The most important option is the MAPLENET_LOGGING_LEVEL option. This option controls how verbose
MapleNet's logging is. This options accepts the following values (from most verbose to quietest): trace, debug,
info, warning, error, fatal. The default logging level is info. This level is chosen to provide a balance of informative logging without being excessive. Increasing the logging to debug or trace will provide additional logging,
however these additional log are intended for developers more than users. Decreasing the logging levels will reduce
the amount of information which may seem desirable, however should something go wrong, the reduced logging means
less information for determining what happened. The default level (info) is the suggested level for a normal MapleNet deployment. If log storage is a concern, it is better to configure the docker log driver with log rotation than to decrease
the logging level of MapleNet.

2 Environment Variable Configuration
As MapleNet is deployed as a Docker container, configuration is handled by setting environment variables within theDocker container. On the Docker command line (docker run) you can set an environment variable by using the-e command line argument. They can also be specified in a Docker stack YAML file. Any variables that are used to
specify files or directories are for locations are within the container. See the Adding Maple Documents to MapleNetsection of this guide for information on adding content to the Docker container.
The environment variables all start with the MAPLENET_ prefix.

2.1 Licensing
Environment Variable
MAPLENET_LICENSE

Parameter
file

Description
This variable specifies which license file MapleNet uses. The license
file must exist within the container at the time that MapleNet starts.
It must be added to the container or mounted into the container.

2.2 Directory Setup
Environment Variable
MAPLENET_WEBSERVER_DOCUMENTROOT

Parameter
directory

MAPLENET_WEBSERVER_CACHEDIR

directory

Description
This variable specifies which directory MapleNet
uses as its document root, the base directory of
the content hosted by MapleNet. The default valueof document root is /webroot. To make content
available to users, mount a directory containing
the content under the container's /webrootdirectory.
This variable specifies the directory where
MapleNet stores cache files. The default value of
this variable is /webroot/maplenet/cache.
Cache directories contain temporary files required
for rendering documents. As the remote clientsneed access to files in the cache directories, thecache directories must be located under documentroot.

2.3 Managing Connections
Environment Variable
MAPLENET_WEBSERVER_REQUESTTIMEOUTMS

Parameter
timeout inmilliseconds

MAPLENET_WEBSERVER_NUMTHREADS

integer

5

Description
This variable specifies how long, inmilliseconds, MapleNet waits before timingout connections. The default value of thisvariable is 30000 (30 seconds).
Documents that are opened by users will
periodically connect to MapleNet to makesure those connections are kept open. This
timeout is mostly for cases where clients
disconnect without properly closing theirconnection.
This variable specifies the maximum
number of threads MapleNet can use for
accepting connections. The default value
is 1024. These threads are used to handle
user connections. If all of these threads areused, MapleNet will not be able to accept
new connections.

6 • 2 Environment Variable Configuration

MAPLENET_WEBSERVER_NOTFOUNDFILE

file

MAPLENET_WEBSERVER_PORT

port numberThis variable specifies a file to be sent tothe user when a requested file cannot befound. The default is the empty string,which causes MapleNet to reply with a very
simple 404 message.
This variable specifies the port MapleNetlistens on for new connections. The default
value of this variable is 8080. This is theport within the Docker container. You will
still need to map this port to an external
port on the host machine, thus changing
this is generally not required.

2.4 Directory Listings
Environment Variable
MAPLENET_WEBSERVER_ENABLEDIRECTORYLISTING

Parameter
booleanDescription
This variable specifies whether
MapleNet permits directory
listings. The default value of thisvariable is false. Directory
listings allow the user to navigate
document root like a filesystem.

Parameter
booleanDescription
This variable specifies whether
MapleNet uses the sendfilecommand to optimize file transfers.
By default this option is enabled.
In some host configurations (certain
networked or virtualized filesystems) using sendfile canlead to data corruption in thetransferred file.

2.5 Sendfile Usage
Environment Variable
MAPLENET_WEBSERVER_ENABLESENDFILE

2.6 Content Delivery Network
Environment Variable
MAPLENET_WEBSERVER_MAPLECLOUDCDN

Parameter
URL

Description
This variable specifies the base URL to use
for fetching the MapleNet JavaScript
library. The default value for this is variable
is "/mapleonline", meaning the librarywill be loaded from the mapleonline
subdirectory of MapleNet's document root.
This can be used to place the library(mapleonline.nocache.js) on to aContent Delivery Network (CDN).
mapleonline.nocache.js will beappended to the given URL.

Parameter
filename

Description
This variable specifies the file to use as theWorksheet HTML template page. Bydefault, this file is

2.7 Worksheet Template Location
Environment Variable
MAPLENET_WEBSERVER_MAPLEWORKSHEET2.8 Web Server Endpoints • 7/maple/data/MapleWorksheet.html.
Some users may want to use a custom
version of this file.

2.8 Web Server Endpoints
Environment Variable
MAPLENET_WEBSERVER_ENDPOINTS_COMPUTE

Parameter
boolean

MAPLENET_WEBSERVER_ENDPOINTS_DOCUMENT

boolean

MAPLENET_WEBSERVER_ENDPOINTS_DOWNLOAD

boolean

MAPLENET_WEBSERVER_ENDPOINTS_HELP

boolean

MAPLENET_WEBSERVER_ENDPOINTS_UPLOAD

booleanDescription
This variable specifies whether MapleNet enables
its compute endpoint. The default value of thisvariable is true. The compute endpoint allows
for a user to submit a Maple computation request
to the server and receive the result as a reply.
This variable specifies whether MapleNet enables
its document endpoint. The default value of thisvariable is true. The document endpoint allows
for users to open Maple worksheets hosted by
MapleNet in a browser.
This variable specifies whether MapleNet permits
users to download the Maple documents hosted by
MapleNet. The default value of this variable isfalse. If set to true, adding the download urlparameter to the url of a Maple document causes
it to be downloaded instead of displayed.
This variable specifies whether MapleNet enables
its help endpoints. The default value of this variable
is true. The help endpoints allow users to display
worksheets taken from a Maple help database.
This variable specifies whether MapleNet enables
the upload endpoint. The default value is false.
Enabling the upload endpoint allow users to upload
content to MapleNet using the upload.html page.

2.9 CORS
Environment Variable
MAPLENET_WEBSERVER_CORS_ALLOWORIGIN

Parameter
string

MAPLENET_WEBSERVER_CORS_ALLOWMETHODS

string

MAPLENET_WEBSERVER_CORS_ALLOWHEADERS

stringDescription
This variable specifies the value MapleNetsets for the cross-origin resource sharing(CORS) allow origin header. The default
value for this value is the empty string.
CORS allows sites hosted on different
domains to access resources from
MapleNet.
This variable specifies the value MapleNetsets for the cross-origin resource sharing(CORS) allow methods header. The default
value for this value is the empty string.
CORS allows sites hosted on different
domains to access resources from
MapleNet.
This variable specifies the value MapleNetsets for the cross-origin resource sharing(CORS) allow headers header. The default
value for this value is the empty string.
CORS allows sites hosted on different
domains to access resources from
MapleNet.

8 • 2 Environment Variable Configuration

2.10 SSL

Environment Variable
MAPLENET_WEBSERVER_SSL_VERIFYPEER

MAPLENET_WEBSERVER_SSL_CAPATH

MAPLENET_WEBSERVER_SSL_CAFILE

MAPLENET_WEBSERVER_SSL_VERIFYDEPTH

MAPLENET_WEBSERVER_SSL_DEFAULTVERIFYPATHS

MAPLENET_WEBSERVER_SSL_CIPHERLIST

MAPLENET_WEBSERVER_SSL_PROTOCOLVERSION

MAPLENET_WEBSERVER_SSL_SHORTTRUST

2.11 Client Configuration

Parameter
booleanDescription
This variable specifies that MapleNet will
require that connecting clients have a valid
certificate.The default value of this variable
is false. This allows the server to verify
that any connecting client has a certificatethat is signed by certificate authority fromthe server's trusted certificate authorities.
directory
This variable specifies a directory MapleNet
will use as its certificate authority (CA)path. The default value of this variable isthe empty string, meaning no CA path will
be added. This directory will be searched
for CA certificates in PEM format.
fileThis variable specifies a file MapleNet will
use as its certificate authority (CA) file. The
default value for this variable is the empty
string, meaning no CA file will be added.
A CA file is a file containing CA certificatesin PEM format
integerThis variable specifies the maximum depthof a certificate authority chain that
MapleNet will accept. The default value forthis variable is 9.
booleanThis variable specifies whether MapleNet
uses default values for CAFILE andCAPATH. The default is true. With this set
MapleNet server will use default, OS
supplied, certificatescommaThis variable specifies which ciphers
separated list MapleNet should present to clients for use
or ALLwith SSL. The default value for this variable
is ALL, meaning all available ciphers should
be presented.
integerThis variable specifies the minimal versionof SSL/TLS MapleNet will accept forconnections. The default value for thisvariable is 0.
booleanThis variable specifies whether MapleNet
checks for new certificates while it isrunning. The default value for this variable
is false. When set to true MapleNet will
check for new certificates added to the
CAFILE or CAPATH.

2.12 Managing Maple Engines • 9

Environment Variable
MAPLENET_WEBCLIENT_CONFIGURATION

Parameter
key=value

MAPLENET_WEBCLIENT_ADDITIONALJAVASCRIPTURL

string

MAPLENET_WEBCLIENT_HELPURL

URL

Description
This variable is used to set client
configuration values in MapleNet.The
default value for this variable is theempty string (no values set). These
key,value pairs are placed into a
JavaScript map in the
MapleWorksheet.html template.
These values can then be accessed by
JavaScript running in that page. The
default MapleNet JavaScript currently
recognizes the MathJaxCDN key. The
corresponding value is the base URL
to use for locating the MathJax
library. When MathJaxCDN is not
set, the MathJax library is loaded
from the MathJax sub-directory of
MapleNet's document root. This canbe used to place the MathJax libraryon to a Content Delivery Network(CDN). MathJax.js will beappended to the given URL.
This variable specifies a string thatwill be injected into the HTML page
sent to the client when opening a
document. The default value for thisvariable is the empty string, whichmean that nothing will be added tothe page. This can be used to add
custom JavaScript to the page asviewed by the client.
This variable sets a URL that that isused to map help links in worksheets
to web pages. The default value forthis variable is /help/display
The help topic from the help link isappended to this value to form the
URL for the link. The default value
maps the help links to the help
endpoint of the server hosting theworksheet. Assuming the help page
exists in the help databases and thehelp endpoints are enabled, then thehelp page should display.

2.12 Managing Maple Engines

Environment Variable
MAPLENET_POOL_MAXENGINES

Parameter
integer

Description
This variable sets the maximum numberof Maple engines that MapleNet will
start. The default value for this variable
is 0, meaning no limit. This value is10 • 2 Environment Variable Configuration

MAPLENET_POOL_MAXFALLBACKENGINES

integer

MAPLENET_POOL_COMPUTATIONTIMELIMIT

seconds

MAPLENET_POOL_DOCUMENTCOMPUTATIONTIMELIMIT

seconds

MAPLENET_POOL_QUEUETIMELIMIT

seconds

MAPLENET_POOL_MAXRUNNINGENGINES

integerdifferent than
MAPLENET_POOL_MAXRUNNINGENGINES,
as this limits the total number of enginesthat can be opened, not the number ofrunning engines.
This variable sets the maximum numberof Maple engines that MapleNet will startfor image plot generation. The default
value for this variable is 0, meaning nolimit. The pool of engines for image plot
generation is separate from the pool fornormal computation/document engines.
This variable sets the timelimit forcompute requests (as opposed to
document computations). The default
value is 360 seconds. Compute
requests that run for longer than this will
be stopped by MapleNet and an error will
be returned.
This variable sets the timelimit forcomputations related to an open
document (worksheet/workbook). The
default value is 1200 seconds.
Computations that last longer than thiswill be stopped by MapleNet and an error
will be returned.
This variable sets the timelimit forrequests (computation or document) thatare not able to run because MapleNet is
not allowed to start a running engine. The
default value for this variable is 60
seconds. An engine may not be available
to run because of limits on the numberof running engines. For example license
restrictions or
MAPLENET_POOL_MAXRUNNINGENGINES.
If a request waits longer than this limit,
the request will be cancelled and an error
will be returned.
This variable sets the maximum numberof running engines that MapleNet willallow. It defaults to 0, which means the
maximum allowed by the license. It is anerror to set this value greater than thelicense allows.

2.13 Maple Configuration
Environment Variable
MAPLENET_MAPLE_LIBRARY

Parameter
path

Description
This variable specifies a value to set for the
Maple libname variable. The default is theempty string, which uses the default value for
Maple's libname. When specifying more thatone path, use a comma (,) as a separator. Whensetting this parameter, only the directories listed
will be used. If Maple's library (maple.mla)
is not present in the list, MapleNet will not
function properly.

2.14 Configuring Logging • 11

filename

MAPLENET_MAPLE_MSERVER

This variable specifies the file to be executed
when starting a Maple engine. The default value
for this variable is the empty string. The default
value uses the normal Maple engine binary.

2.14 Configuring Logging
Environment Variable
MAPLENET_LOGGING_DISABLE

Parameter
boolean

MAPLENET_LOGGING_FILENAME

filename

MAPLENET_LOGGING_FLUSH

boolean

MAPLENET_LOGGING_LEVEL

log level

MAPLENET_LOGGING_SYNCHRONOUS

booleanDescription
This variable specifies if logging is disabled in MapleNet. The
default value is false, meaning log messages will be
generated.
This variable specifies a file that MapleNet's logs should be
written to. The default value is the empty string. This default
causes MapleNet to log to the console. Setting this value willcapture the logs in a file within the Docker container. This isprobably not want you want. Instead capture the output of
Docker or use the docker logs command.
This variable specifies if MapleNet should flush its logs
whenever a logging message is produced. The default is false.
Flushing causes log messages to not get buffered. This can
reduce performance of MapleNet, but reduces the likelihood ofa log message being lost if MapleNet should exit unexpectedly.
This variable specifies the logging level that MapleNet uses.
There are 6 logging levels, from least to most output: fatal,
error, warning, info, debug and trace. The default
value is info, which generates sufficient logging for normal
operations, without being excessive. Levels below info
(debug and trace) are intended for debugging and generate
too much output for normal use.
This variable whether MapleNet uses synchronous logging. The
default is false. Synchronous logging forces the log messages
to be generated directly by the caller, not send to another threadfor output. This means the message is output more directly,
reducing the likelihood the message will be lost if MapleNetexits unexpectedly.

2.15 Data Limit
Environment Variable
MAPLENET_ENGINE_JAVADATALIMIT

Parameter
mebibytes

Description
This variable specifies a data limit for Java
operations used by MapleNet. The default is2048 MiB. The Maple engine can utilize aJava virtual machine (JVM) for certain
operations. This variable limits the maximum
amount of memory the JVM is allowed to use.

2.16 Compute Engine
Environment Variable
MAPLENET_COMPUTEENGINE_COMMANDLINE

Parameter
string

MAPLENET_COMPUTEENGINE_DISABLESECURITY

booleanDescription
This variable specifies extra command line
arguments to use when starting a Maple
engine for the compute endpoint. The
default value for this variable is the empty
string.
This variable specifies whether MapleNetdisables the security setting when startinga Maple engine for the compute endpoint.

12 • 2 Environment Variable Configuration

MAPLENET_COMPUTEENGINE_CPULIMIT

integer

MAPLENET_COMPUTEENGINE_DATALIMIT

integer

The default value for this variable is false.
The Maple engine has security settings that
restrict access to the operating system.
Disabling the security setting will disable
these restrictions, allowing Maple accessto the entire system.
This variable specifies whether MapleNet
starts the Maple engines for the computeendpoint with a CPU limit. The default
value for this variable is 0, which meansno limit is given. Passing a CPU limit to
the Maple engine halts the Maple engine
after a the given number of CPU seconds.
When setting a CPU limit, it is importantto remember that compute engines are
re-used a limited number of times and the
CPU limit applies to the lifetime of thecompute engine.
This variable specifies whether MapleNet
starts the Maple engines for the computeendpoint with a data limit. The default
value for this variable is 0, which meansno limit is given. Passing a data limit to the
Maple engine limits the maximum amountof memory a Maple engine can access. If
this limit is exceeded the Maple engine will
shutdown. Compute engines are restarted
between each computation, so eachcomputation should start with a minimal
amount of memory.

2.17 Document Engine

Environment Variable
MAPLENET_DOCUMENTENGINE_COMMANDLINE

Parameter
string

MAPLENET_DOCUMENTENGINE_DISABLESECURITY

boolean

MAPLENET_DOCUMENTENGINE_CPULIMIT

integer

Description
This variable specifies extra command line
arguments to use when starting a Maple
engine for a document. The default value
for this variable is the empty string.
This variable specifies whether the
MapleNet security setting is disabled whenstarting a Maple engine for a document.
The default value for this variable isfalse. The Maple engine has security
settings that restrict access to the operating
system. Disabling the security setting will
disable these restrictions, allowing Maple
access to the entire system.
This variable specifies whether MapleNet
starts the Maple engines for documents witha CPU limit. The default value for thisvariable is 0, which means no limit isgiven. Passing a CPU limit to the Maple

2.17 Document Engine • 13

MAPLENET_DOCUMENTENGINE_DATALIMIT

integerengine halts the Maple engine after a certain
number of CPU seconds. Document engines
persist for the lifetime of the document, are
not re-used. Thus this variable limits thetotal amount of CPU time a document
session can consume.
This variable specifies whether MapleNet
starts the Maple engines for the computeendpoint with a data limit. The default
value for this variable is 0, which meansno limit is given. Passing a data limit to the
Maple engine limits the maximum amountof memory a Maple engine can access. If
this limit is exceeded the Maple engine will
shutdown. Document engines persist for
the lifetime of the document, are not
re-used. Thus this variable limits the total
amount of memory a document session canconsume.

14 • 2 Environment Variable Configuration

3 Security Issues
MapleNet permits remote users to execute Maple code on a server. Maple is a full featured programming language,
including tools for accessing the file system, networking and external calling to other programming language, such as
Java, Python and C. It is difficult to restrict what users can access. Deploying MapleNet securely requires understanding
the environment in which it is intended to be used. Do you trust your users, or is there a risk of malicious access? Are
there users whose content should be kept private from others? This section will describe the security risks of deploying
MapleNet server and best practices for limited harm.

3.1 Untrusted Users
The risk of allowing untrusted users to access MapleNet is that someone malicious might attempt to cause harm or
exploit the system for their own purposes. It is difficult to secure MapleNet against malicious users so we advise against
allowing untrusted users to access a MapleNet installation. The biggest risk is allowing an untrusted user to execute
their own code. If you intend to deploy MapleNet where it would be accessible to untrusted users, we suggest the following procedures.
1. Configure MapleNet behind a load balancer with SSL offload.
2. Disable the compute endpoint. The compute endpoint explicitly allows users to run arbitrary Maple code on theserver.
3. Disable the help endpoints. The help pages may contain examples that could be exploited.
4. Disable uploading. Another route to executing malicious code would be to embed it in a worksheet and upload it.
5. Disable directory listing. This makes it harder for malicious users to find content on the site.
6. Double-check your content. Maple worksheets can contain embedded components. These components can accept
user input and cause Maple code to be evaluated. It is possible to create worksheets that execute Maple code enteredinto a component (a text area or math container, for example). Do not allow such worksheets to be hosted.
7. Makes sure you have limited the CPU and data limits for your document engines. This makes denial of service attacks
via Maple code more difficult.
8. Assume the content that users view is available to other users. With all the steps above implemented, it is very hardfor one user to "snoop" on another user's content, however we suggest that you do not use MapleNet to display
content that you would consider private when untrusted users have access to MapleNet.

3.2 Trusted Users
In an environment when you trust your users to not be malicious, MapleNet features can be enabled as you see fit.
However there are still some issues to consider. Turning off unnecessary features is still a good idea. A curious usermight experiment with the compute features of MapleNet without realizing it could negatively effect the performanceof documents. With directory listings enabled, it is possible to locate temporary files created by on going computations
and open documents (the contents of the cache directory). These locations can also be determined by viewing the HTTP
requests made by a open document. These requests are encrypted when using SSL, but are sent in the clear when SSL
is not enabled. This may be a concern as it allows one user to see some of the content generated by another user's
document. If this is a concern, using SSL and disabling directory listings makes it significantly harder to discover thosefiles. If you need to be certain that no data leakage can occur between groups of users, we suggest running multiple
instances of MapleNet that are only accessible by users of the particular security levels.

15

16 • 3 Security Issues

4 MapleNet Metrics and Monitoring
4.1 Metrics and Monitoring Tools
MapleNet provides some secondary features and server monitoring tools. These are described below. The term endpointrefers to a URL that MapleNet provides that can be accessed using standard HTTP requests. When these endpoints areaccessed MapleNet replies with an HTTP response containing the requested information. There is no file on the servercorresponding to these replies, they are generated by MapleNet itself.

Health Check
The Health Check endpoint is /healthcheck/. When an HTTP GET accesses this endpoint MapleNet will reply
with an HTTP response with a status code of 200 and with no content. This is intended to be used by monitoring services
to verify that MapleNet is available. A successful reply from the health check endpoint verifies that MapleNet is able
to accept new connections, but it does not verify that MapleNet is able to execute commands or open a new document.
The endpoint returns a json object of the form:{"check": "Foo","level": "WARNING","message": "Lorem ipsum dolor sit amet, consectetur adipiscing elit"}
Where check is the name of the check that generated the message and check is one of:• PoolHeathCheck( $poolName ) , where $poolName is one of Document, Compute, or Fallback• LicenseCheck.
The level field is one of OK, WARNING, or ERROR.
It's important to note that messages is supposed to be an array.
The message is an arbitrary string providing feedback for the MapleNet administrator.
A successful health check won't produce any messages. A health check that is not successful will produce either a
WARNING or an ERROR message, which will appear as an entry in the messages.
The most severe level of all the messages is put in the status field. If there are no messages, the status field is set toOK.
Status is one of OK, WARNING, or ERROR.
The http return code for a GET to /healthcheck/ will be 200 if the status is OK or WARNING. An http return codeof 500 is returned if the status is ERROR.
When the healthcheck endpoint is requested, the health checks that are exercised are:• a license check• exercising each kernel pool
• When each kernel pool is exercised, 2+3 is executed on each kernel. An error is returned if a kernel could not be
retrieved from the pool or if the returned value is incorrect (in other words, if the answer is not 5). This could happen
if the pools are already full and no kernels are released.

17

18 • 4 MapleNet Metrics and Monitoring

Command Line Parameter
DomainWebServer.Endpoints.HealthCheck.LicenseCheck boolean

Default
true

WebServer.Endpoints.HealthCheck.Pool.Document boolean

true

WebServer.Endpoints.HealthCheck.Pool.Compute boolean

true

WebServer.Endpoints.HealthCheck.Pool.Fallback boolean

true

WebServer.Endpoints.HealthCheck.KernelTimeout positive
integers

10

WebServer.Endpoints.HealthCheck.QueueTimeout positive
integers

10

PurposeSet to false to disable the license
check, true to enable it
Set to true to exercise the document
kernel pool, false to disable it
Set to true to exercise the compute
kernel pool, false to disable it
Set to true to exercise the fallback
kernel pool, false to disable it
The amount of time (in seconds) the
check will wait for a kernel to returnthe results of the test command
The amount of time (in seconds) the
check will wait for a kernel to beallocated from a pool

Monitoring
The monitoring endpoint is /monitoring/. When an HTTP GET accesses this endpoint, a snapshot of the internal
state of MapleNet as a string of JSON is returned. The information displayed can be divided into two types, static
values and dynamic values. The static values are values defined at MapleNet start up time, for example configuration
values and version information. Dynamic values are values that change as clients connect to MapleNet, for example
connected clients and open documents. If you want to view the monitoring data in a web browser, plugins are available
for pretty printing JSON. This makes the monitoring output more human readable.
Value
LimiterengineManager

documentManager

clients

helpDatabases
VersionlicenseStart Up Configuration

Definition
The limiter describes the number of running Maple engines. A running Maple engine
corresponds to the restrictions imposed by the license. A waitingEngine is an engine that
can't run because the maximum number of running engines has been reached.
The engineManager provides a detailed breakdown of the Maple engines in use by MapleNet.
Document engines are engines connections to open documents. Compute engines are used
for the compute endpoint. As compute engines are pooled and reused, there is list of pooled
compute engines.
The documentManager section describes the documents currently opened by clients. Each
open document lists the following fields: id a unique id assigned to that copy of the open
document, the name of the document, the working directory of the document and the sourceof the document. The working directory is where the content created for displaying the
document is kept.
The clients section describes the document clients currently connected to MapleNet Server.
Each client lists the IP address from which they are connected and the id of the documentthat they have opened.
The helpDatabases section describes the help database found for use with the help endpoints.
The Version section describes the versions of the various pieces used by MapleNet. This
include the MapleNet and Maple build dates, release ids and build ids. These values areuseful when reporting bugs or contacting Maplesoft Support.
The license section describes the license being used.
The Start Up Configuration section describes the values applied by the MapleNetconfiguration. This combines the options set with configuration variables and default values.

4.1 Metrics and Monitoring Tools • 19

Logging

The Logging section describes the current logging settings, the level and whether AutoFlushor Synchronous options are enabled.

Metrics over Prometheus
Metric Group: Web Endpoint Handling

Metricrequest_latency_seconds

Metric Type
Histogram

Domain
Non-negative double

Description
A histogram of HTTP request
handling latencies. Eachdatapoint is given two labels:
the HTTP request method, andthe handler.
The HTTP methods are:• get
• post• put• delete• head• options• patchThe handlers are:Handler Nameworksheet
html_file

Expected HTTP Method
get
get

soap
mcs
computeattachment
versionuploadmonitoring
healthcheck

get
post
post
get
get
post
get, post
get

PurposeThe handler responds to requests to *.mw and *.maple
Responds to *.html. Performs substitutions in html files, namely${MAPLE_CLOUD_CDN} to the maple cloud cdn value provide
in the docker configuration.
Responds to SOAP requests at /services/MapleService
Responds to /mnserver/mcs protobuf requests.
Responds to /mnserver/compute
Responds to /attachment/
Responds to /maplenet/mnstatus/version.jsp
Responds to /upload
Responds to /monitoring/Responds to /healthcheck/

Metric Group: Webserver Monitoring
Metricactive_connections

Metric Type
Gauge

Domain
Non-negative integer

Description
The current number ofconnections

20 • 4 MapleNet Metrics and Monitoring

max_active_connections

Counterconnections_total

Counterrequests_total

Counter

data_received_bytes_total

Counter

data_sent_bytes_total

Counter

Non-negative, monotonicallyincreasing integer

High watermark for the
maximum number ofsimultaneous connections.
Non-negative, monotonically The total number of connections
increasing integerthat the webserver has handled
Non-negative, monotonically The total number of requests
increasing integerthat the webserver has handled.
Non-negative, increasing integer The total number of bytes thewebserver has received.
Non-negative, increasing integer The total number of bytes thewebserver has sent

Metric Group: Prometheus Webserver Monitoring
MetricMetric Typeexposer_transferred_bytes_total Counter

exposer_scrapes_total

Counter

exposer_request_latencies

Summary

DomainDescription
Non-negative, increasing integer The number of bytes theprometheus webserver has
transmitted on the /metrics pageNon-negative, monotonically The number of times theincreasing integer/metrics page has been
generated
Non-negative float
The amount of time it takes togenerate the response to the/metrics page

Metric Group: Kernel Pool Monitoring
Metricengines

Metric Type
Gauge

Domain
Non-negative integer

Description
The number of engines running.
Two labels on this statistic are"pool", which can be"document", "compute", or"fallback". And "state", which
can be "idle", or "running".
Note: MapleNet does not pooldocument kernels, therefore
there will never be a metric withboth pool=document andstate=idle.

promised_engines

Gauge

Non-negative integer

Note: This does not distinguishbetween waiting document,
compute, or fallback kernels.

Metric Group: Protobuf Messages Monitoring
MetricMetric Type
workbook_handler_latency_seconds Summary

Domain
Non-negative float

Description
Records the amount of time it takes to handle
each protobuf message received on the
websocket. There is a unique label for each typeof protobuf message. The server does not have

4.1 Metrics and Monitoring Tools • 21

handlers for each message, thus some message
types are currently unreported. Some message
types are only meant to be sent from the server(for instance, ENGINE_STATUS).

The reported messages are:Message Type
Description
WORKSHEET_RENDER_COMPLETE Sent by the client when it has fully rendered the page.
UPDATE_IMAGE
Sets the content of an image from a specified file
UPDATE_CONTENTS
Updates the string contents of a model
SET_MODEL
Sets and saves the content for a model
SEND_MODEL_UPDATE
Sends a model update from the server to the client
QUERY_MODEL
Returns the value of a specific component (optionally including subcomponents) on a pageQUERY_CONTENTS
Returns a model's content for a specific model id
OPEN_WORKSHEETUse to open a worksheet
MODEL_UPDATE
An event fired by the server when a change in the model has happened, or when a client
wants to update the state of the model.
GET_ATTACHMENT_URL
Gets the URL for an attachment
GENERATE_PLOT_IMAGE
Generates an image for a plot. For instance, used to generate a thumbnail image of a plot.
EXECUTE_WORKBOOK_COMMAND Executes a workbook command. A workbook command is a message internal to the
MapleNetServer. Workbook handlers can be made of a sequence of workbook commands.
EC_SERVER_EVENT
Encodes plot events (play, pause, stop, etc)
EC_EVENT
Events for embedded components (button clicks, slider changes.
COMPUTE_PLOT
Used during testing
CLICK_BUTTON_GROUP
A button client event

Messages that the server doesn't explicitly handle (but accepts and no-ops):
Message Type
OPEN_FILEPINGCONFIG_OPTIONSACTIVE_CLIENTSVERSIONERROR_MESSAGE
DOCUMENT_LOAD_COMPLETE
OPEN_WORKBOOKENGINE_STATUS
WORKSHEET_SAVE_STATE

Description
A message used to open a file within a workbook
An application level ping, separate from the websocket-level ping message
A message the server sends to the client to provide configuration values
Used to provide statistics about the open documents of each client
A message the server sends to the client to provide version information
A message the server sends to the client so that the client can display an error message
generated by the server
A message the client sends to the server when a document has finished loading
The first message in a two step process to open worksheets
A message the server sends to the client to indicate when a kernel has started (or stopped)
running
A message the server sends to the client to indicate information about the saved state of theworksheet

Metric Group: License
MetricMetric Typelicense_expiry_remaining_seconds Gauge

Domain
Non-negative,
monotonically decreasing
integer

Description
Reports the amount of time until alicense will expire. The label "feature"
is used to differentiate different
license.
If a license in unexpiring, the entry for22 • 4 MapleNet Metrics and Monitoring

the license is "Nan".
Note: We do not report the timeremaining as an atomic operation.
Each time we calculate the amount oftime remaining on a license, we get
the current time in milliseconds.
Therefore, if two licenses have thesame expiry, the output of monitoring
will report a slight discrepancy
between the amount of time remaining
for each license.

Metric Group: Kernel
MetricMetric Typekernel_command_seconds Summary

Domain
Non-negative
float

Description
Reports the amount of time it takes for an engine to perform acommand. All commands are aggregated into the same metric,
kernel_command_seconds, unless the command is a bellwether
command where it is uniquely identified with a "command"label. A bellwether command is a command that is run on every
kernel. Bellwether commands include "_libraryversion();","kernelopts(toolboxversion);", "kernelopts(version);", and"interface(version);". All of these commands are executed ona kernel every time a kernel is started. The results are used toinitialize MapleNetServer values. Because these commands arealways executed, variations in these values could indicate achange in the deployment's health or performance.

Bellwether commands:
Command
Description_libraryversion();Kernel values needed by MapleNetServer. Executed ever time a new kernel is started.
kernelopts(toolboxversion); Kernel values needed by MapleNetServer. Executed ever time a new kernel is started.
kernelopts(version);
Kernel values needed by MapleNetServer. Executed ever time a new kernel is started.
interface(version);
Kernel values needed by MapleNetServer. Executed ever time a new kernel is started.
License Check;
The license check performed every time a kernel is started.
2+3;
The command sent to a kernel (in each of the compute, document, and fallback pools–if
configured) when /healthcheck/ is queried.

Note: bellwether commands are lazily added to the list of kernel_command_seconds and are not added to the list of
kernel_command_seconds until the command is first executed. For instance kernel_command_seconds{command="2+3"} will not appear in the list until the first time the health check is queried.

5 Example Configurations
This section contains example configurations for typical MapleNet deployments
The following variables are used in this document, and should be replaced with the correct values:
LICENSEFILE: The location of the MapleNet license file (on the Docker host)
HOSTPORT: The port on the host machine on which MapleNet should accept connections
IMAGETAG: The tag of the Docker image created by the installer
CONTENTDIR: The directory containing Maple content for hosting by MapleNet (on the Docker host)
MAPLEONLINECDNURL: The URL of a Content Delivery Network hosting the MapleNet JavaScript libraries
MATHJAXCDNURL: The URL of a Content Delivery Network hosting the MathJax JavaScript package
Additional documentation for the configuration variables used in these examples is available in the Configuration
section of the Administrators Guide. These examples are shown as separate commands, however arguments from one
example can, in general. be combined with arguments from other examples.
Note: In the following examples long commands are broken across multiple lines. The \ character is used to indicate
the continuation of the command on the next line. This is supported in many terminals so copying and pasting the entire
command should work. If that does not work, duplicating the command as a single line by omitting these charactersand joining the argument should also work.

5.1 Basic Document Hosting
These configurations are for customers who want to host Maple documents located within a directory on the Docker
host machine.

Mounting as a subdirectory of /webrootThe easiest way to add user content to the container is to simply mount the directory containing the content as a subdirectory of /webroot.
docker run --mount type=bind,source=$LICENSEFILE,target=/maple/license/license.dat,readonly \--mount type=bind,source=$CONTENTDIR,target=/webroot/content \--publish $HOSTPORT:8080 \--rm \
maplesoft/maplenet:$IMAGETAGWith this configuration, the files in the $CONTENTDIR directory are available under
http://localhost:$HOSTPORT/content
If you want to be able to navigate the directory structure via the web browser you can enable directory listings using
the MAPLENET_WEBSERVER_ENABLEDIRECTORYLISTING variable.

2324 • 5 Example Configurations

With this configuration the default locations of MapleNet's libraries are unaffected by the mount. However this does
leave the MapleNet landing page and example document on the server. If you want to replace the entire /webrootdirectory, the following configuration will do that.

Mounting on top of /webrootReplacing /webroot completely will hide the JavaScript libraries required for document rendering in MapleNet.
Therefore you will need to either use a Content Delivery Network (see next configuration) or copy those libraries into
your content directory so they continue to be available when /webroot is hidden. To copy the libraries from theDocker image, we first need to start the image. This is only to access the files, so a simple docker run commandis sufficient.
docker create --name copy_container \--rm maplesoft/maplenet:$IMAGETAG

We use the --name option to give the container a easy to remember name. We can now copy the directory containing
the MapleNet libraries to the directory of content we want to mount on top of /webroot.
docker cp -a copy_container:/webroot/mapleonline $CONTENTDIR
docker cp -a copy_container:/webroot/MathJax $CONTENTDIR

Now stop this container
docker stop copy_container
There should now be directories named mapleonline and MathJax within $CONTENTDIR containing the
JavaScript libraries from the Docker container.
Now we can start the Docker container with $CONTENTDIR replacing /webrootdocker run --mount type=bind,source=$LICENSEFILE,target=/maple/license/license.dat,readonly \--mount type=bind,source=$CONTENTDIR,target=/webroot \--publish $HOSTPORT:8080 \--rm \
maplesoft/maplenet:$IMAGETAGWith this configuration, the $CONTENTDIR directory is the root of the files served by MapleNet.

Using a Content Delivery Network for JavaScript libraries
If you are able to use a Content Delivery Network (CDN) to host MapleNet's JavaScript libraries this can simplify theprocess of replacing /webroot as the MapleNet content is no longer require to exist within the Docker container.
However to place the content on a CDN, it still needs to be extracted from the Docker image as described above. To
use a CDN, the following command should be useddocker run --env MAPLENET_WEBSERVER_MAPLECLOUDCDN=$MAPLEONLINECDNURL \--env MAPLENET_WEBCLIENT_CONFIGURATION="MathJaxCDN=$MATHJAXCDNRURL" \--publish $HOSTPORT:8080 \--mount type=bind,source=$LICENSEFILE,target=/maple/license/license.dat,readonly \--mount type=bind,source=$CONTENTDIR,target=/webroot \5.2 Basic Compute Hosting • 25--rm \
maplesoft/maplenet:$IMAGETAG

Logging Configuration
The following example configures the json-file logger (the docker default) to perform log rotation with three log files
each with a maximum size of 10 Mb. Thus if the current log file reaches 10 Mb and there are already three log files,
the oldest is deleted an a new log file is created.
docker run --log-opt max-size=10m \--log-opt max-file=3 \--mount type=bind,source=$LICENSEFILE,target=/maple/license/license.dat,readonly \--mount type=bind,source=$CONTENTDIR,target=/webroot \--publish $HOSTPORT:8080 \--rm \
maplesoft/maplenet:$IMAGETAGThe MapleNet container can also be configured to pass its logs to standard logging facilities, for example
docker run --log-driver syslog \--mount type=bind,source=$LICENSEFILE,target=/maple/license/license.dat,readonly \--mount type=bind,source=$CONTENTDIR,target=/webroot \--publish $HOSTPORT:8080 \--rm \
maplesoft/maplenet:$IMAGETAG

For a complete list of supported logging facilities, see the docker log driver documentation:
https://docs.docker.com/config/containers/logging/configure/

5.2 Basic Compute HostingThis example configuration is for MapleNet's compute API. The primary concern for the compute API is usually resource
limits. The following command starts MapleNet with restricted compute limits of 5 seconds of compute time and 500
MiB of memory.
docker run --env MAPLENET_POOL_COMPUTATIONTIMELIMIT=5 \--env MAPLENET_COMPUTEENGINE_DATALIMIT=500 \--mount type=bind,source=$LICENSEFILE,target=/maple/license/license.dat,readonly \--publish $HOSTPORT:8080 \--rm \
maplesoft/maplenet:$IMAGETAG

Cross-Origin Resource Sharing (CORS)

Cross-Origin Resource Sharing is a mechanism for allowing web applications running on one domain to access web
services running on another. Normally web browsers do not allow applications to access services running on different
domain. CORS allows the service to state if a domain is allowed to make requests to the server. This may be important
for the compute service if users have written web applications hosted on other domains and want access the computeservice. By default MapleNet is configured to not allow requests from different domains.

26 • 5 Example Configurations

The following configuration allow requests from any domain
docker run --env MAPLENET_WEBSERVER_CORS_ALLOWORIGIN="*" \--mount type=bind,source=$LICENSEFILE,target=/maple/license/license.dat,readonly \--mount type=bind,source=$CONTENTDIR,target=/webroot \--publish $HOSTPORT:8080 \--rm \
maplesoft/maplenet:$IMAGETAG

If you have a list of domains you are willing to accept requests from you can use a comma separated list of domain
names
docker run --env MAPLENET_WEBSERVER_CORS_ALLOWORIGIN="domain1.com,domain2.com,domain3.com" \--mount type=bind,source=$LICENSEFILE,target=/maple/license/license.dat,readonly \--mount type=bind,source=$CONTENTDIR,target=/webroot \--publish $HOSTPORT:8080 \--rm \
maplesoft/maplenet:$IMAGETAG

5.3 Adding Maple Libraries and Help Databases
Users can add Maple libraries and help databases to MapleNet. Adding Maple libraries allows hosted documents andcompute requests to access the Maple functionality in those libraries. Adding help databases allows MapleNet to host
Maple help pages for display in browsers. In this example we will simply add the user libraries and help databases tothe Maple library directory. For this example, we'll use $MAPLELIBRARYDIR to represent the path to a Maple library(.mla) $MAPLELIBRARY and $MAPLEHELPDIR to represent a the path to a Maple help database (.help) $MAPLEHELP.
docker run --mount type=bind,source=$LICENSEFILE,target=/maple/license/license.dat,readonly \--mount type=bind,source=$CONTENTDIR,target=/webroot \--mount type=bind,source=$MAPLELIBRARYDIR/$MAPLELIBRARY,target=/maple/lib/$MAPLELIBRARY \--mount type=bind,source=$MAPLEHELPDIR/$MAPLEHELP,target=/maple/lib/$MAPLEHELP \--publish $HOSTPORT:8080 \--rm \
maplesoft/maplenet:$IMAGETAG

Multiple libraries and help database can be added by having multiple mount commands.
Care must be taken to not override the default Maple libraries (maple.mla, update.mla,MathematicalFunctions.mla or
MTM.mla) as this would remove Maple (and MapleNet) functionality. If the name of your library conflicts with anexisting Maple library, you can simply mount it with a different name.
docker run --mount type=bind,source=$LICENSEFILE,target=/maple/license/license.dat,readonly \--mount type=bind,source=$CONTENTDIR,target=/webroot \--mount type=bind,source=$MAPLELIBRARYDIR/maple.mla,target=/maple/lib/mymaple.mla \--publish $HOSTPORT:8080 \--rm \
maplesoft/maplenet:$IMAGETAG

Changing the URL for the Help Database
If you are hosting a help database, you can change the value of URL that MapleNet uses for help by using the WebClient.HelpUrl command parameter.

5.4 Enabling the Upload Page • 27

For example, to instruct MapleNet to use "http://exampledatabase.com/help" as the help database URL:
docker run --mount type=bind,source=$LICENSEFILE,target=/maple/license/license.dat,readonly--publish $HOSTPORT:8080 maplesoft/maplenet:$IMAGETAG--WebClient.HelpUrl "http://exampledatabase.com/help"(5.1)

5.4 Enabling the Upload Page
MapleNet includes an upload page that allows users to upload Maple documents to MapleNet from their web browsers.
To enable this feature the MAPLENET_WEBSERVER_ENDPOINTS_UPLOAD variable must be set. In addition, theupload page displays the contents of the upload directory if MAPLENET_WEBSERVER_ENABLEDIRECTORYLISTING
is set.
docker run --env MAPLENET_WEBSERVER_ENDPOINTS_UPLOAD=true \--env MAPLENET_WEBSERVER_ENABLEDIRECTORYLISTING=true \--mount type=bind,source=$LICENSEFILE,target=/maple/license/license.dat,readonly \--mount type=bind,source=$CONTENTDIR,target=/webroot/content \--publish $HOSTPORT:8080 \--rm \
maplesoft/maplenet:$IMAGETAGWith these variables set, the upload page
http://$HOSTNAME/mapleonline/upload/upload.html

will be fully functional.
By default the upload directory lives within the docker container, thus when the container is restarted any uploads are
lost. To have the uploaded content persist between MapleNet restarts, mount a host directory on top of the upload directory. With this, the uploads are saved to the host directory. If /webroot is replaced with a host directory (as describedabove), uploads will be stored into the host directory. If that is not the case, the following command mounts the $UPLOADDIR from the host machine on top of the MapleNet upload directory.
docker run --env MAPLENET_WEBSERVER_ENDPOINTS_UPLOAD=true \--env MAPLENET_WEBSERVER_ENABLEDIRECTORYLISTING=true \--mount type=bind,source=$LICENSEFILE,target=/maple/license/license.dat,readonly \--mount type=bind,source=$CONTENTDIR,target=/webroot/content \--mount type=bind,source=$UPLOADDIR,target=/webroot/worksheet/upload \--publish $HOSTPORT:8080 \--rm \
maplesoft/maplenet:$IMAGETAG

5.5 Security Options
The following options implement the suggested configuration in the Security section of the Administrators Guide. It
also mounts $CONTENTDIR on top of /webroot as described above.
docker run --env MAPLENET_ENDPOINTS_COMPUTE=false \--env MAPLENET_ENDPOINTS_HELP=false \--env MAPLENET_DOCUMENTENGINE_CPULIMIT=120 \--env MAPLENET_DOCUMENTENGINE_DATALIMIT=2048 \--mount type=bind,source=$LICENSEFILE,target=/maple/license/license.dat,readonly \--mount type=bind,source=$CONTENTDIR,target=/webroot \--publish $HOSTPORT:8080 \28 • 5 Example Configurations--rm \
maplesoft/maplenet:$IMAGETAG

5.6 Troubleshooting

Docker not starting

Error: Bind for $HOSTPORT failed: port is already allocated

The port you specified for MapleNet to listen on is already in use. This could be caused by an existing MapleNet instanceusing the same port. Running
docker ps
will show all the running Docker containers as well as the port they are using. You can use docker stop to stop arunning container or select a different port for MapleNet.

MapleNet is not starting

Error: The license file, /maple/license/license.dat, does not exist
This indicates that MapleNet was unable to locate a valid license. Make sure you completed the installation step toobtain a valid license and that it was correctly mounted into the Docker container.

Error: Unable to create compute cache directory
If you are mounting on top of /webroot, MapleNet needs to be able to create directories in the mounted directory.
The permissions on the $CONTENTDIR may be preventing MapleNet from doing so.

5.6 Troubleshooting • 29

Performances Issues
Error: Users seeing "Time out" errors when accessing MapleNet

When users see time out errors when connecting to MapleNet, this usually indicates that MapleNet is overloaded.
There are a few configuration options that may be able to solve these issues.
MAPLENET_WEBSERVER_NUMTHREADS: The MapleNet web server has a limited number of threads to handle incoming connections. If you are handling a large number of incoming connections you may need to increase this value.
Be aware that increasing the number of web server threads also increases the amount of memory MapleNet will use.
MAPLENET_POOL_MAXENGINES: MapleNet maintains a pool of Maple engines. If there are a large number of open
documents, it is possible to reach this limit. Increasing this limit will allow more users to have open documents on
MapleNet. Each running Maple engine requires memory, so this will also lead to higher memory usage. This variable
does not effect the maximum number of running engines, simply the maximum number of open engines.
MAPLENET_POOL_QUEUETIMELIMIT: MapleNet has a limit on the number of engines that can run at the sametime (limited by the MapleNet license). When MapleNet runs a command it may need to wait if the maximum numberof engines are already running. This variable determines how long MapleNet should wait for an available engine before
aborting.
MAPLENET_WEBSERVER_REQUESTTIMEOUTMS: This variable limits how long MapleNet keeps a connection open
when it stops receiving messages from a client. The MapleNet client sends regular messages to keep the connection
alive and these are normally sufficient. However if users have low speed or unreliable connections, this timeout may
be exceeded, and the connection closed.

MapleNet memory usage
MapleNet allows multiple users to run commands in Maple on a single server. This can use a lot of memory, potentiallymaking the host machine unstable. If you have problems with excessive memory usage, you can try adjusting the following variables.
MAPLENET_POOL_MAXENGINES: Reduce the maximum number of open Maple engines, with the trade off ofallowing fewer users to access MapleNet.
MAPLENET_COMPUTEENGINE_DATALIMIT and MAPLENET_DOCUMENTENGINE_DATALIMIT: Thesevariables limit the amount of memory a single compute or document engine can use. Setting these limits will stop individual connections from using a large amount of memory, with the trade off that large computations may not be able
to finish.
MAPLENET_ENGINE_JAVADATALIMIT: If you see mjava processes consuming large amounts of memory, adjusting
this variable may help. In some circumstances (machines with a large amount of memory) the java virtual machine
may use a large amount of memory instead of collection more quickly. This variable forces java to work within asmaller memory footprint.

Increase the number of allowed running engines
If the none of the suggestions above help, and you are seeing high load on the machine, then you many need to increase
the number of licensed running engines. Before doing this, verify that during peak load times, you are seeing one runningengine for each allowed running engine in your license. The easiest way to do this is to look at the MapleNet monitoring
page. In the limiter section you should see three values, maxRunningEngines, runningEngines and30 • 5 Example Configurations

waitingEngines. If waitingEngines is greater than 0, then MapleNet is running at or beyond it optimal its
capacity. You may need to increase your number of licensed engines to allow more engines to run in parallel. This
only makes sense if you also have available CPU resources. MapleNet is designed to run with one core per runningengine. Running MapleNet with more allowed running engines than CPU cores is not suggested, and will not increase
performance.

6 Copyright
6.1 Client Side Software Copyright Statements
error_prone_annotations
http://www.apache.org/licenses/LICENSE-2.0

j2objc-annotations 1.3
Copyright © 2015 Google, Inc.
http://www.apache.org/licenses/LICENSE-2.0

guava 23.0
Copyright © 2017 Google, Inc
http://www.apache.org/licenses/LICENSE-2.0

guava-gwt 23.0
Copyright © 2017 Google, Inc.
http://www.apache.org/licenses/LICENSE-2.0

gwtquery 1.5 beta 1
Copyright © 2017 Google, Inc
http://www.apache.org/licenses/LICENSE-2.0

gwtexporter 2.5.0
Copyright © 2007 Timepedia.org
http://www.apache.org/licenses/LICENSE-2.0

eventbinder 1.10
Copyright © 2014 Google, Inc.
http://www.apache.org/licenses/LICENSE-2.0

akjavaCopyright © 2011- 2013 Aki Miyazaki
http://www.apache.org/licenses/LICENSE-2.0

gwt-log 3.3.2
Copyright © 2014 Google, Inc.
http://www.apache.org/licenses/LICENSE-2.0

GWT 2.8.1
Copyright © Google, Inc.

31

32 • 6 Copyright

http://www.apache.org/licenses/LICENSE-2.0

6.2 Server Side Software Copyright Statements
Maple Licensed Code
Maple/MapleNet has licensed code from the following sources:
Star Division GmbH
• Portions Copyright © 1991 - 1994 by Star Division GmbH.
Mathematics Dictionary• The mathematics dictionary utilized both in whole and in parts within the Help system of Maple is utilized with thepermission of MathResources Inc., and the authors of the database Borwein, Dr. Jonathan and Borowski, Mr. Ephraim(1997), The MathResource: Interactive Math Dictionary. Nova Scotia: MathResources Inc. (www.mathresources.com).
FLEXlm• FLEXlm Copyright © 1994, 2004 by Macrovision Corporation.
Intel• Intel® MKL Copyright © 1999, 2000-2008 Intel Corporation. All rights reserved.
• Intel® IPP Copyright © 2012 Intel Corporation. All rights reserved.
• Intel® RunTime Copyright © 2012 Intel Corporation. All rights reserved.
Dr. Piet Jonas• WMFWriter
http://piet.jonas.com/WMFWriter/WMFWriter.html
Microsoft• MSVC Redistributable
Microsoft Software License Terms MSVC 2013
Microsoft Software License Terms MSVC 2015
NICONET• NICONETThe Maple routines LinearAlgebra[CARE] and LinearAlgebra[DARE] are based on the SLICOT library. All rights,
title and interest in and to SLICOT is, and shall at all times remain, the sole and exclusive property of NICONET as
the developers of the software library. Maplesoft shall have all right, title and interest in and to any modifications, error
corrections, derivatives, or enhancements made from or to SLICOT by Maplesoft.
http://www.niconet-ev.info/en/
http://www.slicot.org/
TeamDev• JNIWrapper
https://www.teamdev.com/jniwrapper-licence-agreement6.2 Server Side Software Copyright Statements • 33

Open Source
Abseil Python Common Libraries
Abseil Python Common Libraries (absl-py) - © 2018 The Abseil Authors
https://github.com/abseil/abseil-py
Apache License Version 2.0
Adaptive Precision Floating-Point Arithmetic and Fast Robust Predicates for Computational Geometry
This code is in the public domain
https://www.cs.cmu.edu/%7Equake/robust.html
Apache Batik• Apache Batik 1.10 - Copyright © 2002-2018 The Apache Software Foundation.
http://xmlgraphics.apache.org/batik/
Apache License Version 2.0
Apache Commons Codec• Apache Commons Codec 1.8 - Copyright © 2002-2013 The Apache Software Foundation.
http://commons.apache.org/proper/commons-codec/archives/1.8/index.html
Apache License Version 2.0
Apache Commons IO• Apache Commons IO 2.4 - Copyright © 2002-2014 The Apache Software Foundation.
http://commons.apache.org/proper/commons-io/
Apache License Version 2.0
Apache FOP• Apache FOP - Copyright © 1999-2010 The Apache Software Foundation
http://xmlgraphics.apache.org/fop/
Apache License Version 2.0
Apache log4j• Apache log4j 1.2.3 - Copyright © 1999-2012 The Apache Software Foundation
http://logging.apache.org/log4j/1.2/
Apache License Version 2.0
Apache POI• Apache POI 3.17 - Copyright © 2002-2010 The Apache Software Foundation.
http://poi.apache.org/
Apache License Version 2.0

34 • 6 Copyright

Apache Xerces2 Java
• Apache Xerces2 Java Parser 2.3.0 - Copyright © 1999-2003 The Apache Software Foundation.
http://xerces.apache.org/xerces2-j
Apache License Version 2.0
Apache Xalan-Java• Apache Xalan-Java - Copyright © 1999-2014 The Apache Software Foundation. All rights reserved.
https://xalan.apache.org/
Apache License Version 2.0
Apache XMLBeans• Apache XMLBeans 2.3.0 - Copyright © 2004 The Apache Software Foundation. All rights reserved.
http://xmlbeans.apache.org/
XMLBeans NOTICEApache License Version 2.0
arb• C library for arbitrary-precision interval arithmetic.
Copyright © 2012-2018, Fredrik Johansson
The arb library is distributed under the terms of the GNU Lesser General Public License Version 2.1. In accordancewith this license, we are making the version of the arb source code that Maple uses available for download at http://www.maplesoft.com/support/downloads/source.
GNU Lesser General Public License
astor -- AST observe/rewrite
Coyright © 2012, Patrick Maupin
Coyright © 2013, Berker Peksag
Coyright © 2008, Armin Ronacher
https://github.com/berkerpeksag/astor
BSD License (3-Clause)
ATLAS• ATLAS Automatically Tuned Linear Algebra Software Copyright © 1998-2008 R. Clint Whaley.
http://math-atlas.sourceforge.net
ATLAS License Agreement
Beautiful Soup
• Copyright © 2004-2018 Leonard Richardson. Distributed under the terms of the MIT License.
Beautiful Soup incorporates code from the html5lib library, which is also made available under the MIT license.
Copyright © 2006-2013 James Graham and other contributors.

6.2 Server Side Software Copyright Statements • 35

BLAD
• BLAD, BMI
The Maple package DifferentialAlgebra uses the BLAD and BMI libraries. These libraries are free and are protectedunder the GNU Lesser General Public License Version 2.1.
In accordance with this license, we are making the versions of the BLAD and BMI source code that Maple uses
available for download at http://www.maplesoft.com/support/downloads/source. A copy of the license file for each isincluded (see "COPYING.LIB").
GNU Lesser General Public License
bleach• Copyright © 2014-2016, Mozilla Foundation. Distributed under the terms of the Apache License Version 2.0.
Boost
• Boost - Copyright © 1999-2015 Boost contributors
http://www.boost.org/
Boost License Agreement
CivetwebCopyright © 2013-2018 The CivetWeb developers
https://github.com/civetweb/civetweb
CLAPACK• CLAPACK
Maple uses portions of the CLAPACK library. For more information, see LAPACK Users' Guide, Third Edition byAnderson, E.; Bai, Z.; Bischof, C.; Blackford, S.; Demmel, J.; Dongarra, J.; Du Croz, J.; Greenbaum, A.; Hammarling,S.; McKenney, A.; and Sorensen, D. or visit:
http://www.netlib.org/lapack/lug/
http://www.netlib.org/clapack/
CLAPACK License Agreement
http://www.netlib.org/lapack/
LAPACK License
ControlsFX• ControlsFX - Copyright © 2013, 2014
http://fxexperience.com/controlsfx/
ControlsFX License
CoolProp• CoolProp
The Maple package ThermophysicalData uses the CoolProp library. For more information, see http://www.coolprop.org/
or the citation below.

36 • 6 Copyright

The license for the CoolProp library is available on the License-CoolProp help page.
Bell, Ian H.; Wronski, Jorrit; Quoilin, Sylvain; and Lemort, Vincent. Pure and Pseudo-pure Fluid Thermophysical
Property Evaluation and the Open-Source Thermophysical Property Library CoolProp. Industrial & Engineering
Chemistry Research, Vol. 53 No. 6 (2014), pp. 2498--2508; http://www.coolprop.org/.
Cuba• CubaMaple uses the Cuba library, developed by Thomas Hahn and distributed via http://www.feynarts.de/cuba/. It is distributed under the terms of the GNU Lesser General Public License Version 3. In accordance with this license, we
are making the version of the Cuba source code that Maple uses available for download via http://www.maplesoft.com/support/downloads/source. A copy of the license file is included in the archive available there(see "COPYING").
GNU Lesser General Public License version 3
CUDA• CUDA
The Maple package CUDA uses the CUDA® library from NVIDIA®.
https://developer.nvidia.com/cuda-toolkit
NVIDIA License
cURL• cURL 7.62.0 Copyright 1996 - 2018 David Stenberg and others (see THANKS page)https://curl.haxx.se/
cURL License
DocBook XSL Stylesheets
Copyright © 1999-2007 Norman Walsh
Copyright © 2003 Jiří Kosek
Copyright © 2004-2007 Steve Ball
Copyright © 2005-2009 The DocBook Project
DocBook XSL Stylesheets License Agreement
http://docbook.sourceforge.net/
dom4j• dom4j Copyright © 2001 - 2016 by MetaStuff, Ltd. and DOM4J contributors. All Rights Reserved.
dom4j Copyright and License Agreement
enum34• Copyright © 2013, Ethan Furman. Distributed under the terms of the BSD License (3-Clause).
f2c• f2c Copyright © 1990 - 1997 by AT&T, Lucent Technologies and Bellcore.

6.2 Server Side Software Copyright Statements • 37

f2c Copyright and License Agreement
FLINT• FLINT: Fast Library for Number Theory
FLINT is a C library for doing number theory, maintained by William Hart.
The FLINT library is distributed under the terms of the GNU Lesser General Public License Version 2.1. In accordancewith this license, we are making the version of the FLINT source code that Maple uses available for download at http://www.maplesoft.com/support/downloads/source.
GNU Lesser General Public License
FreeHEP• The FreeHEP Java library is distributed under the terms of the GNU Lesser General Public License Version 2.1.
In accordance with this license, we are making the version of the FreeHEP source code that Maple uses available
for download at http://www.maplesoft.com/support/downloads/FreeHEP.html. A copy of the license file is included(see "COPYING.LIB").
GNU Lesser General Public Licensegast• Copyright serge-sans-paille. Distributed under the terms of the BSD License (3-Clause).
https://pypi.org/project/gast/
GCC• The GCC Runtime Libraries - Copyright © 2009 Free Software Foundation, Inc.
The GCC Runtime Libraries source code is distributed under the GNU General Public License version 3 with theadditional permission of the GCC Runtime Library Exception.
In accordance with this license, we are making the version of the GCC source code that Maple uses available fordownload at http://www.maplesoft.com/support/downloads/source. A copy of the license file is included (see
"COPYING.RUNTIME").
GNU Lesser General Public License version 3
GCC Runtime Library Exception
http://gcc.gnu.org
GeoNames• All works from GeoNames are licensed under the Creative Commons Attribution 3.0 License.
http://www.geonames.org/
CC BY 3.0
GL2PS C library• Copyright © 2003 Christophe Geuzaine
In accordance with this license, we are making the version of the GL2PS source code that Maple uses available fordownload at http://www.maplesoft.com/support/downloads/source. A copy of the license file is included (see
"COPYING.GL2PS").
GL2PS License Agreement

38 • 6 Copyright

GMP• GMP 5.1.1 Copyright © 1996 - 2013.
The GMP library is distributed under the terms of the GNU Lesser General Public License Version 3. In accordancewith this license, we are making the version of the GMP source code that Maple uses available for download at http://www.maplesoft.com/support/downloads/GMP.html. A copy of the license file is included (see "COPYING.LIB").
GNU Lesser General Public License version 3
google• Google search from Python.
Copyright © 2018 Mario Vilas. Distributed under the terms of the BSD License (3-Clause).
https://breakingcode.wordpress.com/2010/06/29/google-search-python/
grpcio• Copyright © 2015 - 2018 the gRPC authors.
Distributed under the terms of the Apache License Version 2.0.
https://pypi.org/project/grpcio/
Henry Spencer• Regular expression code. Copyright © 1986, 1993, 1995 by University of Toronto. Written by Henry Spencer.
Henry Spencer Permission Statement
html5lib• Copyright © 2006-2013 James Graham and other contributors.
Distributed under the terms of the MIT License.
https://pypi.python.org/pypi/html5lib
ICU• International Components for Unicode
Copyright © 1995-2015 International Business Machines Corporation and others
ICU License
http://site.icu-project.org/
Info-Zip• Info-Zip - Copyright © 1990-2009 Info-ZIP. All rights reserved.
http://www.info-zip.org/
Info-Zip License
iText• iText Library - Copyright © 1999-2009 by Bruno Lowagie and Paulo Soares. All rights reserved.

6.2 Server Side Software Copyright Statements • 39

The iText library is distributed under the terms of the GNU Lesser General Public License Version 2.1. In accordancewith this license, we are making the version of the iText source code that Maple uses available for download at http://www.maplesoft.com/support/downloads/source. A copy of the license file is included (see "COPYING.LIB").
GNU Lesser General Public License
http://www.itextpdf.com/
Java• Java is a registered trademark of Oracle and/or its affiliates.
Oracle Binary Code License Agreement for the Java SE Platform Products and JavaFX
JavaMail
JavaMail uses several licenses:• Most of the JavaMail source code is licensed under the CDDL license and the GPLv2 with Classpath Exception license;
see the license information at the top of each source file.
• The source code for the demo programs is licensed under the BSD license; again, the license is in each source file.
• The binary jar files published to the Maven repository are licensed under the same CDDL and GPLv2+CE licenses
as the corresponding source code; see the file META-INF/LICENSE.txt in each jar file.
• The JavaMail API specification is licensed under the standard JCP Specification License.
You'll find the text of the CDDL and GPLv2+CE licenses in the workspace in the file mail/src/main/resources/METAINF/LICENSE.txt. The specification license is in the workspace at mail/src/main/java/doc-files/speclicense.html. Don't
let the presence of these license files in the workspace confuse you into thinking that they apply to all files in theworkspace.
In accordance with the CDDL, we are making the version of the JavaMail source code that Maple uses available fordownload at http://www.maplesoft.com/support/downloads/source.
The BSD License
JavaMail CDDL and GPLv2 with Classpath Exception
JCP Specification License
JOGL• JOGL (Java Binding for the OpenGL) is distributed under the terms of the JOGL License.
JOGL License
http://jogamp.org/jogl/www/• This software is based in part on the work of the Independent JPEG Group.
jsmn• JSON parser - http://zserge.com/jsmn.html
Copyright © 2010 Serge A. Zaitsev. Distributed under the terms of the MIT License.
jsoup: Java HTML Parser
jsoup HTML parser copyright © 2009-2016 Jonathan Hedley
The jsoup code-base (include source and compiled packages) are distributed under the open source MIT License.

40 • 6 Copyrighthttps://jsoup.org/
JUnit• JUnit unit testing framework - http://www.junit.org/
Distributed under the terms of the Eclipse Public License - v 1.0.
http://www.junit.org/
latex2mathml• Copyright © 2016-2019 Ronie Martinez. Distributed under the terms of the MIT License.
https://pypi.org/project/latex2mathml/
L2FProd Common Components
L2FProd 7.3 - Copyright © 2004-2007 L2FProd.com
Apache License Version 1.1
https://github.com/l2fprod/l2fprod-common
json-simple
JSON.simple - A simple Java toolkit for JSON
Apache License Version 2.0
https://code.google.com/archive/p/json-simple/
Libexslt• Libexslt - Copyright © 2001-2002 Thomas Broyer, Charlie Bozeman and Daniel Veillard. All Rights Reserved.
Libexslt License Agreement
http://xmlsoft.org/XSLT/EXSLT/index.html
LibJPEG• Copyright © 1991-1998, Thomas G. Lane.
LibJPEG License Agreement
http://libjpeg.sourceforge.net/
http://www.ijg.org/
libpng• libpng version 1.6.35 - July 15, 2018
Copyright © 1998-2018 Glenn Randers-Pehrson(Version 0.96 Copyright © 1996, 1997 Andreas Dilger)(Version 0.88 Copyright © 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
libpng License Agreement
http://www.libpng.org/pub/png/libpng.html

6.2 Server Side Software Copyright Statements • 41

LibTIFF• Copyright © 1988-1997 Sam Leffler and Copyright © 1991-1997 Silicon Graphics, Inc.
LibTIFF License Agreement
http://www.libtiff.org/
Libxml2• Copyright © 1998-2012 Daniel Veillard. All Rights Reserved.
Libxml2 License Agreement
http://xmlsoft.org/
Libxslt• Libxslt - Copyright © 2001-2002 Daniel Veillard. All Rights Reserved.
Libxslt License Agreement
http://xmlsoft.org/XSLT/LibYAML• LibYAML - YAML 0.2.1 parser - http://pyyaml.org/wiki/LibYAML
Copyright © 2017-2018 Ingy döt Net © 2006-2016 Kirill Simonov. Distributed under the terms of the MIT License.
LLVM• LLVM - Copyright © 2003-2013 University of Illinois at Urbana-Champaign.
Clang - Copyright © 2007-2013 University of Illinois at Urbana-Champaign.
LLVM and Clang are distributed under the LLVM Release License.
LLVM Release License
http://llvm.org
http://clang.llvm.org
MapleSAT• MapleSAT - An efficient SAT solver based on MiniSat
Copyright © 2016, Jia Hui Liang, Vijay Ganesh
Distributed under the terms of the MIT License.
https://sites.google.com/a/gsd.uwaterloo.ca/maplesat/
Markdown
Copyright 2007 - 2008 The Python Markdown Project (v. 1.7 and later)
Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b)
Copyright 2004 Manfred Stienstra (the original version)
Distributed under the terms of the BSD License (3-Clause).

42 • 6 CopyrightMesa• Mesa 7.2 - Copyright © 1999 - 2007 by Brian Paul
Copyright © 1994 - 1999 The XFree86 Project, Inc. All rights reserved.
Mesa Copyright and License Agreement
http://www.mesa3d.org/
miGIF Compression• mouse and ivo's GIF-compatible compression-run length encoding compression routinesCopyright © 1998 Intuit Inc.
miGIF Permission Statement
MiniSat• MiniSat is a minimalistic, open-source SAT solver - http://minisat.se/
Copyright © 2003-2006, Niklas Eén, Niklas Sörensson
Copyright © 2007-2010, Niklas Sörensson
Distributed under the terms of the MIT License.
Minizip• Minizip - Copyright © 1998-2010 Gilles Vollant
Version 1.2.11
Minizip: zip.h Copyright and License Agreement
Minizip: unzip.h Copyright and License Agreement
http://www.winimage.com/zLibDll/minizip.html
MorphAdorner• MorphAdorner
Copyright © 2006-2009 by Northwestern University. All rights reserved.
http://morphadorner.northwestern.edu/morphadorner/
MorphAdorner License Agreement
MPFR• The MPFR library is distributed under the terms of the GNU Lesser General Public License Version 2.1. In accordance with this license, we are making the version of the MPFR source code that Maple uses available fordownload at http://www.maplesoft.com/support/downloads/source. A copy of the license file is included (see
"COPYING.LIB").
GNU Lesser General Public License
http://www.mpfr.org/

6.2 Server Side Software Copyright Statements • 43

Nauty
• Nauty and Traces version 2.6r10, released November 25, 2017.
Nauty and Traces are programs for computing automorphism groups of graphs and digraphs. They can also produce
a canonical label.
See Nauty Copyright and License Statement for details on copyright and licensing.
http://pallini.di.uniroma1.it/
NumPy• Copyright © 2005-2017, NumPy Developers.
Distributed under the terms of the BSD License (3-Clause).
Open Watcom• Open Watcom is distributed under the terms of the Sybase Open Watcom Public License.
Sybase Open Watcom Public License
Part Of Speech Database• Part Of Speech Database (http://wordlist.sourceforge.net/pos-readme), compiled by Kevin Atkinson (kevina@users.sourceforge.net).
The part-of-speech.txt file contains is a combination of "Moby ™ Part-of-Speech II" and the WordNet database.
Part of Speech Database Copyright and Licensepip• Copyright © 2008 - 2018, the pip developers.
Distributed under the terms of the MIT License.
https://pypi.org/project/pip/
Protocol Buffers• Protocol Buffers - Google data interchange format
Copyright 2008 - 2018, Google Inc. All rights reserved.
Protocol Buffers License Agreement
https://developers.google.com/protocol-buffers/
Pthreads-win32
The pthreads-win32 software is distributed under the terms of the GNU Lesser General Public License Version 2.1.
In accordance with this license, we are making the version of the pthreads-win32 source code that Maple uses available
for download at http://www.maplesoft.com/support/downloads/source. A copy of the license file is included (see
"COPYING.LIB").
GNU Lesser General Public License
Python• Python
Copyright © 2001-2017 Python Software Foundation; All Rights Reserved44 • 6 Copyright

http://www.python.org/
Python License
QuantLib• QuantLib - A free/open-source library for quantitative financehttp://quantlib.org/
QuantLib License
Qhull• Qhull - Copyright © 1993-2015 C.B. Barber and The Geometry Center.
• http://qhull.org/• Qhull License
RSyntaxTextArea and AutoComplete• RSyntaxTextArea - Copyright © 2012 Robert Futrell. All Rights Reserved.
RSyntaxTextArea Copyright and License Agreement
http://bobbylight.github.io/RSyntaxTextArea/• AutoComplete - Copyright © 2012 Robert Futrell. All Rights Reserved.
AutoComplete Copyright and License Agreement
https://github.com/bobbylight/autocomplete
Setuptools• Copyright © 2016 Jason R Coombs <jaraco@jaraco.com>
Distributed under the terms of the MIT License.
Six• Copyright © 2010-2017 Benjamin Peterson
Distributed under the terms of the MIT License.
Sliding Layout and Universal Tween Engine• Sliding Layout - by Aurelien Ribon
http://github.com/AurelienRibon/sliding-layout
Apache License Version 2.0• Universal Tween Engine - by Aurelien Ribon
http://code.google.com/p/java-universal-tween-engine/
Apache License Version 2.0
SCOWL• Spell Checking Oriented Word Lists (SCOWL). (http://wordlist.sourceforge.net/scowl-readme)
Revision 7.1 (SVN Revision 161) January 6, 2011 by Kevin Atkinson (kevina@gnu.org)

6.2 Server Side Software Copyright Statements • 45

SCOWL Copyright and License
SQLite• SQLite
All of the code and documentation in SQLite has been dedicated to the public domain by the authors. All code authors,
and representatives of the companies they work for, have signed affidavits dedicating their contributions to the publicdomain and originals of those signed affidavits are stored in a firesafe at the main offices of Hwaci. Anyone is free tocopy, modify, publish, use, compile, sell, or distribute the original SQLite code, either in source code form or as acompiled binary, for any purpose, commercial or non-commercial, and by any means.
http://www.sqlite.org/
TensorBoard• Copyright 2018 The TensorFlow Authors. All rights reserved.
Distributed under the terms of the Apache License Version 2.0.
TensorFlow• Copyright 2018 The TensorFlow Authors. All rights reserved.
Distributed under the terms of the Apache License Version 2.0.
termcolor• Copyright 2008 - 2011 Volvox Development Team.
Distributed under the terms of the MIT License.
Thumbnailator - a thumbnail generation library
Copyright © 2008-2015 Chris Kroells
Distributed under the terms of the MIT License.
https://github.com/coobird/thumbnailator/
Triangle
Maple includes triangular meshes generated by Triangle.
https://www.cs.cmu.edu/%7Equake/triangle.html
UMFPACK,UFconfig, and AMD• UMFPACK Version 5.0.2 - Copyright © 1995-2006 by Timothy A. Davis. All Rights Reserved. Used by permission.
UFconfig Version 3.5.0 - Copyright © 2006-2009, Timothy A. Davis. All Rights Reserved. Used by permission.
AMD Version 2.2.1 - Copyright © 2009 by Timothy A. Davis, Patrick R. Amestoy, and Iain S. Duff. All Rights Reserved.
Used by permission.
The UMFPACK library and supporting libraries UFconfig and AMD are distributed under the terms of the GNU
Lesser General Public License Version 2.1. In accordance with this license, we are making the modified versions of
the UFconfig, AMD and UMFPACK source code that Maple uses available for download at the following links:
http://www.maplesoft.com/support/downloads/UFconfig-3.5.0.zip
http://www.maplesoft.com/support/downloads/AMD.zip (a copy of the license file is included - see "README.txt")

46 • 6 Copyright

http://www.maplesoft.com/support/downloads/UMFPACK.zip (a copy of the license file is included - see"README.txt")
The original code is available at: http://faculty.cse.tamu.edu/davis/SuiteSparse/.
GNU Lesser General Public License
Webencodings• Copyright © 2012 by Simon Sapin
python-webencodings License
Werkzeug• Copyright © 2015 by the Werkzeug Team, see AUTHORS for more details.
Distributed under the terms of the BSD License (3-Clause).
wheel• "wheel" copyright © 2012-2014 Daniel Holth <dholth@fastmail.fm> and contributors.
Distributed under the terms of the MIT License.
Z3• Z3 - Copyright © Microsoft Corporation. All rights reserved.
Distributed under the terms of the MIT License.
https://github.com/Z3Prover/z3/wiki
zlib• zlib general purpose compression library
Copyright © 1995-2017 Jean-loup Gailly and Mark Adler
Version 1.2.11, January 15, 2017
zlib license
http://zlib.net/

Font Licenses
Bitstream• DejaVu fonts
DejaVu fonts are copyright © 2003 by Bitstream, Inc. DejaVu changes are in public domain. Explanation of copyrightis on Gnome page on Bitstream Vera fonts. Glyphs imported from Arev Fonts are copyright © Tavmjung Bah.
DejaVu Fonts Copyright and License Agreement
STI Pub Companies• STIX font
The STIX font is copyright © 2001-2010 by the STI Pub Companies, with portions copyright © 1998-2003 by MicroPress, Inc. and copyright © 1990 by Elsevier, Inc.
STIX Font License

6.2 Server Side Software Copyright Statements • 47

The STIX Fonts Project
SIL Open Font License Version 1.1

MapleSim Open Source
MapleSim uses portions of the following technologies:jME• jME (http://www.jmonkeyengine.org), which is distributed under the terms of the Berkeley Software Distribution(BSD) license.
jME BSD License
Copyright © 2003-2010 jMonkeyEngine
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
• Redistributions of source code must retain the above copyright notice, this list of conditions and the following
disclaimer.
• Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
• Neither the name of 'jMonkeyEngine' nor the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIESOF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENTSHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESSINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Lightweight Java Game Library• Lightweight Java Game Library (http://www.lwjgl.org), which is distributed under the terms of the Berkeley
Software Distribution (BSD) license.
Lightweight Java Game Library BSD License
Copyright © 2002-2010 Lightweight Java Game Library Project
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
• Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer

48 • 6 Copyright• Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with the distribution.
• Neither the name of 'Light Weight Java Game Library' nor the names of its contributors may be used to endorse or
promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIESOF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENTSHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENTOF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THISSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

FFmpeg• FFmpeg (http://www.ffmpeg.org), which is distributed under the terms of the GNU Lesser General Public License
Version 2.1 license.
The FFmpeg library is distributed under the terms of the GNU Lesser General Public License Version 2.1. In
accordance with this license, we are making the version of the FFmpeg source code that MapleSim uses available
for download at http://www.maplesoft.com/support/downloads/source/. A copy of the license file is included (see
"COPYING.LIB").
GNU License Agreement
http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License,
version 2, hence the version number 2.1.]
Preamble
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU
General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure thesoftware is free for all its users.
This license, the Lesser General Public License, applies to some specially designated software packages--typicallylibraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest
you first think carefully about whether this license or the ordinary General Public License is the better strategy to use
in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed
to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish);6.2 Server Side Software Copyright Statements • 49

that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new
free programs; and that you are informed that you can do these things.
To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you tosurrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the libraryor if you modify it.
For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all therights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other codewith the library, you must provide complete object files to the recipients, so that they can relink them with the library
after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which
gives you legal permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the libraryis modified by someone else and passed on, the recipients should know that what they have is not the original version,
so that the original author's reputation will not be affected by problems that might be introduced by others.
Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that acompany cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder.
Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedomof use specified in this license.
Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license,
the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary
General Public License. We use this license for certain libraries in order to permit linking those libraries into non-freeprograms.
When a program is linked with a library, whether statically or using a shared library, the combination of the two islegally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore
permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits
more lax criteria for linking other code with the library.
We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than theordinary General Public License. It also provides other free software developers Less of an advantage over competing
non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries.
However, the Lesser license provides advantages in certain special circumstances.
For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library,so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more
frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain
by limiting the free library to free software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free programs enables a greater number of people to use alarge body of free software. For example, permission to use the GNU C Library in non-free programs enables many
more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.
Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of aprogram that is linked with the Library has the freedom and the wherewithal to run that program using a modified
version of the Library.
The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference
between a "work based on the library" and a "work that uses the library". The former contains code derived from thelibrary, whereas the latter must be combined with the library in order to run.

50 • 6 CopyrightTERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other program which contains a notice placed by the
copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public
License (also called "this License"). Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work which has been distributed under these terms. A"work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work
containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly intoanother language. (Hereinafter, translation is included without limitation in the term "modification".)"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete
source code means all the source code for all modules it contains, plus any associated interface definition files, plus
the scripts used to control compilation and installation of the library.
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope.
The act of running a program using the Library is not restricted, and output from such a program is covered only if its
contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether
that is true depends on what the Library does and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium,provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer
of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a
copy of this License along with the Library.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection
in exchange for a fee.
2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library,and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meetall of these conditions:• a) The modified work must itself be a software library.
• b) You must cause the files modified to carry prominent notices stating that you changed the files and the dateof any change.
• c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of thisLicense.
• d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application
program that uses the facility, other than as an argument passed when the facility is invoked, then you must
make a good faith effort to ensure that, in the event an application does not supply such function or table, thefacility still operates, and performs whatever part of its purpose remains meaningful.
(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independentof the application. Therefore, Subsection 2d requires that any application-supplied function or table used by thisfunction must be optional: if the application does not supply it, the square root function must still compute squareroots.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived fromthe Library, and can be reasonably considered independent and separate works in themselves, then this License, andits terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same
sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms ofthis License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardlessof who wrote it.

6.2 Server Side Software Copyright Statements • 51

Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather,
the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the
Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copyof the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU
General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU
General Public License has appeared, then you can specify that version instead if you wish.) Do not make any otherchange in these notices.
Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License
applies to all subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executableform under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
If distribution of object code is made by offering access to copy from a designated place, then offering equivalent accessto copy the source code from the same place satisfies the requirement to distribute the source code, even though third
parties are not compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by
being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative
work of the Library, and therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library(because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore
covered by this License. Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for thework may be a derivative work of the Library even though the source code is not. Whether this is true is especiallysignificant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to betrue is not precisely defined by law.
If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small
inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it islegally a derivative work. (Executables containing this object code plus portions of the Library will still fall under
Section 6.)
Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the termsof Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directlywith the Library itself.
6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library
to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided
that the terms permit modification of the work for the customer's own use and reverse engineering for debugging suchmodifications.
You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its
use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright52 • 6 Copyrightnotices, you must include the copyright notice for the Library among them, as well as a reference directing the user tothe copy of this License. Also, you must do one of these things:• a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above);
and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses
the Library", as object code and/or source code, so that the user can modify the Library and then relink to
produce a modified executable containing the modified Library. (It is understood that the user who changes
the contents of definitions files in the Library will not necessarily be able to recompile the application to use
the modified definitions.)• b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1)uses at run time a copy of the library already present on the user's computer system, rather than copying libraryfunctions into the executable, and (2) will operate properly with a modified version of the library, if the user
installs one, as long as the modified version is interface-compatible with the version that the work was madewith.
• c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
• d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent accessto copy the above specified materials from the same place.
• e) Verify that the user has already received a copy of these materials or that you have already sent this user a
copy.
For an executable, the required form of the "work that uses the Library" must include any data and utility programs
needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need
not include anything that is normally distributed (in either source or binary form) with the major components (compiler,
kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies theexecutable.
It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normallyaccompany the operating system. Such a contradiction means you cannot use both them and the Library together in an
executable that you distribute.
7. You may place library facilities that are a work based on the Library side-by-side in a single library together withother library facilities not covered by this License, and distribute such a combined library, provided that the separate
distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided
that you do these two things:• a) Accompany the combined library with a copy of the same work based on the Library, uncombined withany other library facilities. This must be distributed under the terms of the Sections above.
• b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library,and explaining where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under thisLicense. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you
under this License will not have their licenses terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission
to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept
this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate youracceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Libraryor works based on it.
10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives alicense from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions.

6.2 Server Side Software Copyright Statements • 53

You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.
11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited
to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict theconditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as
to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence
you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistributionof the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy
both it and this License would be to refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of thesection is intended to apply, and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest
validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution
system which is implemented by public license practices. Many people have made generous contributions to the wide
range of software distributed through that system in reliance on consistent application of that system; it is up to theauthor/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographicaldistribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if written in the body of this License.
13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License fromtime to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new
problems or concerns.
Each version is given a distinguishing version number. If the Library specifies a version number of this License whichapplies to it and "any later version", you have the option of following the terms and conditions either of that version
or of any later version published by the Free Software Foundation. If the Library does not specify a license version
number, you may choose any version ever published by the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible
with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation,
write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by thetwo goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuseof software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN
WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY \"AS IS\"WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITEDTO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD
THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR
OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANYCOPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY
AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,54 • 6 Copyright

INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE
OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATEWITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF
THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making
it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms(or, alternatively, under the terms of the ordinary General Public License).
To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source
file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and apointer to where the full notice is found.
one line to give the library's name and an idea of what it does.
Copyright (C) year name of author
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later
version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer"
for the library, if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written byJames Random Hacker.
signature of Ty Coon, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
WebM• WebM (http://www.webmproject.org), which is distributed under the terms of the Berkeley Software Distribution(BSD) licence.
WebM BSD License
Copyright (c) 2010, Google Inc. All rights reserved.

6.2 Server Side Software Copyright Statements • 55

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
• Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
• Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with the distribution.
• Neither the name of Google nor the names of its contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIESOF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENTSHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESSINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

56 • 6 CopyrightCPU Limit,Example, 27
Data Limit, 13
Data Limit,Example, 27
Disabling Maple Access to Operating System, 13
Specifying Command Line Arguments, 13
Enable Compute Endpoint, 7Example, 27
Enable Document Endpoint, 7Enable Download Endpoint, 7Enable Help Endpoint, 7Example, 27
Enable sendfile Command, 6
Enable Upload Endpoints, 7File Not Found, 5Injecting String into HTML Page Sent to Client, 8
Licensing, 5Managing Server Connections, 5Maple Configuration, 10
MapleNet Web Server Endpoints, 7
Mapping Help Links in Worksheets to Webpages, 8
Maximum Number of Maple Engines, 9
Maximum Number of Maple Engines for Image Plot
Generation, 9
Maximum Number of Threads Used for Accepting
Connections, 5Overview, 5Port for New Connections, 5
Set Client Configuration Values, 8Setting Maple libname Variable, 10
Setting Maximum Number of Running Engines, 9Setting Queue Time Limit, 9Setting Time Limit for Computations Related to OpenDocument, 9Setting Time Limit for Compute Requests, 9
Example, 25
Setting up content directories, 5Specify Java Data Limit, 11Specify the File that Should be Executed When Starting
Maple Engine, 10
SSL, 8
Certificate Authority Path, 8
Check for Certificates, 8Cypher List, 8
Default Values for Certificate Authority Path andFile, 8Specify Certificate Authority File, 8Specify Minimum SSL Protocol Version Accepted,
8Specify the Maximum Depth of a Certificate Authority File, 8
Verify Connecting Clients Have Valid Signed Certificate, 8
Web Server Request Timeouts, 5
Worksheet Template Location, 6

IndexA
Adding Content to MapleSim Server, 3CContent Delivery Network, 6, 24
CORS, 7
Example, 25D
Data Limit for Java Operations, 11
docker compose file, 2Docker Container, v
information
where to find, v
docker run command, 1
docker stack command, 2Document Hosting, 3E
Enable Directory Listings, 6, 23
Endpoints
Compute, 7
Document, 7Download, 7Help, 7
Upload, 7
Environment Variables
Base URL for JavaScript Library, 6
Compute Engine, 11
Disabling Security, 11Specify CPU Limit, 11Specify Data Limit, 11Specify Data Limit,Example, 25Specifying Extra Command Line Arguments, 11
Configuration Logging, 11
Disabling Logging, 11
Flushing Logs, 11Specify Log File, 11Specifying Logging Level, 11
Using Synchronous Logging, 11Content Delivery Network, 6
CORS
Allow Headers Header, 7
Allow Methods Header, 7
Allow Origin Header, 7
Cross-origin Resource Sharing, 7
Directory Listings, 6Document Engine, 13
CPU Limit, 1357

58 • Index

Example Configurations
Basic Compute Hosting, 25Content Delivery Network, 24
CORS, 25
Document Hosting, 23
Mounting as a subdirectory of webroot, 23
Mounting on top of webroot, 24
Overview, 23
Security Options, 27

MManaging MapleNet Server Connections
Environment Variables, 5MapleSim Server Basics, 1Metrics and Monitoring
Health Check, 17Metrics
Prometheus, 19
Monitoring, 18
Metrics and Monitoring Tools, 21
Mounting host directory as a subdirectory of webroot, 23
Mounting host directory into Docker container, 23
Mounting host directory on top of webroot, 24R
Replacing the MapleSim Server Landing Page, 3S
Security Issues, 15
Set MathJax Version, 8
Starting MapleSim Server, 1
docker run command, 1
Starting the MapleSim Server
docker compose file, 2
Stopping MapleSim Server, 3
Storing cache files, 5TTroubleshooting
Docker not starting, 28
MapleNet not starting, 28
Overview, 29
Performance Issues, 29Time out errors, 29
Trusted Users, 15U
Untrusted Users, 15Wwebroot directory, 5