Daisies Everywhere

Status: DRAFT

A Daisy is a runtime structure for describing a composable action in Fuchsia. Daisies are produced by 3rd-party code and platform components.

Ultimately, the action a Daisy describes will be carried out by a Module. A process called Module Resolution finds compatible Modules capable of executing the requested action.

Overview

Daisies have two roles:

  1. Enumerating constraints on the world of all Modules to filter it down to just those that can successfully execute the described action.
  2. Provide a set of initial data to pass to the Module once instantiated.

The first (1) is employed by Module Resolution to search the ecosystem of Modules. The second (2) is employed by the Framework to seed values in the Link that is provided to the running Module.

TODO(thatguy): Add documentation about the process of instantiating a Module whose specification started off as a Daisy.

What makes a Daisy

For the baremetal details, see the FIDL struct definition.

The basic Daisy captures either or both of a verb and nouns:

  • a verb is an identifier that references a defined verb template
  • the nouns are runtime arguments to be passed to the resolved Module

Nouns in a Daisy can be supplied as different runtime types. Modules, on the other hand, accept Fuchsia Entities as input. If any of the supplied nouns is not already an Entity, the process of Module Resolution will attempt to translate the data given into a structured Entity.

Since verb templates are expressed independently of the type of data they operate on, the Daisy creator does not need to know what type of data is represented in each noun. In fact, each noun can thus capture ambiguity, which is in turn captured in the Daisy.