![]() ![]() Not sure if this has come up in discussions in reactive streams io land, i.e. I suspect this will probably not perform as well as explicit batching on an individual stream as the write queue would have to compose individual writes across streams. In the case of Netty this would largely mean making sure that we can properly write out a CompositeBuffer into the flow-controller and have its chunks be released properly. (b) - Having the framer slice the buffer it reports to the transport so it can retain the unused portion (a) - Essentially making the flow-controller writes deferred so that they pack into DATA frames It also prevents the framer from having to allocate another can try to implement handling for that at the transport layer by An alternate way to achieve this effect is to have the transport layer flow-controller coalesce writes into a single DATA frame under flush. This change ensures that message sequences are batched into single DATA frames so that the receiving side can parse as a unit and wake the application layer less often. The proposed change here only affects transport flushes in so much as fewer flushes emanate from the framer. ![]() We could make an enum FLUSH/NO_FLUSH instead of boolean if we really wanted.Ĭhannel-wide flush reduction is largely handled by the shared write-queue. I guess we could have sendMessage(message) always call sendMessage(message, true), and so the second parameter is typically missing, explicit flushing unnecessary, and there would be few calls with the boolean argument. Granted, not having the parameter could be a readability issue by omission (not noticing it isn't flushing), but people are pretty familiar with the need to flush on things like OutputStreams. Since there would be many callers over time, seeing the true/false could easily be a readability issue (not knowing if it is flushing or not). It would also require having a different method on Call, and so would be a burden to interceptors.īoolean sendMessage(message, flush) could work, although it is little different than having a flush() method that is required to be called, with the exception of the possibility of less synchronization. Iterator turns message creation into a callback, which seems unnecessary and harder to use. I agree using a Collection prevents any flow control feedback. I don't like sendMessage(Collection messages) and sendMessage(Iterator messages).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |