What happened to FragmentationDuplexConnection?

82 Views Asked by At

We had a custom spring boot starter based on rsocket-rpc and we used FragmentationDuplexConnection. After upgrading to Rsocket 1.1.0 and rsocket-rpc 0.3.0, it seems that FragmentationDuplexConnection no longer exists in the code. What replaced it?

We used it because we had problems using RSocket through websocket through load balancer/proxy and had to set the MTU to 65K.

1

There are 1 best solutions below

1
On

@Mavo with RSocket-Java 1.1 we revised internals and moved that logic to dedicated reactive-streams operators. The reason for that is Head-Of-Line Blocking problem pretended to be solved with fragmentation is not solved in reality given RSocket-Java 1.0 design (within a duplex connection we have only a single thread consuming data, hence fragmentation done on the DuplexConnection level will block other frames from fragmentation until the currently fragmented one will not be fully delivered).

To resolve the mentioned design problem, we moved fragmentation and reassembly to a level above. Now every responder side operator has a reassembly logic in it (e.g -> https://github.com/rsocket/rsocket-java/blob/master/rsocket-core/src/main/java/io/rsocket/core/RequestStreamResponderSubscriber.java#L315), as well as every requester operator, do fragmentation before sending frames to duplex connection and do this operation independently from the other requests and can do it on its own thread (https://github.com/rsocket/rsocket-java/blob/master/rsocket-core/src/main/java/io/rsocket/core/FireAndForgetRequesterMono.java#L150)