Skip to main content

EndpointRouter cache

4 replies [Last post]
fcolmenero
Offline
Joined: 2004-07-30

Hi,
I'm making some tests over EndpointRouter and I see there is a
high latency for rerouting procedure, in case of a peer connecting/disconnecting
scenario.

It seems owing to EndpointRouter route cache, so, although the transport detects
a closure successfully, the related messenger and route persists for a while
(5 minutes?). The rerouting is performed when:
a) Incoming messenger for route is null
b) Outgoing messenger for router is null
c) Destination's class expiration timeout expires or, it's cleared by noOutgoingMessenger expiration, because findReachableEndpoint method in EndpointRouter returns a null Messenger.

I think this latency must to be corrected, or at least the programmer should to
be a procedure to take control of it!

Thanks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
hamada
Offline
Joined: 2003-06-12

Good analysis fcolmenero. We are currently looking at improving router's logic to recover from a failed router. So your post came at timely point. You should file an issue on the platform, where we'll post a patch to improve this logic.

Regarding application control over route, see RoutControl.addRoute(), it is intended to do just that.

fcolmenero
Offline
Joined: 2004-07-30

Thanks of your response!

I've just publish a new issue to request a improvement in relation to this
problem.

I'm making some tests to improve rerouting latency, and the trouble seems to
be in Destination class, which holds a map of Wisdoms.

Each Wisdom keep track of current Route health, by testing outgoing/ingoing messengers linked to it, and a counter-like latency variable.

I forced this latency to be zero, and it's seems the rerouting is performed fastly, but it couldn't be the solution, because I don't understand completely the reason for this latency control.

Thanks

hamada
Offline
Joined: 2003-06-12

can you also try the patch attached to

http://platform.jxta.org/issues/show_bug.cgi?id=1658

and let me know how it behaves.

Thanks

fcolmenero
Offline
Joined: 2004-07-30

I've just tested it, and the problem seems to be resolved.

With this solution, addRoute method is updating routing peer information
even if the peer is considered to be (virtually) reachable (isLocalRoute call).
That was the reason any staled route were considered as legal for a while.

Thanks!