mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "dave irving (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DIRMINA-218) Ability to transfer channels to socket channels owned by Mina
Date Tue, 13 Jun 2006 12:37:30 GMT
    [ http://issues.apache.org/jira/browse/DIRMINA-218?page=comments#action_12416007 ] 

dave irving commented on DIRMINA-218:
-------------------------------------

I'll be going on holiday at the end of this week - and I'll be away for two weeks.
I'd hoped I'd be able to nail this one before I left, but the implementation looks a little
more involved than I had first thought - and may  need some discussion on-list.
 
Assuming this issue is still open, I'll try and tackle it shortly after I return to the office
in late June

> Ability to transfer channels to socket channels owned by Mina
> -------------------------------------------------------------
>
>          Key: DIRMINA-218
>          URL: http://issues.apache.org/jira/browse/DIRMINA-218
>      Project: Directory MINA
>         Type: New Feature

>     Versions: 0.9.5
>     Reporter: dave irving
>     Priority: Minor

>
> Id like to be able to transfer file contents to a socket as effeciently as possible.
> In some cases, making use of FileChannel#transferTo(long, long, WritableByteChannel)
is a good choice, as it (in theory) allows the OS to do the transfer without bringing the
file content in to user space (e.g. could make use of sendfile behind the scenes or whatever).
> There is no direct way to obtain the channel from an IOSession - but even if there was
- allowing a user to do this directly is dangerous as Mina could have queued writes pending
for the channel.
> This JIRA issue can hopefully kick off some discussion.
> I see two basic ways to do this:
> 1) Add "sendFile(FileChannel)" or similar to IoSession. Mina then queues this request
along with other pending writes. Of course, mina must take care of potentially several invocations
to FileChannel#transferTo - as all bytes might not be transfered in one go.
> 2) Allow the user to schedule their own channel commands. For example, a "write command"
scheduled by the user would be invoked by mina when the write queue was free. 
> Im not sure that option 2 is really needed - and could be quite complex, so my preference
is (1).
> If we can get agreement on approach, I'll start on a patch.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message