Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320728 - TCPConnector should serve the channels in a round-robin way
Summary: TCPConnector should serve the channels in a round-robin way
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.net4j (show other bugs)
Version: 4.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard: offline-xx
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-23 10:45 EDT by Cyril Jaquier CLA
Modified: 2011-06-23 03:42 EDT (History)
0 users

See Also:


Attachments
Patch - for future reference (12.00 KB, patch)
2010-07-24 08:28 EDT, Eike Stepper CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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