CyphesisEventBroadcasting

From WorldForgeWiki

Jump to: navigation, search

Overview

Cyphesis currently spends a large proportion of its compute time broadcasting events, such as notification that something is moving, or has changed. In order to do this a large number of distance computations are done to see if entities receiving the broadcast are in range. A new subsystem is needed to allow events to be broadcast efficiently, with data stored in a structure way which can reduce the computation required. Consideration should also be given to propagating broadcast events between servers as a cluster.

Architecture

The world is stored as a hierarchical tree of entity nodes, and up until now we have assumed that free movement can occur within any container. This could be grossly simplified to the benefit of both the broadcast system and collision systems if we limit movement domains to movement within a single parent, and then have a default movement domain for the top level entity. If movement occurs within a movement domain lower down the tree, the broadcast of events can propagate up the tree, and occur as if it had been broadcast by the nearest child node.

For example if the event occurs inside a tunnel, the event would be broadcast within the tunnel, filtered by the tunnels movement domain, and then broadcast outside the tunnel in the global movement domain is if it had occurred at the tunnels location.

Personal tools