Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

WIP: Add unix socket support?#172

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
javaarchive wants to merge8 commits intolemunozm:master
base:master
Choose a base branch
Loading
fromjavaarchive:master

Conversation

@javaarchive
Copy link

image
Works on my machine borrowing most of the code from the tcp adapter. Has some implementation issues that I'll be putting as a list here:

  • peer and remote address is set to a filler value because there is a different SocketAddr type than required, not sure how I can convert between the two.
  • As seen inTrait implementation of adapters that cannot accept a socket address? #171 , the path of the unix socket is currently hacked in via other options and the SocketAddr is completley ignored, considering using an Option here.
  • Throughput has no native UnixSocket test yet.

lemunozm and dovahcrow reacted with heart emoji
@javaarchivejavaarchive marked this pull request as draftMay 31, 2024 06:33
remote: Self {
stream
},
// the unixstream uses SocketAddr from mio that can't be converted
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Out of curiosity, what then identifies an unix socket?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

local_addr and peer_addr are currently a placeholder value, the unix sockets seem to have a totally different local and peer addr format.

lemunozm reacted with thumbs up emoji
@javaarchive
Copy link
Author

Tested in release, websocket is only slow in debug for some reason, here is an output from the same computer for reference:

Sending 1GB in chunks of 65507 bytes:message-io Udp:  Throughput: 9.24 GB/smessage-io Tcp:  Throughput: 5.68 GB/smessage-io FramedTcp:  Throughput: 4.49 GB/smessage-io Ws:  Throughput: 1.85 GB/smessage-io UnixSocket:  Throughput: 9.61 GB/snative Udp: Throughput: 10.24 GB/snative Tcp: Throughput: 6.08 GB/snative FramedTcp: Throughput: 4.78 GB/snative Ws: Throughput: 1.94 GB/s
lemunozm reacted with thumbs up emoji

@javaarchive
Copy link
Author

javaarchive commentedJun 2, 2024
edited
Loading

Discovered implementation issue where messages sent after each other without a sleep are dropped.

Edit: this is fine for the stream based protocol

lemunozm reacted with thumbs up emoji

@javaarchive
Copy link
Author

image
Datagram support throughput (in debug).
For release:
image
I'm still finding it odd that the stream based transport slows down in release but that might just be variation while I'm testing this.

@javaarchive
Copy link
Author

Due to unix datagram sockets not really having an IPv4 or IPv6 that fits in the SocketAddr struct, the implementation is partially broken for now.
I may see if I can change the types on a separate branch as an experiment.

@lemunozm
Copy link
Owner

Hi@javaarchive, Mmmm... interesting the throughput issue. At such speeds could be noise in the runs. Is it always faster indebug or sometimes?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@lemunozmlemunozmlemunozm left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@javaarchive@lemunozm

[8]ページ先頭

©2009-2025 Movatter.jp