Skip to content

Conversation

@Measurity
Copy link
Collaborator

@Measurity Measurity commented Apr 17, 2025

  • Wrap NitroxConfig in custom MS configuration provider for validation, CMD args and DI support
  • Replace logging with ZLogger for improved performance, while keeping all prior features of Nitrox.Model.Logger.Log (i.e. redaction and LogOnce).
  • Refactor IPC communication between launcher<->server with MagicOnion for improved stability and performance.
  • Add a server.Development.json which allows developers to override any config property. It should be generated on build if it doesn't exist. And should work with instant launch too.

Missing features

Reviewing

Everything flows from Program.StartServerAsync so I recommend giving it a good look before reviewing the rest.

I tried to compartmentalize dependencies together into extension methods on IServiceCollection. In other words, removing .AddPackets() should still compile and run the server. It just won't have any packet related services (like LiteNetLib) running.

Issues to close

Preview

image

@Measurity Measurity added Area: dev Related to development environment or dev QoL Area: server moderation Related to managing server config and server player management Area: persistence Related to serialization for long term storage (i.e. files and databases) labels Apr 17, 2025
@Measurity Measurity linked an issue May 11, 2025 that may be closed by this pull request
@Jannify Jannify added this to the 1.9 milestone Aug 8, 2025
@dartasen
Copy link
Member

dartasen commented Oct 8, 2025

Seems like another huge piece of work and it will be hard to test/integrate.
I think we should probably slice it into multiple PR (.NET Host refactor, Encryption, Sqlite)

@github-actions
Copy link

github-actions bot commented Oct 8, 2025

Test Results

239 tests   - 7   238 ✅  - 7   7s ⏱️ ±0s
  1 suites ±0     1 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 013ba52. ± Comparison against base commit aae4e50.

This pull request removes 8 and adds 1 tests. Note that renamed tests count towards both.
Nitrox.Server.Subnautica.Models.Serialization.WorldPersistenceTest ‑ EntityDataTest (SubnauticaServerJsonSerializer)
Nitrox.Server.Subnautica.Models.Serialization.WorldPersistenceTest ‑ EntityDataTest (SubnauticaServerProtoBufSerializer)
Nitrox.Server.Subnautica.Models.Serialization.WorldPersistenceTest ‑ GlobalRootDataTest (SubnauticaServerJsonSerializer)
Nitrox.Server.Subnautica.Models.Serialization.WorldPersistenceTest ‑ GlobalRootDataTest (SubnauticaServerProtoBufSerializer)
Nitrox.Server.Subnautica.Models.Serialization.WorldPersistenceTest ‑ PlayerDataTest (SubnauticaServerJsonSerializer)
Nitrox.Server.Subnautica.Models.Serialization.WorldPersistenceTest ‑ PlayerDataTest (SubnauticaServerProtoBufSerializer)
Nitrox.Server.Subnautica.Models.Serialization.WorldPersistenceTest ‑ WorldDataTest (SubnauticaServerJsonSerializer)
Nitrox.Server.Subnautica.Models.Serialization.WorldPersistenceTest ‑ WorldDataTest (SubnauticaServerProtoBufSerializer)
Nitrox.Model.Helper.HashTreeTest ‑ ShouldTestForSameValue

♻️ This comment has been updated with latest results.

@Measurity Measurity changed the title Refactored server to use .NET Generic Host APIs Refactor server to use .NET Generic Host APIs Oct 9, 2025
@Measurity Measurity removed the Area: persistence Related to serialization for long term storage (i.e. files and databases) label Oct 20, 2025
@Measurity Measurity force-pushed the server-net-host branch 3 times, most recently from 598fcfd to 467ebf3 Compare October 26, 2025 13:59
@Measurity Measurity force-pushed the server-net-host branch 5 times, most recently from a333b83 to 210277d Compare November 7, 2025 01:04
@Measurity Measurity force-pushed the server-net-host branch 7 times, most recently from 5348224 to 0ee1082 Compare December 1, 2025 00:25
@Measurity Measurity removed this from the 1.9 milestone Dec 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: dev Related to development environment or dev QoL Area: server moderation Related to managing server config and server player management

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor server project to use .NET Generic Host to remove code smells

3 participants