[WF-General] Messaging in WorldForge

Erik Hjortsberg erik.hjortsberg at gmail.com
Thu Mar 25 09:20:53 PDT 2010


It's done in WorldRouter::operation(), line 514 and the next couple of 
ones. Basically all observing entities are iterated and whether they 
should receive the op is determined by checking the distance to them to 
the bounding box of the broadcasting entity. Not too efficient and 
definitely something which could need improvement.
There was an attempt to add an octree to the wfmath lib (which would 
then be used here for quicker lookup of nearby entities), but the work 
was never finished.
http://git.worldforge.org/?p=sueastside/wfmath.git;a=shortlog;h=refs/heads/quad_octree

I've also suggested an additional way of defining visibility distance at 
https://blueprints.launchpad.net/cyphesis/+spec/cyphesis-property-visibility-distance

To debug network traffic in Ember use the command "/show_serverLogger".

/Erik

2010-03-25 17:06, Manohar Vanga skrev:
> Thanks Erik. I have another question though; when a certain op occurs, 
> how are the nearby entities calculated? Are there proximity lists 
> maintained for each entity that are constantly updated? Is it 
> calculated dynamically (distance checks with every other entity in the 
> world)? Is there an different technique in use?
>
> Could you also point me to the technique for debugging network traffic 
> in WF again? You mentioned it before but I am unable to remember where.
>
> /manohar
>
> On Thu, Mar 25, 2010 at 4:22 PM, Erik Hjortsberg 
> <erik.hjortsberg at gmail.com <mailto:erik.hjortsberg at gmail.com>> wrote:
>
>     The main routing occurs in WorldRouter::operation().
>     Ops can either be delivered to a specific entity, for example when
>     you try to move your own avatar entity. Or they are a broadcast op
>     (sights, sounds, appearance and disappearance), usually of a
>     previous targeted op (so if you move your avatar entity nearby
>     observing entities will get a Sight op enveloping your Move op).
>     Or they can be delivered to all entities in the world (I can't
>     think of a good use case out of my head).
>     As you also can see in that method ops aren't delivered right
>     away, but put in a queue, to be handled in a later idle() call.
>
>     /Erik
>
>     2010-03-25 00:35, Manohar Vanga skrev:
>>     Hi,
>>
>>     Could someone help me understand the messaging system in
>>     Cyphesis? By messaging system, I am referring to systems such as
>>     the publish/subscribe model. How does Cyphesis do it? When a
>>     specific message (say a client moves) is received by Cyphesis,
>>     how is it passed to the right place?
>>
>>     Thanks
>>     Manohar
>>
>>
>>     _______________________________________________
>>     General mailing list
>>     General at mail.worldforge.org  <mailto:General at mail.worldforge.org>
>>     http://mail.worldforge.org/lists/listinfo/general
>>        
>
>     _______________________________________________
>     General mailing list
>     General at mail.worldforge.org <mailto:General at mail.worldforge.org>
>     http://mail.worldforge.org/lists/listinfo/general
>
>
>
> _______________________________________________
> General mailing list
> General at mail.worldforge.org
> http://mail.worldforge.org/lists/listinfo/general
>    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.worldforge.org/pipermail/general/attachments/20100325/d44ee2e6/attachment.html>


More information about the General mailing list