Module
A module is a Java Spring bean that is loaded into a worker (Application Engine instance), extending the worker with additional functionality.
Modules are loaded during worker startup using the same classloader as the worker. As a result, they have access to the Application Engine services. Modules are loaded from module directory in the working directory of the Application Engine instance (usually the same directory where the Application Engine JAR file is located).
Because a module is loaded at startup, it cannot be updated or changed at runtime. Any changes require restarting the worker. For this reason, modules are not recommended for integrations or functions that need high computational power or need to scale the use of the platform.
Module is distributed as a ZIP archive containing the module application JAR file and libs folder if the module has dependencies that are not already included in Application Engine.
module.zip/
├── modul.jar
└── libs/
├── dependency1.jar
└── dependency2.jarPros
- Access to all Application Engine services
- Loaded in the same context and classloader as Application Engine classes
- Independently loaded from other workers in the cluster (each worker can have a different set of modules loaded)
- Publishable methods to the Action API
Cons
- Loaded only at the start of Application Engine
- It is not recommended to use it for computation-heavy code as it shares resources with Application Engine worker
