Skip to content
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

conntrack: add connection tracker wrapper based on connfu #943

Merged
merged 6 commits into from
Oct 28, 2024

Conversation

mmatczuk
Copy link
Contributor

Use builder pattern to return implementation with only required features. Use connfu to handle CloseWrite() and ReadFrom() propagation.

@mmatczuk mmatczuk force-pushed the mmt/tracking_v2 branch 4 times, most recently from eab9d95 to 99b37c7 Compare October 16, 2024 10:39
go.mod Show resolved Hide resolved
tracked/tracked.go Outdated Show resolved Hide resolved
tracked/tracked.go Outdated Show resolved Hide resolved
@Choraden
Copy link
Contributor

Choraden commented Oct 16, 2024

Although tracked seems cool, we could use some fancy name to emphasise it's a real net.Conn on steroids.
Some proposals:

  • connx
  • turboconn
  • hyperconn
  • connboost

@mmatczuk
Copy link
Contributor Author

Traditionally the name is conntrac not to get confused with conntrac in Linux.

@mmatczuk
Copy link
Contributor Author

Renamed package to conntrack, added Build() and BuildWithObserver() to simplify usage.

@mmatczuk mmatczuk changed the title tracked: add connection tracker wrapper based on connfu conntrack: add connection tracker wrapper based on connfu Oct 16, 2024
Use builder pattern to return implementation with only required features.
Use connfu to handle CloseWrite() and ReadFrom() propagation.
@mmatczuk mmatczuk force-pushed the mmt/tracking_v2 branch 2 times, most recently from c9ae8e3 to e20c8ac Compare October 16, 2024 14:30
@Choraden
Copy link
Contributor

@mmatczuk This looks good!

  1. I wonder if we want to add assertion in martian that the splice optimisation is to take place.
  2. I would love to see some numbers on how it improves performance.

@mmatczuk mmatczuk merged commit 8544324 into main Oct 28, 2024
7 checks passed
@mmatczuk mmatczuk deleted the mmt/tracking_v2 branch October 28, 2024 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants