English | 简体中文
- zfoo demo project for the framework's game server
- Single-server running code and distributed running code are almost identical
- The upper can write games, the lower can write websites, single server, distributed, gateway, asynchronous call omnipotence, so it is called a universal RPC framework
-
Project dependencies zfoo ,Use Maven install before running zfoo
-
JDK 11+
-
MongoDB 4.2
-
Zookeeper 3.6.1
-
admin provide game entry and background management system for web resource server
-
single for single-server game servers, single-boot is a single configured with spring boot automation, and the code is consistent
-
runs the test
1. Run the game in a browser using the server startup entry for websockets,ApplicationTest.startWebsocketApplication()
2. The server boot entry that uses TCP runs on the UNTIY species,ApplicationTest.startApplication()
Local game entry,http://localhost:9600/game/index.html
Local web management url,http://localhost:9600/
- admin provide game entry and background management system for web resource server
- gateway gateway
- cache provides caching services
- home provides basic business logic services
Local game entry,http://localhost:9600/game/index.html
Local web management url,http://localhost:9600/
- game entry tank.zfoo.net
- web management url tank-admin.zfoo.net
Single-server deployment command:
sh /deploy.sh stopUpdateStart /usr/local/tank/admin/admin-1.0.jar /usr/local/tank/admin
sh /deploy.sh stopUpdateStart /usr/local/tank/single/single-1.0.jar /usr/local/tank/single
Distributed deployment commands:
sh /deploy.sh stopUpdateStart /usr/local/tank/admin/admin-1.0.jar /usr/local/tank/admin
sh /deploy.sh stopUpdateStart /usr/local/tank/cache/cache-1.0.jar /usr/local/tank/cache
sh /deploy.sh stopUpdateStart /usr/local/tank/gateway/gateway-1.0.jar /usr/local/tank/gateway
sh /deploy.sh stopUpdateStart /usr/local/tank/home/home-1.0.jar /usr/local/tank/home