The core of an InstaLOD Grid network is the InstaLOD Grid server. It receives tasks from client nodes and distributes them across available workers. At the same time, the InstaLOD Grid server provides a web application that enables its user to leverage InstaLOD without installing any software. Setting up a server can be done with just a few clicks using the command line through InstaLOD Pipeline or InstaLOD Studio.
https://www.youtube.com/watch?v=i5GdOCK-6DA&list=PLeDPNRvpG2BFkd4Q6QYfd_fnVPPGsgcxW&index=2
Set the working directory to the InstaLOD Pipeline location using cd
(change directory). To start an InstaLOD Grid server, InstaLOD Pipeline needs to be executed with the -master
argument:
InstaLODCmd -master -bind <host-ip:port>
The host-ip:port
argument requires an IP address of a local network interface that the server will be bound to. The host-ip
is typically the local IP address of the machine and the port can be chosen arbitrarily.
In order to allow web users to execute mesh operations on the server, a valid profile needs to be loaded. Profiles can be loaded by specifying the -profile
argument followed by a filename:
-profile <filename>
The -profile
command is identical to setting up profiles in InstaLOD Pipeline. Please consult the InstaLOD Pipeline user manual for more information.
The following command sets up a server using port 8080 and loads two profiles:
InstaLODCmd -master -bind 192.168.123.45:8080 -profile Profiles/Optimize.json -profile Profiles/Remesh.json
The configuration of an InstaLOD Grid server is stored in a JSON file. InstaLOD Pipeline ships with a demo configuration file "server.json". To learn more about this configuration file, please read the dedicated section below.
To create a new server user, an entry in the "Users" section of the configuration must be added:
"Users" : [
{
"MachineKey" : "*",
"Password" : "12345678",
"Username" : "user1",
"Permissions" : ["Admin"]
},
{
"MachineKey" : "*",
"Password" : "87654321",
"Username" : "user2",
"Permissions" : ["ReadOwn", "CreateOwn", "UpdateOwn", "DeleteOwn"]
}
]
For additional authentication security, the InstaLOD machine key can be used. If specified, a user can connect to the server only from a specific machine. To allow users to connect to the InstaLOD Grid server through the InstaLOD Grid web application, the wildcard "*" should be used as MachineKey.
InstaLOD Studio can be used to configure a server by being run in an alternative application mode. Open the Preferences
window, and in the Application
tab, switch the Application Mode
to Server
. After restarting InstaLOD Studio, the application will be run with a server configuration window.
Configure the server by locating the InstaLOD Pipeline folder directory and choosing the IP address and port that the server should be bound to. Select Add user...
to create a user in the InstaLOD Grid network.
Profiles must be added, so they're available for processing via the web interface. Select Add profile...
and choose the preferred JSON profiles. When done, select Start
to run the server.
The following is a breakdown of an example server configuration file. This demo configuration file is called "server.json" and ships with InstaLOD Pipeline. The example file can be located in the main InstaLOD Pipeline directory.
{
"//" : "The message of the day.",
"MessageOfTheDay" : "",
"//" : "The HTTP URL that the server will be ping once a task has finished. The parameter 'taskid' will be added to the request query URL.",
"TaskFinishPingbackURL" : "",
"//" : "A file path accessible by the server process. The file will be read and cached upon initialization and served as custom CSS to enable client branding.",
"CustomCSSFilePath" : "",
"//" : "Enables a file conversion profile that allows quickly converting meshes between different file formats without further processing.",
"FileConversionProfileEnabled" : true,
"//" : "Enable registration of new workers through the REST API.",
"SlaveRegistrationsEnabled" : true,
"//" : "The time a worker has to respond to a validation request in seconds.",
"SlaveValidationRequestTimeOutInSeconds" : 5,
"//" : "The maximum number of times the server will query a processing worker for the status before considering the process failed.",
"MaxSlaveTaskProcessStatusRequestsWithoutResponseCount" : 5,
"//" : "The maximum amount of attempts to dispatch a task to a worker. Once the number of attempts exceeds this value, the worker will be ignored for the current task.",
"MaxSlaveTaskDispatchAttemptCount" : 3,
"//" : "If set to a value > 0, the time a worker has to finish processing a task in minutes. After reaching the threshold, the worker will restart if the execution hasn't finished.",
"MaxSlaveProcessingTimeInMinutes" : 0,
"//" : "The maximum amount of attempts to dispatch a task to any of the available workers. If the number of attempts exceeds this value, the task will be marked as failed.",
"MaxTaskDispatchAttemptCount" : 10,
"//" : "The duration during which a client authorization token remains valid. Clients need to request a new authorization token after the duration passes.",
"AuthorizationTokenExpirationInHours" : 24,
"//" : "Stores the previously registered workers.",
"SlaveRegistrations" : [],
"//" : "The users that can connect to the server.",
"Users" : [{
"//" : "The name of the user.",
"Username" : "testuser",
"//" : "The user's password.",
"Password" : "1234",
"//" : "Limits the server access to a specific machine. The wildcard '*' can be used to allow connections from everywhere, including the web interface.",
"MachineKey" : "*",
"//" : "The permissions for administrating the server configuration and user tasks.",
"Permissions" : [
"CreateOwn",
"CreateOther",
"ReadOwn",
"ReadOther",
"UpdateOwn",
"UpdateOther",
"DeleteOwn",
"DeleteOther",
"AdministrationUser",
"AdministrationTask",
"AdministrationServer",
"AllPermissions"
],
"//" : "A combination of the following values can be set for the permissions:",
"//" : "No permissions.",
"//" : "None",
"//" : "Allows creating data on behalf of the user itself.",
"//" : "CreateOwn",
"//" : "Allows creating data on behalf of other users.",
"//" : "CreateOther",
"//" : "Allows reading data on behalf of the user itself.",
"//" : "ReadOwn",
"//" : "Allows reading data on behalf of other users.",
"//" : "ReadOther",
"//" : "Allows updating data on behalf of the user itself.",
"//" : "UpdateOwn",
"//" : "Allows updating data on behalf of other users.",
"//" : "UpdateOther",
"//" : "Allows deleting data on behalf of the user itself.",
"//" : "DeleteOwn",
"//" : "Allows deleting data on behalf of other users.",
"//" : "DeleteOther",
"//" : "Administration permission for user handling.",
"//" : "AdministrationUser",
"//" : "Administration permission for server handling.",
"//" : "AdministrationTask",
"//" : "Administration permission for task handling.",
"//" : "AdministrationServer",
"//" : "Full permissions, defining the user as an administrator.",
"//" : "AllPermissions",
"//" : "Convenience alias for 'AllPermissions'.",
"//" : "Admin"
}]
}