With 5.0.0.4 fixpack availability last week we do have DataPower XC10 URL Opener support:
Yesterday I took part in an internal education session and heard "... one of the few locations in DataPower with milli-second resolution ...".
I immediately thought on my posting Adding latency during service development for backend simulation from 2/2011.
The solution from that posting to add eg. a delay of 5 seconds was to
make use of <dp:url-open> timeout attribute for "http" protocol:
|
Now the XC10 URL Opener can be "misused" (for development, see previous posting on this) to provide sub-second latencies.
And you do not have to possess a XC10 for doing so ;-)
So how is it done?
First we have to define a "XC10 Grid" -- lets name it "delay".
Lets fill in 300 (milliseconds) for Timeout, Grid Name "g", User "u" and Password "p",
Then create a new "Collective" named "c", switch to "Members" tab, and add a new member with "Actual Host" as "1.2.3.4".
Clicking two times "Apply" we are done on the configuration side.
Now a 300ms delay can be simply achieved by this "xc10:" <dp:url-open> call, see InfoCenter on format:
And you do not have to possess a XC10 for doing so ;-)
So how is it done?
First we have to define a "XC10 Grid" -- lets name it "delay".
Lets fill in 300 (milliseconds) for Timeout, Grid Name "g", User "u" and Password "p",
Then create a new "Collective" named "c", switch to "Members" tab, and add a new member with "Actual Host" as "1.2.3.4".
Clicking two times "Apply" we are done on the configuration side.
Now a 300ms delay can be simply achieved by this "xc10:" <dp:url-open> call, see InfoCenter on format:
|
Doing some measurements with stylesheet xc10.xsl listed further below shows that timing is pretty accurate.
Of course we have to measure "inside" the stylesheet -- we could do by "stylesheet profiling" and <dp:region>.
Here the simpler approach based on "dp:time-value()" is used.
As can be seen here we see 16ms-23ms for 10ms configured (this is minimal value),
106ms-114ms for 100ms configured and 308ms-310ms for 300ms configured in "delay" XC10 grid object:
Of course we have to measure "inside" the stylesheet -- we could do by "stylesheet profiling" and <dp:region>.
Here the simpler approach based on "dp:time-value()" is used.
As can be seen here we see 16ms-23ms for 10ms configured (this is minimal value),
106ms-114ms for 100ms configured and 308ms-310ms for 300ms configured in "delay" XC10 grid object:
|
And this is stylesheet xc10.xsl used:
<EDIT>
Just learned this from a colleague:
"I have seen some environments where this trick does not work, because even for unreachable addresses on the network,
their networking equipment responds immediately failing the request"
</EDIT>
Hermann<myXsltBlog/> <myXsltTweets/>
<EDIT>
Just learned this from a colleague:
"I have seen some environments where this trick does not work, because even for unreachable addresses on the network,
their networking equipment responds immediately failing the request"
</EDIT>
Hermann<myXsltBlog/> <myXsltTweets/>