[evla-sw-discuss] Delay Model Distributor
Kevin Ryan
kryan at nrao.edu
Wed Jun 4 10:52:01 EDT 2008
Having read that Java's new IO package (nio) was designed with speed
and efficiency in mind, I used it for Delay Model redistribution (the
part of the VCI that accepts models from Executor and distributes
them to the appropriate CMIBs).
After doing this, it was decided to use UDP multicast to send the
models from Executor. Unfortunately, nio does not yet do multicast.
Since model redistribution can get intensive in the worst case, I was
reluctant to abandon nio for the old DatagramPacket and
DatagramSocket methods.
I did however try it and attempted to measure their timing correctly
(I am a little unsure of this because of the difficulty with the read
block - what I did was start a nanoTime just before sending the
packet and then stopped the time just after receiving it in another
thread. Since both threads were running in the same system, they
used the same clock so I THINK the test is valid).
The results were that nio and the old methods were almost identical
in time. I would venture to guess that this is because of the
'atomic-ness' of a UDP packet and that the efficiencies of nio are
better noticed when dealing with streams (or that its efficiencies
are a pack of lies :).
So we can do UDP multicast for the delay models if we want and not
lose sleep for not doing it the best way.
I have the pseudo VCI running an the future OTS Prototype CPCC called
'cpcctest' down in James' area and it can send to either an in house
CMIB or to those in Penticton. It has been tested by sending a model
from my machine and verifying that it is correctly parsed down in the
bowels of the CMIB.
If Barry gives me his multicast address I will configure it for that
and he can send his own models.
Kevin
More information about the evla-sw-discuss
mailing list