Open xieyuschen opened 2 years ago
For the code coupling, could also see the #3174 .
To enable a global logger which binds to the server, we could decouple many functions from the server
struct.
Thanks.
Will have @kozlovic take a look once back from extended holiday.
Will have @kozlovic take a look once back from extended holiday.
Got it, could I know about the approximate agenda about him? Thanks
A few weeks.
I am picking this up possibly looking forward to v2.10.0.
I am picking this up possibly looking forward to v2.10.0.
Glad to here it:) Regards
Currently, nats-server provides many network protocol support such as
mqtt
andwebsocket
. But the code management seems not good and it might block the further network feature such as addingquic
support.Now all network details are in the
server
package which is easy confusing both developers and people who read the source code. The code management way here is more like what python does, each file handles one package. For example, in theserver
package, there are bothmqtt
andwebsocket
and in the future, there might bequic
. To clarify which the function relationship, we do this:// this is a mqtt function. func (c client) mqttConnectTrace(cp mqttConnectProto) string {
What's worse, all unexported function are visable in
server
package but they should not. I think it's better to encapsulate the network into a single package to make the code cleaner.Thanks