About this topic, I have some more comments and questions:

Le 15/10/2012 02:22, Alexandre Jousset a écrit :
Le 12/10/2012 19:53, Tomasz Sterna a écrit :
    We do. In the simplest way to do it, routers don't forward other routers' 
binding requests. Of course it is possible to implement it to allow multi-hops, 
but I'm afraid this could lead to problems (and inefficiency) for no real gain 
(except simplistic configuration). Of course it would be easier to only list 
just one router of the mesh when adding a router, but I would prefer 
sacrificing this easiness in favor of efficiency. After all, the administrator 
has all knowledge about its server architecture. So when adding a router, the 
config file should list *all* other already running routers in the mesh.

What if you do not manage all the routers in the mesh?
And you were given a password to access only one or two routers of the
mesh?

        I think it is pretty unusual for the admin not to have access to all 
routers (at least all routers managing the same domains). I'm sure there could 
be cases and this would add a lot of flexibility, but see below for the 
drawbacks.

In my proposal nothing stops you from making each router know all the
others to make it more efficient, but it shouldn't be _required_.

        The problem with the multi-hop proposal is that you have to manage cases where 
there is cyclic connections. e.g. A => B => C => A

        A solution may be to add the ID of the component binding the domain / 
bare JID to the bound route, and to check if that combination is already bound, 
but this will increase CPU usage and the data structure sizes.

        For the moment I have 2 hash tables (finally I differentiated them), one for 
domains where we don't really care of the size of the values, and one for bare JIDs 
bindings where the value is just the component_t. This component_t can be the local 
component for local connections, or other routers connection for remotes. So we would 
have to add a "char *" malloc'ed, strcpy'ed, etc., for each new connection in 
bare JID binding mode. So this would add CPU and memory consumption just for multi-hop 
support. It's a choice to do, if you really want me to do this I'll do it, but I'm a bit 
against that solution.

        Of course, if you have better solution... :-)
--
--      \^/                                            --
--    -/ O \---------------------------------------    --
--   | |/ \|      Alexandre (Midnite) Jousset      |   --
--    -|___|---------------------------------------    --


Reply via email to