Hi Trustin, On 5/9/05, Trustin Lee <[EMAIL PROTECTED]> wrote: > Hi all, > > I've just got up in my bed, and got a new idea about integrating I/O > layer and Protoocol layer. > > Here's my idea: > > 1. Remove I/O layer interfaces and merge them into protocol layer interfaces
Great. > 2. Acceptors and Connectors fire messageReceived and messageSent event > whose messages are ByteBuffers; users will have to downcast them to > ByteBuffers. All the attributes of the "Session" would still be completely configurable? > 3. ProtocolCodecs are implemented as filters; users will have to add > their own filters or predefined codec filters to perform > transformation between ByteBuffers and custom objects. (i.e. > ProtocolCodecs are generalized to filters) Perfect use of filters. It was a bit clunky to necessarily implement a codec even when it wasnt needed. This takes care of it. > This change removes distinction between I/O layer and Protocol layer, > and therefore brings us more unified API though users of I/O layer > only will have to downcast message objects to ByteBuffers, but I think > it doesn't matter actually. I'd actually prefer a bit more flexibility here. Let me think on this a little bit. Downcasting if u wanna do raw I/O is not really desirable. > We have released 0.7 internally, so we could apply this idea to 0.9 > branch. WDYT? > +1 Regards, Vinod.
