New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use efficient data structure in StreamFrameSorter #300
Comments
Reopening. |
It would be nice if the same data structure could also be used in the Unfortunately, the only (?) popular generic tree data structure around is Google's Btree, which 1. has a horrible iterator interface and 2. doesn't support modifications while iterating. It would be nice to find a 3rd party package that's widely used (let's say at least 100 imports, as reported by godoc), and actively maintained. While there are a few repos around, none of them even makes it to 10 imports, so I don't feel very comfortable relying on their code. |
Can we use a concurrent skip[list,set,map] for this? |
@zllovesuki Do you have a specific one in mind? |
@marten-seemann was thinking about https://github.com/zhangyunhao116/skip[set,map] implementation, purely because I did something similar to frameSorter in Java with ConcurrentSkipListSet. As for import counts, let's just say that private repository imports don't show up |
There exists a lock-free RBT paper but I don't think there's an implementation yet: http://www.cs.umanitoba.ca/%7Ehacamero/Research/RBTreesKim.pdf |
This probably doesn't directly apply to the stream frame sorter, but here's a proposal for an efficient way to track sent packets and handle ACKs: #3836 |
This is the follow-up of #298.
I increased the
MaxStreamFrameSorterGaps
from 50 to 1000, which makes us (a bit) vulnerable to a DoS attack if a malicious client sends usStreamFrames
with a lot of gaps. It should not be too critical, for comparison, Chrome recently introduced a limit of 10000 here. It's still something we should mitigate some time soon.We need some data structure here that allows for binary searches as well as random inserts and removal of elements, so probably some kind of (balanced) tree structure.
The text was updated successfully, but these errors were encountered: