How block/ftl works
Core System Layers
• User/Client Interface layer:
– This is the CLI (e.g. the “ftl” binary and related commands in cmd/ftl) which the user interacts with to run commands like “ftl init” or “ftl call”. It initiates projects and modules.
• Module and Verb Layer:
– Once initiated, the system creates and manages “modules” (e.g. “alice” in the sample) that expose verbs (actions to call, such as “alice.hello”) for user interaction.
• Runtime and Build Engine Layer:
– This layer contains engines responsible for building, orchestrating, and testing modules. It is composed of the build engine, language-specific runtime plugins (Go, Java, Kotlin, Python), and module configuration components. Many directories (backend, go-runtime, jvm-runtime, python-runtime) reflect these responsibilities.
• Provisioner/Deployment Layer:
– This layer manages deploying built modules (via provisioners) and interfaces with external systems (databases, cloud providers, container orchestration). The “internal/provisioner” and “deployment” directories capture these functions.
Relationships and Interactions
• The User Interface layer (CLI) sends commands to the Module/Verb layer.
• The Module layer forwards execution requests to the Build Engine, which compiles and runs the code.
• The Runtime plugins (in various language-specific directories) are called upon to perform language-specific tasks.
• The Provisioner layer then handles deployments and configurations for running environments.