介绍
DevOps/GitOpsKubernetes
NanoserverShare memory by communication(通过通信共享内存)
LinuxBPFSRE
Step-By-Step 开发 Mahjong Server
单体架构Mahjong ServerNano Distributed Game Server(分布式)微服务
游客登录业务分析
游客(Guest)登录
回顾一下 Nano 框架
Nano Game Server
Nano 术语
ComponentnanoComponentComponentHandlerComponentRoute具体服务位置SessionGroupGroupSessionRequestResponseNotifyPushNano
Nano 组件的生命周期
InitAfterInitBeforeShutdownShutdown
整个组件的生命周期看起来非常的清晰。
Nano
internal/game/game.gonano.WithDebugMode()
启动游戏服务器并查看其启动日志
Nano
The current server running in singleton modeNanoNano可以学习下它的架构,入门分布式系统开发
NanoManagerDeskManagerClubManager
Manager(Handlers):
- Manager.CheckOrder
- Manager.Login
DeskManager(Handlers):
- DeskManager.DissolveStatus
- DeskManager.QiPaiFinished
- DeskManager.VoiceMessage
- DeskManager.ClientInitCompleted
- DeskManager.Exit
- DeskManager.OpChoose
- DeskManager.Ready
- DeskManager.UnCompleteDesk
- DeskManager.DingQue
- DeskManager.Dissolve
- DeskManager.Join
- DeskManager.ReJoin
- DeskManager.RecordingVoice
- DeskManager.Resume
- DeskManager.CreateDesk
- DeskManager.Pause
- DeskManager.ReConnect
- DeskManager.ReEnter
ClubManager(Handlers):
- ClubManager.ApplyClub
分析 Nano Debug 日志和 Charles 捕获
Nanoserver
Charles API 捕获
API
/v1/user/login/query游客(Guest)登录
/v1/user/login/guest
服务器 Debug 日志输出
我们看到了 Nano Server 输出的如下关键信息:
Message={ Request Manager.Login }Message={ Request DeskManger.UnCompleteDesk}
v1/user/login/guest192.168.31.125:33251socketNano Game Server
最后,一句话描述业务流程
游客(Guest)登录
关于登录流程的详细业务和代码逻辑,我们下篇再详细讨论。