Hello Trustin,

Trustin Lee schrieb:

Hi Johannes,

2006/1/7, Johannes Zillmann <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>:

    Dear mina team,

    currently i'm participate in 2 projects in which network communication
    plays a big role.
    The profile of the projects looks similar:
    - there is a lot of coordination communication to do, whereat mina
    is great
    - but a lot of large data blocks(simply call it files..) has to be
    moved
    as well, whereat mina naturally can't beat fe a simple bio socket
    implementation in performance

    After testing a lot and thinking some time about it, i came to the
    point
    that the simplest way to gain the efforts of using
    mina but not loosing any piece of performance is to have the
    possibilty
    to get direct access to a sessions socket (no matter if bio or nio).

    This would avoid the overhead of chunking, filtering,... data
    which is
    not intended to do so.
    And it would allow things like
    FileChannel fc;
    SocketChannel sc;
    fc.transferFrom(sc,0,23);


For now there's no way to achieve the same behavior with this. But I guess we can implement this by providing a special write request object:

IoSession session = ...;
session.write( new TransferRequest( fc, 0, 23 ) );

WDYT?

Well i think there are 2 sides. The sending and the receiving... ;)
For the sending part the above approach looks very nice !
For the receiving part could you think of somthing like :
socketSession.decoupleSocketChannel()  -> SocketChannel
??

Johannes


        

        
                
___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

Reply via email to