MapleNet Administrator Guide

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

MapleNet Administrator Guide
Copyright
Maplesoft, MapleNet 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 Introduction ..................................................................................................................................... 1
1.1 MapleNet .................................................................................................................................. 1
1.2 Docker Container for MapleNet ..................................................................................................... 1
2 Basics of Running MapleNet ............................................................................................................... 3
2.1 Glossary of Variables Used in This Chapter ..................................................................................... 3
2.2 Loading the MapleNet Docker Image ............................................................................................. 3
2.3 Starting MapleNet ...................................................................................................................... 3
Starting MapleNet Using the docker run Command ........................................................................... 3
Starting MapleNet Using a docker compose File ............................................................................... 4
Replacing the Landing Page .......................................................................................................... 4
2.4 Stopping MapleNet ..................................................................................................................... 4
2.5 Removing a Docker Image ........................................................................................................... 5
2.6 Adding Content to MapleNet ........................................................................................................ 5
2.7 MapleNet Logging ...................................................................................................................... 5
docker log ................................................................................................................................. 5
MapleNet options ....................................................................................................................... 5
3 Environment Variable Configuration ..................................................................................................... 7
3.1 Licensing .................................................................................................................................. 7
3.2 Directory Setup .......................................................................................................................... 7
3.3 Managing Connections ................................................................................................................ 7
3.4 Directory Listings ....................................................................................................................... 8
3.5 Sendfile Usage ........................................................................................................................... 8
3.6 Content Delivery Network ............................................................................................................ 8
3.7 Worksheet Template Location ....................................................................................................... 8
3.8 Web Server Endpoints ................................................................................................................. 8
Health Check Endpoints ............................................................................................................... 9
3.9 CORS ...................................................................................................................................... 9
3.10 SSL ...................................................................................................................................... 10
3.11 Client Configuration ................................................................................................................ 10
3.12 Managing Maple Engines ......................................................................................................... 11
3.13 Maple Configuration ................................................................................................................ 12
3.14 Configuring Logging ............................................................................................................... 12
3.15 Data Limit ............................................................................................................................. 13
3.16 Compute Engine ..................................................................................................................... 13
3.17 Document Engine .................................................................................................................... 14
4 Security Issues ................................................................................................................................ 15
4.1 Untrusted Users ........................................................................................................................ 15
4.2 Trusted Users ........................................................................................................................... 15
5 MapleNet Metrics and Monitoring ...................................................................................................... 17
5.1 Metrics and Monitoring Tools ..................................................................................................... 17
Health Check ........................................................................................................................... 17
Monitoring .............................................................................................................................. 18
Metrics over Prometheus ............................................................................................................ 19
6 Example Configurations ................................................................................................................... 23
6.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
6.2 Basic Compute Hosting .............................................................................................................. 25iii

iv • Contents

Cross-Origin Resource Sharing (CORS) ........................................................................................ 25
6.3 Adding Maple Libraries and Help Databases .................................................................................. 26
Changing the URL for the Help Database ...................................................................................... 26
6.4 Enabling the Upload Page ........................................................................................................... 27
6.5 Security Options ....................................................................................................................... 27
6.6 Troubleshooting ........................................................................................................................ 28
Docker not starting .................................................................................................................... 28
MapleNet is not starting ............................................................................................................. 28
Performances Issues .................................................................................................................. 29
7 Copyright ...................................................................................................................................... 31
7.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
7.2 Server Side Software Copyright Statements ................................................................................... 32
Maple Licensed Code ................................................................................................................ 32
Open Source ............................................................................................................................ 33
Font Licenses ........................................................................................................................... 46
Index .............................................................................................................................................. 49

Overview
About MapleNet
Use MapleNet™ to share your Maple documents, calculators, and technical applications.
Maple provides the most intuitive interface available for creating web applications that rely on mathematical computations. You simply drag buttons, sliders, math input regions, and other interactive components into your Maple document
to create the interface, and add the functionality behind those components using Maple's high-level, mathematicallysophisticated programming language. Once completed, you simply save the Maple document on the MapleNet server
to make your application available online.

MapleNet Resources
Resource

Description
System requirements and installation instructions for MapleNet. The MapleNet
MapleNet Installation Guide
Installation Guide is available in the Install.html file located either on your MapleNet
installation DVD or the folder where you installed MapleNet.
MapleNet Administrator Guide
Instructions for using environment variables to configure the MapleNet server. Security
issues are also discussed.
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 MapleNet product documentation, contact
doc@maplesoft.com.

vvi • Overview

1 Introduction
1.1 MapleNet
MapleNet provides online viewing and execution of Maple documents and access to a Maple compute programming
interface. Maple worksheets and workbooks can be viewed in web browsers and embedded components in those documents are interactive. In addition, Maple help databases can be hosted to allow web-based navigation of Maple help
content. The compute endpoint allows programmatic access to the Maple computation engine. Third party applications
that require complex mathematical computations can send compute requests to MapleNet via a standard HTTP POST
request.
MapleNet 2020 and later versions provide a new implementation of the MapleNet feature set. It is designed to beeasier to maintain and deploy, more scalable and require less resources. It uses more current web and server technologies
to provide a better experience both for users and administrators. However, as this is a completely new code base, youare encouraged to contact Maplesoft with any issues that are not covered by the documentation.

1.2 Docker Container for MapleNet
The MapleNet server is intended to be deployed in the Docker container generated by the MapleNet 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 MapleNet 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 MapleNet and running the
MapleNet container see the MapleNet Installation Guide.
Note: Attempting to run MapleNet outside of the Docker container is not supported.

1

2 • 1 Introduction

2 Basics of Running MapleNet
2.1 Glossary of Variables Used in This Chapter
The following variables are used in this chapter, 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 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
HOSTADDRESS: Is either the ip address or machine address of the machine running the MapleNet 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 Environment Variable
Configuration (page 7).

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

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

2.3 Starting MapleNet
Starting MapleNet Using the docker run Command

To start MapleNet, run the following Docker command:
docker run --mount type=bind,source=$LICENSEFILE,target=/maple/license/license.dat,readonly --publish$HOSTPORT:8080 maplesoft/maplenet:$IMAGETAG

Note: If $LICENSEFILE contains spaces, then you must enclose the path in quotation marks. For example,
source="C:\Program Files\MapleNet\2021\license.dat".

3

4 • 2 Basics of Running MapleNet

To test if MapleNet 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 MapleNet Using a docker compose File
Alternatively, you can specify MapleNet options using a docker compose (YAML) file:version: 3.7
services:
maplenet:
image: maplesoft/maplenet:$IMAGETAG
ports:- "$HOSTPORT:8080"
volumes:- type: "bind"source: "$LICENSEFILE"
target: "/maple/license/license.dat"
read_only: true

The command used to deploy MapleNet isdocker stack deploy maplenet --compose-file <path to above file>
To test if MapleNet 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/.
For more information on docker compose files, see https://docs.docker.com/compose/gettingstarted/

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

2.4 Stopping MapleNet
To stop MapleNet:
1. At the prompt, to list your running containers, enter:docker container ls

2.5 Removing a Docker Image • 5

Find the running MapleNet container ID in the list.
2. Next, you must stop the MapleNet 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/

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

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

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

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 which controls how verbose MapleNet's logging is. This option accepts the following values (from most verbose to quietest): trace, debug, info,
warning, error, and fatal. The default logging level is info. This level is chosen to provide a balance of informative logging without being excessive. Increase the logging to debug or trace will provide additional logging,6 • 2 Basics of Running MapleNethowever 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.

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

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

3.2 Directory Setup
Environment Variable
Parameter
MAPLENET_WEBSERVER_DOCUMENTROOT directory

MAPLENET_WEBSERVER_CACHEDIR

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

directory

3.3 Managing Connections
Environment Variable
MAPLENET_WEBSERVER_REQUESTTIMEOUTMS

Parameter
timeout inmilliseconds

MAPLENET_WEBSERVER_NUMTHREADS

integer

MAPLENET_WEBSERVER_NOTFOUNDFILE

file

MAPLENET_WEBSERVER_PORT

port number

7

Description
This variable specifies how long, inmilliseconds, MapleNet waits before timing out
connections. The default value of this variable
is 30000 (30 seconds). Documents that are
opened by users will periodically connect toMapleNet to make sure those connections are
kept open. This timeout is mostly for cases
where clients disconnect without properly
closing their connection.
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 are used, MapleNet will not
be able to accept new connections.
This variable specifies a file to be sent to theuser when a requested file cannot be found. The
default is the empty string, which causes
MapleNet to reply with a very simple 404
message.
This variable specifies the port MapleNet listens
on for new connections. The default value of8 • 3 Environment Variable Configuration

this variable is 8080. This is the port within theDocker container. You will still need to map thisport to an external port on the host machine, thuschanging this is generally not required.

3.4 Directory Listings
Environment Variable
MAPLENET_WEBSERVER_ENABLEDIRECTORYLISTING

Parameter
booleanDescription
This variable specifies whether MapleNetpermits directory listings. The default value of
this variable is false. Directory listings allow
the user to navigate document root like afile system.

Parameter
booleanDescription
This variable specifies whether MapleNet uses
the sendfile command to optimize file transfers.
By default this option is enabled. In some hostconfigurations (certain networked or virtualized
file systems) using sendfile can lead to data
corruption in the transferred file.

Parameter
URL

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

3.5 Sendfile Usage
Environment Variable
MAPLENET_WEBSERVER_ENABLESENDFILE

3.6 Content Delivery Network
Environment Variable
MAPLENET_WEBSERVER_MAPLECLOUDCDN

3.7 Worksheet Template Location
Environment Variable
MAPLENET_WEBSERVER_MAPLEWORKSHEETParameter
filename

Description
This variable specifies the file to use as theWorksheet HTML template page. By default,
this file is/maple/data/MapleWorksheet.html.
Some users may want to use a custom versionof this file.

3.8 Web Server Endpoints
Environment Variable
MAPLENET_WEBSERVER_ENDPOINTS_COMPUTE

Parameter
boolean

MAPLENET_WEBSERVER_ENDPOINTS_DOCUMENT

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

3.9 CORS • 9

MAPLENET_WEBSERVER_ENDPOINTS_DOWNLOAD

boolean

MAPLENET_WEBSERVER_ENDPOINTS_HELP

boolean

MAPLENET_WEBSERVER_ENDPOINTS_UPLOAD

booleanfor 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
URL parameter 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.

Health Check Endpoints
Command Line Parameter
Parameter
MAPLENET_WEBSERVER_ENDPOINTS_HEALTHCHECK_LICENSECHECK boolean

MAPLENET_WEBSERVER_ENDPOINTS_HEALTHCHECK_POOL_DOCUMENT boolean

MAPLENET_WEBSERVER_ENDPOINTS_HEALTHCHECK_POOL_COMPUTE boolean

MAPLENET_WEBSERVER_ENDPOINTS_HEALTHCHECK_POOL_FALLBACK boolean

MAPLENET_WEBSERVER_ENDPOINTS_HEALTHCHECK_KERNELTIMEOUT positive
integers

MAPLENET_WEBSERVER_ENDPOINTS_HEALTHCHECK_QUEUETIMEOUT positive
integers

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

3.9 CORS
Environment Variable
MAPLENET_WEBSERVER_CORS_ALLOWORIGIN

Parameter
string

MAPLENET_WEBSERVER_CORS_ALLOWMETHODS

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

10 • 3 Environment Variable Configuration

hosted on different domains to access resourcesfrom MapleNet.
This variable specifies the value MapleNet sets
for the cross-origin resource sharing (CORS)
allow headers header. The default value for thisvalue is the empty string. CORS allows sites
hosted on different domains to access resourcesfrom MapleNet.

string

MAPLENET_WEBSERVER_CORS_ALLOWHEADERS

3.10 SSL
Environment Variable
MAPLENET_WEBSERVER_SSL_VERIFYPEERParameter
boolean

MAPLENET_WEBSERVER_SSL_CAPATH

directory

MAPLENET_WEBSERVER_SSL_CAFILE

file

MAPLENET_WEBSERVER_SSL_VERIFYDEPTH

integer

MAPLENET_WEBSERVER_SSL_DEFAULTVERIFYPATHS

boolean

MAPLENET_WEBSERVER_SSL_CIPHERLIST

comma
separated list
or ALL

MAPLENET_WEBSERVER_SSL_PROTOCOLVERSION

integer

MAPLENET_WEBSERVER_SSL_SHORTTRUST

booleanDescription
This variable specifies that MapleNet will
require that connecting clients have a valid
certificate.The default value of this variable isfalse. This allows the server to verify that any
connecting client has a certificate that is signed
by certificate authority from the server's trusted
certificate authorities.
This variable specifies a directory MapleNet
will use as its certificate authority (CA) path.
The default value of this variable is the empty
string, meaning no CA path will be added. This
directory will be searched for CA certificates in
PEM format.
This 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 isa file containing CA certificates in PEM format
This variable specifies the maximum depth of acertificate authority chain that MapleNet will
accept. The default value for this variable is 9.
This variable specifies whether MapleNet uses
default values for CAFILE and CAPATH. The
default is true. With this set MapleNet server
will use default, OS supplied, certificates
This variable specifies which ciphers MapleNetshould present to clients for use with SSL. The
default value for this variable is ALL, meaning
all available ciphers should be presented.
This variable specifies the minimal version of
SSL/TLS MapleNet will accept for connections.
The default value for this variable is 0.
This variable specifies whether MapleNet checks
for new certificates while it is running. The
default value for this variable is false. Whenset to true MapleNet will check for newcertificates added to the CAFILE or CAPATH.

3.11 Client Configuration
Environment Variable
MAPLENET_WEBCLIENT_CONFIGURATION

Parameter
key=value

Description
This variable is used to set client configuration values in
MapleNet.The default value for this variable is the empty
string (no values set). These key,value pairs are placed
into a JavaScript map in the MapleWorksheet.html

3.12 Managing Maple Engines • 11

MAPLENET_WEBCLIENT_ADDITIONALJAVASCRIPTURL string

MAPLENET_WEBCLIENT_HELPURL

URL

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 subdirectoryof MapleNet's document root. This can be used to place
the MathJax library on to a Content Delivery Network(CDN). MathJax.js will be appended to the given
URL.
This variable specifies a string that will be injected into
the HTML page sent to the client when opening a
document. The default value for this variable is the empty
string, which mean that nothing will be added to the page.
This can be used to add custom JavaScript to the page asviewed by the client.
This variable sets a URL that is used to map help links
in worksheets to web pages. The default value for thisvariable is /help/display. The help topic fromthe help link is appended to this value to form the URL
for the link. The default value maps the help links to thehelp endpoint of the server hosting the worksheet.
Assuming the help page exists in the help databases andthe help endpoints are enabled, then the help page should
display.
For instance, if the value of the help topic from the help
link is foo, then foo is appended to the
MAPLENET_WEBCLIENT_HELPURL value to makea full link to a page. In this case,/help/display/foo.
In the case where MapleNetServer is running with its own
help database, the default value, /help/display will
be sufficient. However, if you are not running with a help
database, and you want the help links to point tosomething else, for example, the online maplesoft help
database, then MAPLENET_WEBCLIENT_HELPURL
can be set to"https://www.maplesoft.com/support/help/maple/view.aspx?path="

3.12 Managing Maple Engines
Environment Variable
MAPLENET_POOL_MAXENGINES

MAPLENET_POOL_MAXFALLBACKENGINES

Parameter Description
integer This variable sets the maximum number of Maple engines that
MapleNet will start. The default value for this variable is 0,
meaning no limit. This value is different than
MAPLENET_POOL_MAXRUNNINGENGINES, as this limits thetotal number of engines that can be opened, not the number ofrunning engines.
integer This variable sets the maximum number of Maple engines that
MapleNet will start for image plot generation. If the value isnegative, the fallback engine pool is disabled. If 0, then a default
value is calculated (typically set to the number of CPUs in the12 • 3 Environment Variable Configuration

machine). The pool of engines for image plot generation is separate
from the pool for normal computation/document engines.
If MAPLENET_POOL_MAXFALLBACKENGINES is < 0 then
MAPLENET_WEBSERVER_ENDPOINTS_HEALTHCHECK_POOL_FALLBACK
is set to false (regardless of what it is set on the commandline orin an environment variable).
MAPLENET_POOL_COMPUTATIONTIMELIMIT
seconds This variable sets the timelimit for compute 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.
MAPLENET_POOL_DOCUMENTCOMPUTATIONTIMELIMIT seconds This variable sets the timelimit for computations related to an
open document (worksheet/workbook). The default value is 1200
seconds. Computations that last longer than this will be stoppedby MapleNet and an error will be returned.
MAPLENET_POOL_QUEUETIMELIMIT
seconds This variable sets the timelimit for requests (computation or
document) that are not able to run because MapleNet is notallowed to start a running engine. The default value for thisvariable is 60 seconds. An engine may not be available to run
because of limits on the number of 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.
MAPLENET_POOL_MAXRUNNINGENGINES
integer This variable sets the maximum number of running engines that
MapleNet will allow. It defaults to 0, which means the maximum
allowed by the license. It is an error to set this value greater thanthe license allows.

3.13 Maple Configuration
Environment Variable
MAPLENET_MAPLE_LIBRARY

Parameter
path

MAPLENET_MAPLE_MSERVER

filename

Description
This variable specifies a value to set for the Maple libnamevariable. The default is the empty string, which uses the default
value for Maple's libname. When specifying more that one path,use a comma (,) as a separator. When setting 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.
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.

3.14 Configuring Logging
Environment Variable
MAPLENET_LOGGING_DISABLE

Parameter
boolean

MAPLENET_LOGGING_FILENAME

filename

MAPLENET_LOGGING_FLUSH

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

3.15 Data Limit • 13

MAPLENET_LOGGING_LEVEL

log level

MAPLENET_LOGGING_SYNCHRONOUS

booleanreduce 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 muchoutput 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.

3.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 is 2048 MiB. The
Maple engine can utilize a Java virtual machine (JVM)
for certain operations. This variable limits the
maximum amount of memory the JVM is allowed touse.

Parameter
stringDescription
This variable specifies extra command line arguments
to use when starting a Maple engine for the computeendpoint. The default value for this variable is theempty string.
This variable specifies whether MapleNet disables
the security setting when starting a Maple engine forthe compute endpoint. The default value for thisvariable is false. The Maple engine has security
settings that restrict access to the operating system.
Disabling the security setting will disable theserestrictions, allowing Maple access to the entire
system.
This variable specifies whether MapleNet starts the
Maple engines for the compute endpoint with a CPU
limit. The default value for this variable is 0, whichmeans no 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 important to remember that compute engines are
re-used a limited number of times and the CPU limit
applies to the lifetime of the compute engine.
This variable specifies whether MapleNet starts the
Maple engines for the compute endpoint with a data
limit. The default value for this variable is 0, whichmeans no limit is given. Passing a data limit to the
Maple engine limits the maximum amount of memorya Maple engine can access. If this limit is exceeded
the Maple engine will shutdown. Compute engines
are restarted between each computation, so each

3.16 Compute Engine
Environment Variable
MAPLENET_COMPUTEENGINE_COMMANDLINE

MAPLENET_COMPUTEENGINE_DISABLESECURITY boolean

MAPLENET_COMPUTEENGINE_CPULIMIT

integer

MAPLENET_COMPUTEENGINE_DATALIMIT

integer

14 • 3 Environment Variable Configuration

computation should start with a minimal amount ofmemory.

3.17 Document Engine
Environment Variable
MAPLENET_DOCUMENTENGINE_COMMANDLINE

Parameter
string

MAPLENET_DOCUMENTENGINE_DISABLESECURITY

boolean

MAPLENET_DOCUMENTENGINE_CPULIMIT

integer

MAPLENET_DOCUMENTENGINE_DATALIMIT

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 MapleNetsecurity setting is disabled when starting a Maple
engine for a document. The default value for thisvariable 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 access to theentire system.
This variable specifies whether MapleNet starts
the Maple engines for documents with a CPU
limit. The default value for this variable is 0,
which means no limit is given. Passing a CPU
limit to the Maple engine 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 the total
amount of CPU time a document session canconsume.
This variable specifies whether MapleNet starts
the Maple engines for the compute endpoint witha data limit. The default value for this variable is0, which means no limit is given. Passing a data
limit to the Maple engine limits the maximum
amount of 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 adocument session can consume.

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

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

4.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 • 4 Security Issues

5 MapleNet Metrics and Monitoring
5.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 • 5 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.

5.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 • 5 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

5.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 • 5 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.

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

6.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 • 6 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 \6.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/

6.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 • 6 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

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

6.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"(6.1)

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

6.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 • 6 Example Configurations--rm \
maplesoft/maplenet:$IMAGETAG

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

6.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 • 6 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.

7 Copyright
7.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 • 7 Copyright

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

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

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

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

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

7.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 • 7 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/

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

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

7.2 Server Side Software Copyright Statements • 47

The STIX Fonts Project
SIL Open Font License Version 1.1

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

Index
A
Adding Content to MapleNet, 5C
Content Delivery Network, 8, 24
CORS, 9
Example, 25D
Data Limit for Java Operations, 13
docker compose file, 4Docker Container, 1
information
where to find, 1
docker run command, 3
docker stack command, 4Document Hosting, 5E
Enable Directory Listings, 8, 23
Endpoints
Compute, 8Document, 8Download, 8Help, 8
Upload, 8
Environment Variables
Base URL for JavaScript Library, 8Compute Engine, 13
Disabling Security, 13
Specify CPU Limit, 13
Specify Data Limit, 13
Specify Data Limit,Example, 25Specifying Extra Command Line Arguments, 13
Configuration Logging, 12
Disabling Logging, 12
Flushing Logs, 12Specify Log File, 12Specifying Logging Level, 12
Using Synchronous Logging, 12Content Delivery Network, 8
CORS
Allow Headers Header, 9
Allow Methods Header, 9
Allow Origin Header, 9
Cross-origin Resource Sharing, 9Directory Listings, 8Document Engine, 14
CPU Limit, 1449

50 • Index

Worksheet Template Location, 8
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

H
Health Check Endpoints, 9

MManaging MapleNet Server Connections
Environment Variables, 7MapleNet
Overview, 1MapleNet Basics, 3Metrics 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, 24O
Overview
MapleNet, 1R
Replacing the MapleNet Landing Page, 4S
Security Issues, 15
Set MathJax Version, 10Starting MapleNet, 3
docker run command, 3Starting the MapleNet
docker compose file, 4Stopping MapleNet, 4Storing cache files, 7TTroubleshooting
Docker not starting, 28
MapleNet not starting, 28
Overview, 29

Performance Issues, 29Time out errors, 29
Trusted Users, 15U
Untrusted Users, 15Wwebroot directory, 7