Skip to content

chore: cleanup & improve networking#1433

Merged
0utplay merged 76 commits intonightly-jdk22from
network-refactor
Jul 7, 2024
Merged

chore: cleanup & improve networking#1433
0utplay merged 76 commits intonightly-jdk22from
network-refactor

Conversation

@derklaro
Copy link
Member

@derklaro derklaro commented Jul 2, 2024

Motivation

The current network implementation has some issues that needed to be addressed. Most noticeble are:

  • issues with very high native memory consumption due to netty not releasing native memory instantly
  • issues with a lot of loaded classes that were auto generated
  • use of ASM which leads to issues with server implementations
  • rpc code generation can be noticeably improved, especially to ease the usage
  • and many places where the old code was just messy and could be replaced with a cleaner & easier to read version

Modification

  • bump the required java version for cloudnet to 22 & enable preview features.
  • replace the usages of ASM in code generation with the java classfile api
  • rewrite rpc handling & code generation completely
  • improve default values for settings (for example lower thread counts for packet handling)
  • improve chunked data transfer, prevent race conditions when querying files
  • use custom buffer allocator that releases native memory immediately instead of relying on GC
  • higher test coverage
  • ... and many more small cleanups and improvements

Result

Improved networking that should ease the use for external users and definitely decrease the amount of reported errors.

derklaro and others added 30 commits May 30, 2024 19:05
@derklaro derklaro added v: 4.X This pull should be included in the 4.0 release in: driver An issue/pull request releated to the driver module code t: fix A pull request introducing a fix for a bug. t: improvement The pull request improves existing code a: api An issue/pull request that is related to api changes. labels Jul 2, 2024
@derklaro derklaro added this to the 4.0.0-RC11 milestone Jul 2, 2024
@derklaro derklaro requested a review from 0utplay July 2, 2024 12:39
@derklaro derklaro self-assigned this Jul 2, 2024
@derklaro derklaro changed the title Network refactor chore: cleanup & improve networking Jul 2, 2024
@github-actions
Copy link

github-actions bot commented Jul 2, 2024

Test Results

 47 files  +3   47 suites  +3   2m 13s ⏱️ +52s
420 tests +6  420 ✅ +6  0 💤 ±0  0 ❌ ±0 
751 runs  +6  751 ✅ +6  0 💤 ±0  0 ❌ ±0 

Results for commit 4583b29. ± Comparison against base commit af2222d.

♻️ This comment has been updated with latest results.

Copy link
Member

@0utplay 0utplay left a comment

Choose a reason for hiding this comment

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

Just small comments and some questions

@0utplay 0utplay merged commit 22abdbe into nightly-jdk22 Jul 7, 2024
@0utplay 0utplay deleted the network-refactor branch July 7, 2024 13:43
derklaro added a commit that referenced this pull request Jul 8, 2024
The current network implementation has some issues that needed to be
addressed. Most noticeble are:
- issues with very high native memory consumption due to netty not
releasing native memory instantly
- issues with a lot of loaded classes that were auto generated
- use of ASM which leads to issues with server implementations
- rpc code generation can be noticeably improved, especially to ease the
usage
- and many places where the old code was just messy and could be
replaced with a cleaner & easier to read version

- bump the required java version for cloudnet to 22 & enable preview
features.
- replace the usages of ASM in code generation with the java classfile
api
- rewrite rpc handling & code generation completely
- improve default values for settings (for example lower thread counts
for packet handling)
- improve chunked data transfer, prevent race conditions when querying
files
- use custom buffer allocator that releases native memory immediately
instead of relying on GC
- higher test coverage
- ... and many more small cleanups and improvements

Improved networking that should ease the use for external users and
definitely decrease the amount of reported errors.
derklaro added a commit that referenced this pull request Jul 9, 2024
The current network implementation has some issues that needed to be
addressed. Most noticeble are:
- issues with very high native memory consumption due to netty not
releasing native memory instantly
- issues with a lot of loaded classes that were auto generated
- use of ASM which leads to issues with server implementations
- rpc code generation can be noticeably improved, especially to ease the
usage
- and many places where the old code was just messy and could be
replaced with a cleaner & easier to read version

- bump the required java version for cloudnet to 22 & enable preview
features.
- replace the usages of ASM in code generation with the java classfile
api
- rewrite rpc handling & code generation completely
- improve default values for settings (for example lower thread counts
for packet handling)
- improve chunked data transfer, prevent race conditions when querying
files
- use custom buffer allocator that releases native memory immediately
instead of relying on GC
- higher test coverage
- ... and many more small cleanups and improvements

Improved networking that should ease the use for external users and
definitely decrease the amount of reported errors.
derklaro added a commit that referenced this pull request Jul 12, 2024
The current network implementation has some issues that needed to be
addressed. Most noticeble are:
- issues with very high native memory consumption due to netty not
releasing native memory instantly
- issues with a lot of loaded classes that were auto generated
- use of ASM which leads to issues with server implementations
- rpc code generation can be noticeably improved, especially to ease the
usage
- and many places where the old code was just messy and could be
replaced with a cleaner & easier to read version

- bump the required java version for cloudnet to 22 & enable preview
features.
- replace the usages of ASM in code generation with the java classfile
api
- rewrite rpc handling & code generation completely
- improve default values for settings (for example lower thread counts
for packet handling)
- improve chunked data transfer, prevent race conditions when querying
files
- use custom buffer allocator that releases native memory immediately
instead of relying on GC
- higher test coverage
- ... and many more small cleanups and improvements

Improved networking that should ease the use for external users and
definitely decrease the amount of reported errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: api An issue/pull request that is related to api changes. in: driver An issue/pull request releated to the driver module code t: fix A pull request introducing a fix for a bug. t: improvement The pull request improves existing code v: 4.X This pull should be included in the 4.0 release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants