Sites

Menu
These are the docs for 13.8, an old version of SpatialOS. 14.0 is the newest →

Write access authority

A worker instance with write access authority over an entity component is the only worker instance that can update the value of that entity component.

A worker instance’s write access authority over an entity component depends on two things:

  • Write access permission

    Its worker type must have write access permission to that component type.

    Write access permission is controlled by a dedicated component on each entity. This component is called EntityAcl.

  • Area of authority

    The entity that the component is part of must be within the worker instance’s area of authority.

    The Runtime decides the worker instance’s area of access authority based on the load balancing strategy for its worker type.

Write access permission

You define write access permission in an EntityAcl (access control list), in the component_write_acl field.

Area of authority

The area of authority for a worker instance defines the set of entity components that the worker instance has write access authority over within a layer. For a worker instance to have write access authority over a particular entity component, the entity that the component is part of must be within the worker instance’s area of authority.

The Runtime decides this area for each worker instance based on the load balancing strategy that you set up for its worker type.

An example of a load balancing strategy for a worker type is the rectangle grid. In this strategy, the area of authority for each worker instance of that worker type is one of the rectangles of the specified grid.

The rectangle grid strategy is an example of a spatial load balancing strategy, where the areas of authority are rectangular sections of the area of the SpatialOS game world, a bit like a patchwork quilt. In each rectangular section, one worker instance has write access authority over the entity components in that section (but only if it has write access permission to those component types).

The rectangle grid strategy is useful for worlds where entities are evenly spatially distributed or concentrated at known points. However, you can set up other load balancing strategies, including non-spatial ones, based on entity IDs, for example.

However, worker types can be non-spatially load balanced as well. For example, if your worker type uses the entity ID sharding load balancing strategy, the area of authority for its worker instances depends on entity IDs rather than positions.

For more information on load balancing strategies, see Load balancing.

Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums