Limitations
Message Size
SHAR messages are limited to the maximum message size for NATS. The default maximum for messages is 1MB.
Each SHAR state message is a NATS message that contains all of the active variables for a workflow. The message also contains information about the parent IDs of the current state, and any gateways the current state is participating in.
We are working on adding support for Data Object References in the engine to support using external data in expressions and service tasks. See our roadmap.
Process History
Each workflow state is stored as process history for the lifetime of the process.
By defualt SHAR will store process history in NATS Jetstream KV. This is fine for small processes, and processes that do not iterate.
Due to the design of the KV store, the keys for the store are cached in memory. This can result in a large memory footprint for large running processes.
To mitigate this, we provide a postgres option for workflow history storage. This is recommended for topologies that support having a database server.
NATS Consumer limitations
NATS Consumers are reasonably resource intensive.
By default, the SHAR Client will create a single consumer for each service task. This can result in a large number of consumers for a single workflow.
We recommend grouping similar service tasks together into a Service Task Set.