|
Raghu Angadi made changes - 09/Dec/08 11:25 PM
[
Permlink
| « Hide
]
Doug Cutting added a comment - 10/Dec/08 12:44 AM
As a related matter, I'd like to change the underlying IPC layer to take, instead of a Writable a List<ByteBuffer> for requests and return a ByteBuffer for responses. Then we can layer an RPC implementation on top that does not copy buffers but rather assembles a list of them. The simplest implementation would allocate new buffers per request, then let them get GC'd. Such request and response buffers should be short-lived and cheap to GC, but if that proves to be a problem we could consider pooling them.
Right. It may not require changes to how objects are read and written in IPC. In stead of ByteArrayStreams we just need to use our own input and output streams that use a list of buffers instead of single buffer. We need to propagate this list through the write code path on Server and client.
The way I see it the bytes on wire don't actually change. Is that approximately what you are proposing? > bytes on wire don't actually change. Is that approximately what you are proposing?
Yes. We might add an output operation like, writeBuffer(ByteBuffer) that adds the stream's current output buffer to the list if anything has been buffered, then adds the passed buffer, and resets the stream's buffer |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||