After discussing a flawed design in this thread I’ve been looking over the internals of @pspeed’s excellent SimEthereal library, which suits my needs well (and I had wanted to use anyway). However, I’ve hit a snag while attempting to integrate it into my own codebase. My system spatially divides a large game world into separate zones and hosts them across multiple servers. Each running server instance provides a core set of services (networking, threadpool, database access, etc., etc. etc.) to all of the zones running on it. Zone assignments may dynamically change, so it’s important that ip addresses and port numbers are not directly tied to any zone’s simulation. Players connect to a server and are then placed into the right zone, but all network traffic passes through a common instance of the SpiderMonkey server. Zones may, but do not necessarily, physically border each other. A server running a handful of zones may not be running any two that are spatially contiguous.
Ideally I’d like to make use of SimEthereal’s sparse grid as a core zone data structure for spatially subdividing zones, in addition to using SimEthereal for realtime state synchronization. However, after digging around in the internals of SimEthereal it appears that only one EtherealHost is designed to run at once, meaning that keeping separate Ethereal spaces for each of my zones is out the window. If I added multiple EtherealHosts (one per zone - my zones, not Ethereal zones) to a single SpiderMonkey server I do not believe that there is any mechanism to prevent them from stepping on each others’ toes, unless I’m missing something.
Does anyone have any thoughts on how to deal with this?