Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-dev] Reactive Streams


Simone,

I thought we should move this discussion here as it would be good to get community feedback/thoughts on something that might be core to Jetty-10

I'm very interested in what you showed me regarding the Reactive Streams proposed for java 9 http://gee.cs.oswego.edu/dl/jsr166/dist/docs/java/util/concurrent/Flow.html

But the handling of ByteBuffers cannot be done as you have done in your prototype because their is a hard rule that the unit of backpressure requests is exactly the number of items that can be sent.  Thus saying request(4096) would not allow 4096 bytes to be sent, but 4096 ByteBuffers to be sent, each of arbitrary size!

The guys developing the API did discuss this problem briefly in https://github.com/reactive-streams/reactive-streams-jvm/issues/47   But then basically gave up as being too hard!

So I've reopened the discussion at  https://github.com/reactive-streams/reactive-streams-jvm/issues/270 and http://cs.oswego.edu/pipermail/concurrency-interest/2015-May/014265.html (not sure which is the correct forum).

If Flows are going to be the new cool way of processing streams asynchronously then I think it would be good to preserve the same semantic all the way down to the byte stream... specially as he back flow mechanism is essentially the same as the HTTP2 flow control window, so it would be good allow applications to influence that window via this API.

cheers




--
Greg Wilkins <gregw@xxxxxxxxxxx>  - an Intalio.com subsidiary
http://eclipse.org/jetty HTTP, SPDY, Websocket server and client that scales
http://www.webtide.com  advice and support for jetty and cometd.

Back to the top