I am a absolute beginner of SpatialOS, but have a quite extensive experience in parallelization. I’ll try to explain my vision of how SpatialOS partitions the entities (please correct me if I’m wrong) and I’d like to suggest a future improvement on the assignment process of the entities.
SpatialOS current situation
The way SpatialOS distributes the entities over the managed workers is by partitioning the world into (in principle) non-overlapping regions. Each region is associated with a worker. The worker assigned to a region obtains writing-rights to entities that are situated within its region (i.e. the location of the entity must be withing the region). It also obtains ‘extra’ entities that are located withing a certain distance from the border of the region. For those entities it only obtains reading rights. It is the assignment of the ‘extra’ entities that I’d like to see improved.
For the assignment of writing-rights you need a unique assignment procedure to a worker. The location (i.e. center) of the entity is therefore just fine. However, for the assignment of the ‘extra’ entities, the procedure is to simple. Entities have a dimension. For large entities (a pipe for example) it might be that it extends over more than one worker region, but its center is far away from any region border. This means that the entity will only be visible in a single worker, while the object (i.e. the pipe) in fact spans more than one region.
The same problem will occur for client workers by the way. So, if the center of the pipe is not within the client-region, it will not be visible.
A possible solution would be to use bounding boxes (axis-aligned, or better body-aligned) to determine what ‘extra’ entities to obtain from other workers.
So, the rule would be something like
An entity should be copied to all (extended) regions that overlap with the bounding box of the entity.
By extended I mean the region extended with the radius-of-interest indicated with the associated worker.
Hope this story is clear, and may help in future upgrades of the platform. I would appreciate some feedback.