commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] Commented: (NET-258) Implement A Keepalive Mechanism
Date Sat, 12 Feb 2011 17:11:57 GMT

    [ https://issues.apache.org/jira/browse/NET-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12993958#comment-12993958
] 

Sebb commented on NET-258:
--------------------------

If any of the FTP classes have any mutable instance data (which I'm sure they do) then if
one thread updates the data, another thread may not see the updated data - or it could even
be partially updated. This is the same problem as with the boolean stopKeepAlive flag.

In most cases the data will be updated properly, but it's not guaranteed by the Java Memory
Model, and with faster multi-cpu systems and more agressive JVM optimisation the problem will
surface at some point - and will probably be extremely difficult to debug.

There are probably other solutions which can be implemented within the control thread, e.g.
loop with timeout whilst waiting for completion.
If timeout occurs, send NOOP, and wait again.

> Implement A Keepalive Mechanism
> -------------------------------
>
>                 Key: NET-258
>                 URL: https://issues.apache.org/jira/browse/NET-258
>             Project: Commons Net
>          Issue Type: Improvement
>    Affects Versions: 2.0
>            Reporter: Rory Winston
>            Assignee: Rory Winston
>         Attachments: ftp-keepalive.diff
>
>
> For routers/firewalls that terminate idle connections, a separate heartbeat mechanism
may need to be implemented to keep the control connection active.
> Some potential issues:
> * Synchronization between a heartbeat write and a __getReply() on an active control connection
command;
> * Should use the NOOP command as a heartbeat signal;
> * Make the timeout configurable;
> * Default SocketImpl::setKeepAlive() wont do here.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message