Session 07 scope (5 features, 17 tests, ~1165 Go LOC): - Protocol/ParserTypes.cs: ParserState enum (79 states), PublishArgument, ParseContext - Protocol/IProtocolHandler.cs: handler interface decoupling parser from client - Protocol/ProtocolParser.cs: Parse(), ProtoSnippet(), OverMaxControlLineLimit(), ProcessPub/HeaderPub/RoutedMsgArgs/RoutedHeaderMsgArgs, ClonePubArg(), GetHeader() - tests/Protocol/ProtocolParserTests.cs: 17 tests via TestProtocolHandler stub Auth extras from session 06 (committed separately): - Auth/TpmKeyProvider.cs, Auth/CertificateIdentityProvider/, Auth/CertificateStore/ Internal utilities & data structures (session 06 overflow): - Internal/AccessTimeService.cs, ElasticPointer.cs, SystemMemory.cs, ProcessStatsProvider.cs - Internal/DataStructures/GenericSublist.cs, HashWheel.cs - Internal/DataStructures/SubjectTree.cs, SubjectTreeNode.cs, SubjectTreeParts.cs All 461 tests pass (460 unit + 1 integration). DB updated for features 2588-2592 and tests 2598-2614.
1.3 KiB
1.3 KiB
Session 16: Gateways
Summary
Gateway connections — inter-cluster message routing. Gateways enable NATS super-clusters where messages flow between independent clusters.
Scope
| Go File | Features | Feature IDs | Go LOC |
|---|---|---|---|
| server/gateway.go | 91 | 1263–1353 | 2,816 |
| Total | 91 | 2,816 |
.NET Classes
GatewayHandler— gateway connection managementGatewayCfg— gateway configurationServerGateway— per-server gateway stateGatewayInterestMode— interest/optimistic mode trackingGwReplyMapping— reply-to subject mapping for gatewaysClientConnection(partial — gateway-specific methods)
Test Files
| Test File | Tests | Test IDs |
|---|---|---|
| server/gateway_test.go | 88 | 600–687 |
| Total | 88 |
Dependencies
- Session 01 (Foundation Types)
- Session 07 (Protocol Parser)
- Session 08 (Client Connection)
- Session 09 (Server Core Part 1)
- Session 11 (Accounts — for interest propagation)
- Session 14 (Routes)
.NET Target Location
dotnet/src/ZB.MOM.NatsNet.Server/Gateway/
Notes
- Gateway protocol has optimistic and interest-only modes
- Account-aware interest propagation is complex
- 88 tests — thorough coverage of gateway scenarios