Relevance to get Relay Chain

(imported topic written by SystemAdmin)

Hi.

I’m trying to write a relevance to get the entire relay chain (i.e. from a client to the root server)

Example

client -> local relay -> top level relay -> bes root server

This is the first relevance

preceding text of first "." of it
of (
    (if (exists result (item 0 of it, item 1 of it) and 
             exists values of result (item 0 of it, item 1 of it) ) 
            then (concatenation "%0A" of values of result (item 0 of it, item 1 of it)) 
            else ("<none>")))
of (
    elements of intersection of (
            (sets of items 0 
                    of (computers of it, values whose (it as lowercase = "COMPUTERNAME") of it) 
                            of results of bes property "Computer Name")),
    bes property "Relay")

I thought to use a recursive relevance but it runs too slow and timeouts.

Any hints ?

Thanks everybody

(imported comment written by SystemAdmin)

I tried this but it timeouts after 120 seconds :frowning:

((preceding text of first "." of it|preceding text of first ":" of it) of value of result (bes property "Relay", it)) of bes computer whose (name of it as lowercase = (it) of ((preceding text of first "." of it|preceding text of first ":" of it) of value of result (bes property "Relay", it)) of bes computer whose (name of it as lowercase = "COMPUTERNAME"))