Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 320728

Summary: TCPConnector should serve the channels in a round-robin way
Product: [Modeling] EMF Reporter: Cyril Jaquier <cyril.jaquier>
Component: cdo.net4jAssignee: Eike Stepper <stepper>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3    
Version: 4.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: offline-xx
Attachments:
Description Flags
Patch - for future reference none

Description Cyril Jaquier CLA 2010-07-23 10:45:02 EDT
Build Identifier: HEAD

Currently, the implementation of TCPConnector uses a LinkedBlockingList to queue the channels (FIFO).

If a channel C1 sends a lot of data, other channels will be able to send their data only after all the ByteBuffers of C1 have been transmitted.

This is a problem when the HeartBeatProtocol is enabled and a cloned repository is synchronizing over a slow network connection. In such case, the heartbeats are not sent on time and the client thinks that the connection is dead.

A round-robin scheduling of the channels solves this issue.

Reproducible: Always
Comment 1 Eike Stepper CLA 2010-07-24 08:28:34 EDT
Created attachment 175138 [details]
Patch - for future reference

I implemented a RoundRobinBlockingQueue in net4j.util.
Comment 2 Eike Stepper CLA 2010-07-24 08:33:20 EDT
Committed to HEAD
Comment 3 Eike Stepper CLA 2011-06-23 03:42:08 EDT
Available in R20110608-1407