Terminology
Here’s a few naming differences to keep in mind- Task - In Compose a “task” is a typescript file with your code logic, it can import from other files and libraries and it must have a single main function. This is effectively the equivalent of a “function” in W3F terms.
- Trigger - In Compose a “trigger” encompasses the concept of both “triggers” and “tasks” in W3F.
Configuration
Compose apps are completely configured within your code repository; all configuration for Compose apps is done in the Manifest yaml file. Compose apps are deployed with the CLI and the manifest is responsible for provisioning infra and dependencies.Triggers
Compose has similar triggering options to W3F with a few differences:- Compose doesn’t differentiate between cron and time intervals, Compose just uses cron expressions for time-based triggering.
- Compose has HTTP triggers allowing your application logic to trigger tasks and send payloads over HTTP with optional bearer token authentication.
- Like W3F, Compose tasks can be triggered with onchain events, this is powered by our Turbo indexing product. When you deploy a Compose app that uses onchain triggers, we’ll provision a Turbo pipeline which will connect to your task over HTTP. The compose manifest allows for simple configuration of the pipeline, but you have the option of creating more complex pipelines that use webhook sinks to power your Compose tasks. This is a slightly more verbose / complex setup than W3F’s approach, but allows for significantly more complex systems.
- Compose doesn’t support per-block triggers currently as an out-of-the-box feature. However, you can recreate this functionality by building a Turbo pipeline (with a webhook sink) that indexes every block to accomplish the same outcome.