Hello,

Le 03/09/2012 18:10, Tomasz Sterna a écrit :
I didn't get to designing routing exchange protocol yet.
Building a working implementation of adapting binding of components
should shine some light on what is required to be exchanged.

        Ok.

        I started to look at the process you sent earlier, and I could start to 
think about the tree structure just by following the process.

        That led me to have to ask some questions about this:

        1) A minor one: is it right that it's a typo when you wrote example.org 
instead of example.com at some places?

        2) Is is OK to assume that all non full-JIDs are of priority 0 (or, 
better said, have no priority at all)?

        3) I have a doubt when you say at different places that a component needs to bind 
bare-JIDs / full-JIDs "from now on". Does that mean that it needs to send bind 
requests for all sessions it already has, or just make *new* bind requests of the type 
you mentioned?

        4) In this process, what if component1 disconnects? I suppose that the router 
needs to crawl through its tree to update it, but that can be CPU intensive and can cause 
lags... I know that this event is not a "normal" event anyway and is not 
supposed to happen often, so it can be negligible.

        5) A Jabber protocol question, I know I could find the answer in the online docs, 
but as I have you at hand ;-) Is it possible to have 2 full-JIDs connected at the same 
time? With equal or different priorities? I suppose the answer is "no" to both 
questions, but just to be sure...

        6) The tree structure I'm thinking about uses hashes to find the next node (root => domain => 
user => resource), and finally a pointer or an array of pointers to components for the leaves. If the 
answer to previous questions at 5) is "no", there is only one case where there can be more than 
one leaf: at each node is a "default route" leading to one or more components. If I use a static 
sized array to store them, that will use more memory. So the best would be to use a linked list, but that 
would make the process slower. I would tend to use linked lists because the cases where one has to crawl 
through them are (relatively) less frequent. What do you think?

        That's it for the questions. I you need I could draw a diagram of the 
tree structure I'm thinking about to make things clearer, just tell me.
--
--      \^/                                            --
--    -/ O \---------------------------------------    --
--   | |/ \|      Alexandre (Midnite) Jousset      |   --
--    -|___|---------------------------------------    --


Reply via email to