You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provide FlatMappingProcessor as an alternative to UnboundedProcessor #752
Right now in RSocket we use UnboundedProcessor which simply is an MultiProducerSingleConsumerArrayLinkedQueue.
It means that all frames from all possible interactions are enqueued into that queue with NO backpressure control and then underlying connection drains elements with the speed it can:
Such a design may lead to many problems including memory leaks and general application instability
Proposal
In order to have fine-grained control on all the levels, I propose to provide a customizable processor and introduce FlatMappingProcessor instead.
In a few words, FlatMappingProcessor should behave identically to FlatMap operator in ProjectReactor / RxJava
Main Characteristic
Prefetch Mode for Flux
Concurrency Control (RSocket user can specify the number of active streams)
Small SpScBoundedArrayQueue for every Flux (requestChannel / requestStream cases) and general scalar MpScUnboundedLinkedArrayQueue for Mono cases
changed the title [-]Replace UnboundedProcessor with FlatMap Like Processor[/-][+]Customizable SendingProcessor [UnboundedProcessor vs FlatMappingProcessor][/+]on Mar 11, 2020
changed the title [-]Customizable SendingProcessor [UnboundedProcessor vs FlatMappingProcessor][/-][+]Provide `FlatMappingProcessor` as an alternative to `UnboundedProcessor`[/+]on Nov 3, 2020
Activity
[-]Replace UnboundedProcessor with FlatMap Like Processor[/-][+]Customizable SendingProcessor [UnboundedProcessor vs FlatMappingProcessor][/+][-]Customizable SendingProcessor [UnboundedProcessor vs FlatMappingProcessor][/-][+]Provide `FlatMappingProcessor` as an alternative to `UnboundedProcessor`[/+]