I lean toward adding the keep-alive as the default for Vinci because it
seems
to fix firewall issues which we've seen, with little or no down-side.
I would not complicate the UIMA descriptors with this detail at this point.
If we later get some kind of new, separate deployment details descriptor,
that could be a good spot to put this.
How about for now, making this a UIMA framework property - like the
logger to use, etc.
-Marshall
Adam Lally wrote:
We've had some users who report that turning on socket keepAlive (by
manually modifying the jVinci source) helped them with some firewall
trouble, where otherwise the firewall seemed to be cutting the
connection after some period of inactivity.
Should we turn this on in UIMA?
I asked the developer who's most knowledgable about the jVinci code
and he had this to say:
"I went and tried to find out why not to set this flag on always, and
basically found no compelling reason not to; however, I did find
instances where people argue that it is poor design - for no real good
reason other than it not ever being necessary and can be solved at an
application level - also it potentially opens up security holes - by
keeping a socket around for a long time allowing things to snoop - and
that under heavy load/lots of sockets it can negatively impact
throughput because the stack has to send keep alive packets down every
socket. I sent a note to one of our devs here who did a lot of work
with socket performance, his only response was that it might keep more
sockets in CLOSE_WAIT state, which shouldn't pose a problem."
He offered to maybe help implement this, but sometime in the future,
not immediately.
We could go ahead and do this ourselves, perhaps in v2.1. It doesn't
seem too difficult. The main questions are (1) should the keepAlive
be on by default (I think so, since it seems to help avoid problems
and there's no clear indication that there is a downside), and (2)
whether this should be configurable from UIMA descriptors. We could
add a <socketKeepAlive> element to the uriSpecifier and to the CPE
descriptor (it's unfortunate all this stuff is in two places :( ).
Opinions?
-Adam