For best practices when using components, see the Component best practices page.
Elements of components
Components can have three elements:
properties describe persistent values that change over time
events describe transient things that have happened to an entity
commands describe things that other entities can ask this entity to do
Each component can have many properties, events and commands. For example, an explosive barrel might have the following components:
Write up your components in the schema, using the SpatialOS schemalang. This schema is used to generate code that all workers can use to read and manipulate components.
For full details, see the schema documentation.