For the complete documentation index, see llms.txt. This page is also available as Markdown.

Hybrid method 1: Automatic Wasm pull

nodegen-server will automatically retrieve the Wasm modules from Spark.

Example of Client communicating via hybrid runner with automatic Wasm retrieval.

Configure the container

Set the following environment variables for the container.

Environment variable
Description

USE_SAAS

false

This must always be set as false. The setting of true is for Coherent deployments on our SaaS environments. The default value is true.

SERVICE_ENDPOINTS__EXCELENGINE_SERVICEURL

The base URL of your Spark SaaS account https://excel.{environment}.coherent.global.

SAAS_SERVICE_AUTH_TYPE

syntheticKey or OAuth2

SAAS_SERVICE_SYNTHETIC_KEY

If SAAS_SERVICE_AUTH_TYPE is syntheticKey then this value has to be configured. API key created from Authorization - API keys. It must contain User groups that are also assigned to Permissions - Features permissions Spark.GetNodegenZip.json and Spark.Resolver.json or assigned to Spark.AllEncompassingProxy.json.

SAAS_SERVICE_OAUTH_ISSUER_BASE_URL

If SAAS_SERVICE_AUTH_TYPE is OAuth2 then this value has to be configured. https://keycloak.{environment}.coherent.global

SAAS_SERVICE_OAUTH_CLIENT_ID

If SAAS_SERVICE_AUTH_TYPE is OAuth2 then this value has to be configured. This can be set up with Client credentials.

SAAS_SERVICE_OAUTH_CLIENT_SECRET

If SAAS_SERVICE_AUTH_TYPE is OAuth2 then this value has to be configured. This can be set up with Client credentials.

CLEANUP_INTERVAL

The interval in milliseconds before cleaning up any downloaded Wasm modules. The default value is 43200000 milliseconds (12 hours).

  1. Ensure that the Docker engine/daemon is up and running.

  2. docker image pull the nodegen-server Docker image using the following command:

  3. docker container run the service and create a container called wasm-server.

    1. Define the parameters that will be used for authorization to the Spark servers. In this example we are using a syntheticKey for authorization.

  4. Test the service using the healthcheck endpoint. You should receive the message {"msg":"ok"}.

  5. Execute a request similar to that in the API Tester.

  6. nodegen-server will first perform a lookup and verify whether the Spark service was already downloaded and cached locally.

    • If the service is not found locally, nodegen-server will use the provided Spark credentials to download the Wasm module from the SaaS platform and cache it until the CLEANUP_INTERVAL is reached.

    • If the service is found locally, nodegen-server will execute the Wasm module by loading it into memory, running the encapsulated logic, and returning the results back to the end-user.

  7. It is good practice to docker container stop and docker container rm containers when you are finished.

Last updated