Get SpatialOS

Sites

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

Upgrade to the new entity database

Before you upgrade to the new entity database, you need to upgrade to the new bridge and the new load balancer.

The entity database: background

The entity database is responsible for storing the canonical value of component data for entities, making sure that only clients with authority over component data have write access to that data, and informing clients of when there are changes to data they’re interested in.

Upgrading to the new entity database is the third and final step in upgrading to the new Runtime. We encourage you to upgrade your projects to the new Runtime and to use this configuration going forward. This means you’ll be using the most performant, most stable and easiest to scale version of the Runtime.

The new Runtime also enables query-based interest (available in SpatialOS 13.4 onwards). This is a new way of specifying what a worker is interested in, based on the components it’s authoritative over. You use queries to express precisely which components on other entities the worker should know about, meaning that the worker only receives updates relevant to what it is simulating.

Soon we’ll make the new Runtime the default option and deprecate the old one. There’ll be a short opt-out window in which you can still use the old Runtime, but after that we’ll stop supporting altogether.

What’s changing

  • Updates from the Runtime to workers can be “squashed” if either the worker or the Runtime is under high load. For example, if Worker A is struggling to keep up with updates, then a series of position updates {P1, P2, P3} emitted by Worker B might be received by Worker A as {P1, P3}. In other words, Worker B will observe the latest state, but not intermediate states.

    If you need a worker to observe every update in a series of updates, use events, as these are never squashed. If you just care about state, use component updates.

  • The system no longer deletes entities that leave the world boundaries defined in the launch configuration file. World boundaries are no longer a necessary constraint of the system and we’ll remove them at a later date.

What’s not changing

Chunks no longer exist in the new entity database. However, we’ll continue to emulate chunk-based entity interest for workers (where workers become interested in discrete square chunks of space based on their authority).

How to upgrade

Before you upgrade to the new entity database, you need to upgrade to the new bridge and the new load balancer.

To upgrade to the new entity database, in your launch configuration file, change your deployment template to <size>_entity_db_v2.

For example, if you’re currently using the small template, change this to small_entity_db_v2.

Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums