Asset Compute Development Tool

The Asset Compute Development Tool is a local web harness allowing developers to configure and execute Asset Computer workers locally, outside the context of the AEM SDK against the Asset Compute resources in Adobe I/O Runtime.

Run the Asset Compute Development Tool

The Asset Compute Development Tool can be run from the root of the Asset Compute project via the terminal command:

$ aio app run

This will start the Development Tool at http://localhost:9000, and automatically open it in a browser window. For the Development Tool to run, a valid, auto-generated devToolToken must be provided via a query parameter.

Understand the Asset Compute Development Tools interface interface

Asset Compute Development Tool

  1. Source file: The source file selection is used to:

    • Selected the asset binary that acts as the source binary passed to the Asset Compute worker
    • Upload source files
  2. Asset Compute profile(s) definition: Defines the Asset Compute worker to run including parameters: including the worker’s URL end-point, the resultant rendition name, and any parameters

  3. Run: The Run button executes the Asset Compute profile as defined in the Asset Compute configuration profile editor

  4. Abort: The Abort button cancels an execution initiated from tapping the Run button

  5. Request/Response: Provides the HTTP request and response to/from the Asset Compute worker running in Adobe I/O Runtime. This can be helpful for debugging

  6. Activation Logs: The logs describing the Asset Compute worker’s execution, along with any errors. This information is also available in the aio app run standard out

  7. Renditions: Displays all renditions generated by the execution of th Asset Compute worker

  8. devToolToken query parameter: The Asset Compute Development Tool token requires a valid devToolToken query parameter to be present. This token is automatically generated every time a new Development Tool is spawned

Run a custom worker

Click-through of running an Asset Compute work in Development Tool (No audio)

  1. Ensure Asset Compute Development Tool is started from your project root using the aio app run command.

  2. In the Asset Compute Development Tool, upload or select a sample image file

    • Ensure the file is selected in the Source file dropdown
  3. Review the Asset Compute profile definition text area

    • The worker key defines the URL to the deployed Asset Compute worker

    • The name key defines the name of the rendition to generate

    • Other key/values can be provided in this JSON object, and are available in the worker under the rendition.instructions object

      • Optionally add values for size, contrast and brightness:

        code language-json
        {
            "renditions": [
                {
                    "worker": "...",
                    "name": "rendition.png",
                    "size":"800",
                    "contrast": "0.30",
                    "brightness": "-0.15"
                }
            ]
        }
        
  4. Tap the Run button

  5. The Renditions section will populate with a rendition place holder

  6. Once the worker completes, the rendition placeholder will display the generated rendition

Making code changes to the worker code while Development Tool is running will “hot deploy” the changes. The “hot deploy” takes several seconds, so allow the deploy to complete before re-running the worker from Development Tool.

Troubleshooting

recommendation-more-help
4859a77c-7971-4ac9-8f5c-4260823c6f69