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

Investigate channels #160

Open
elementbound opened this issue Nov 28, 2023 · 4 comments
Open

Investigate channels #160

elementbound opened this issue Nov 28, 2023 · 4 comments
Labels
feature New feature or request

Comments

@elementbound
Copy link
Contributor

elementbound commented Nov 28, 2023

Channels can be used to separate messages into different sub-connections, so we don't need to wait for one type of message to arrive before we can process the other.

This issue is to investigate if channels can improve netfox.

Refs #157

@elementbound elementbound added the feature New feature or request label Nov 28, 2023
@TheYellowArchitect
Copy link
Contributor

TheYellowArchitect commented Oct 16, 2024

I suggest closing this because there is no hint or indication of any codeblock improving in bandwidth if channels are used in it, and in this pace this issue will linger forever.

In fact, I would argue against netfox using different channels, because for big games, the design should approximately go like this: netfox having channel 1, and the rest of the channels being seperate from default/netfox and exclusive to the game e.g. for player chat or downloading assets from the server.

@elementbound
Copy link
Contributor Author

I suggest closing this because there is no hint or indication of any codeblock improving in bandwidth if channels are used in it, and in this pace this issue will linger forever.

Just straight up saying things without explaining / elaborating / citing source won't make for a very solid argument. I saw potential in channels as to my understanding they can eliminate two separate kinds of reliable / unreliable_ordered messages on waiting for each-other. Same for clashing with game-specific reliable messages clashing with netfox reliables.

Another reason this issue is "lingering" is that there's been 30+ issues opened 😛


for big games, the design should approximately go like this: [...]

That's one way to go about it, but not the only way. There's no reason there couldn't be a NETFOX_MAX_CHANNELS or similar constant. Though what I'd do is instead defining some max channels constant, and go backwards from there, so users can have their regular channels ( 1, 2, 3, etc. ) without being concerned about clashing with netfox ( which would probably use 31, 30, 29, etc. ).

@TheYellowArchitect
Copy link
Contributor

TheYellowArchitect commented Nov 7, 2024

There's no reason there couldn't be a NETFOX_MAX_CHANNELS or similar constant. Though what I'd do is instead defining some max channels constant, and go backwards from there, so users can have their regular channels ( 1, 2, 3, etc. ) without being concerned about clashing with netfox ( which would probably use 31, 30, 29, etc. ).

I do not know about ENET's internals, but doesn't a number like channel 30 increase bandwidth? I mean, the more channels there are, the more overhead there is, at least in theory (haven't seen ENET's code), because I assume it would require channels between (1 to 30)

Handling so many channels seems counterproductive because they would introduce race-conditions, hence my suggestion of how big games' would be designed around

Anyway, I don't know much about channels, just brainstorming

@elementbound
Copy link
Contributor Author

I doubt any of the above applies, but let me know if you find something that says otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants