Skip to content

Commit

Permalink
Prepare to v0.0.2 release, update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
walkline committed Dec 30, 2023
1 parent a1461e0 commit 2a6ee3b
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 41 deletions.
4 changes: 2 additions & 2 deletions .github/images/tc9.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 37 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,44 @@
# ToCloud9

**ToCloud9** is an attempt to make [TrinityCore](https://github.com/TrinityCore/TrinityCore) and its forks scalable and cloud-native.
The project is at the beginning of development and has limited functionality.
**ToCloud9** provides a variety of microservices that operate alongside AzerothCore/TrinityCore and enable clustering support, making the system scalable and highly available.

## Architecture
The primary concept underlying the current architecture is to enhance the scalability of TrinityCore/AzerothCore with minimal modifications on their end.

To fulfill these objectives, a game-load-balancer microservice has been developed.
Functioning akin to an API Gateway, the game-load-balancer analyzes packets and strategically routes them to the Gameserver or generates requests to other services for handling.

The simplified architecture described below.

The current architecture described (in simplified form) in the image bellow:
![](.github/images/tc9.svg "architecture")
Since project is at beginning of development more components would be added and modified.

At the moment, it supports 3.3.5 client and has the next applications:
* __authserver__ authorizes players, provides realmlist and connects a game client to the "smart" game load balancer with the least active connections;
* __game-load-balancer__ holds game client TCP connection, offloads encryption, reads packets and routes requests to other services.
For every character creates connection to the game server (TrinityCore) that Servers Registry provides.
Also intercepts some packets and uses information from them to sync some states between services.
* __servers-registry__ holds information about every running instance of Game Load Balancer and Game Server (TrinityCore world server).
Makes health checks and collects necessary metrics (active connections at the moment). Assigns maps to Game Server instances.
* __chatserver__ at the moments holds characters online and handles "whisper" messages;
* __charserver__ provides information to handle SMsgCharEnum opcode. Holds information about connected players. Handles Who opcode.
* __gameserver__ is modified TrinityCore world server with `sidecar` library, that registers GameServer in Servers Registry and handles health checks.
* __guildserver__ handles some guild opcodes. Still misses guild creation and guildbank functionality.
* __guidserver__ provides pool of guids of items and characters to the gameservers.
* __mailserver__ handles mail opcodes.

If you'd like to read more, you can take a look at the pillars that form the foundation of ToCloud9 **[here](https://github.com/azerothcore/azerothcore-wotlk/discussions/16748)**.

## Current state
Currently, it is possible to play the game, but some functionalities still do not support a distributed architecture (clustering). Here is a list of features/tasks that, once completed, will enable it to replace the widely used unscalable monolith (vanilla TrinityCore/AzerothCore). The status is relevant for integration with AzerothCore.

| Feature/Task | Status | Comment |
|---------------------------------------------------------------|---------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| Gameservers and other services discovery || |
| Services communication with NATS and gRPC || |
| Redirect players from one gameserver to another on map change || |
| Gameservers crash recovery || Players would be redirected <br/>to the another available gameserver |
| Automatic load balancing maps between gameservers || |
| Shared pool of GUIDs || Sharing Players, Items, Instance GUIDs |
| "Who" opcode handling || |
| Whispering in cluster support || |
| Guilds in cluster support | 90% | Guild creation functionality is missing |
| Guild bank in cluster support | 0% | |
| Mail in cluster support || |
| Auction house in cluster support | 0% | |
| Friends list in cluster support | 0% | |
| Global channels in cluster support | 0% | |
| Parties and raids in cluster support | 80% | **Not implemented:** <br/>ready checks, instances reset on player request, <br/>prolonging instance bind, <br/>moving raid members between groups, <br/>and updating group members state <br/>like health when on different maps |
| Battlegrounds in cluster support | 0% | |
| Arenas in cluster support | 0% | |
| LFG in cluster support | 0% | |
| Sync transports between gameservers || |
| Helm chart support || |

## Deployment

Expand Down
5 changes: 5 additions & 0 deletions chart/templates/groupserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ spec:
value: "{{ .Values.groupserver.service.internalPort | int }}"
- name: NATS_URL
value: nats://{{ .Release.Name }}-nats:4222
- name: CHAR_DB_CONNECTION
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-databases-config
key: CHAR_DB_CONNECTION
- name: CHAR_SERVICE_ADDRESS
value: {{ .Release.Name }}-charserver:{{ .Values.charserver.service.externalPort}}
ports:
Expand Down
40 changes: 20 additions & 20 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ servers_registry:
replicaCount: 1
image:
repository: ghcr.io/walkline/servers-registry
pullPolicy: IfNotPresent
tag: "v0.0.1"
pullPolicy: Always
tag: "v0.0.2"
service:
type: ClusterIP
internalPort: 8999
Expand All @@ -42,8 +42,8 @@ authserver:
replicaCount: 1
image:
repository: ghcr.io/walkline/authserver
pullPolicy: IfNotPresent
tag: "v0.0.1"
pullPolicy: Always
tag: "v0.0.2"
service:
type: NodePort
internalPort: 3724
Expand All @@ -53,8 +53,8 @@ guildserver:
replicaCount: 1
image:
repository: ghcr.io/walkline/guildserver
pullPolicy: IfNotPresent
tag: "v0.0.1"
pullPolicy: Always
tag: "v0.0.2"
service:
type: ClusterIP
internalPort: 8995
Expand All @@ -64,8 +64,8 @@ guidserver:
replicaCount: 1
image:
repository: ghcr.io/walkline/guidserver
pullPolicy: IfNotPresent
tag: "v0.0.1"
pullPolicy: Always
tag: "v0.0.2"
service:
type: ClusterIP
internalPort: 8996
Expand All @@ -75,8 +75,8 @@ chatserver:
replicaCount: 1
image:
repository: ghcr.io/walkline/chatserver
pullPolicy: IfNotPresent
tag: "v0.0.1"
pullPolicy: Always
tag: "v0.0.2"
service:
type: ClusterIP
internalPort: 8992
Expand All @@ -86,8 +86,8 @@ charserver:
replicaCount: 1
image:
repository: ghcr.io/walkline/charserver
pullPolicy: IfNotPresent
tag: "v0.0.1"
pullPolicy: Always
tag: "v0.0.2"
service:
type: ClusterIP
internalPort: 8087
Expand All @@ -97,8 +97,8 @@ groupserver:
replicaCount: 1
image:
repository: ghcr.io/walkline/groupserver
pullPolicy: IfNotPresent
tag: "v0.0.1"
pullPolicy: Always
tag: "v0.0.2"
service:
type: ClusterIP
internalPort: 8998
Expand All @@ -108,8 +108,8 @@ mailserver:
replicaCount: 1
image:
repository: ghcr.io/walkline/mailserver
pullPolicy: IfNotPresent
tag: "v0.0.1"
pullPolicy: Always
tag: "v0.0.2"
service:
type: ClusterIP
internalPort: 8997
Expand All @@ -124,8 +124,8 @@ game_lb:
port: 32766
image:
repository: ghcr.io/walkline/game-load-balancer
pullPolicy: IfNotPresent
tag: "v0.0.1"
pullPolicy: Always
tag: "v0.0.2"
service:
type: NodePort

Expand All @@ -146,8 +146,8 @@ gameserver_ac:
port_health: 9604
image:
repository: ghcr.io/walkline/gameserver-ac
pullPolicy: IfNotPresent
tag: "v0.0.1"
pullPolicy: Always
tag: "v0.0.2"
service:
type: ClusterIP
internalPort: 9509
Expand Down
4 changes: 3 additions & 1 deletion doc/RunNonDockerWinWSLAzerothCore.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ go build -o bin/game-load-balancer.exe apps/game-load-balancer/cmd/game-load-bal
go build -o bin/servers-registry.exe apps/servers-registry/cmd/servers-registry/main.go
go build -o bin/guidserver.exe apps/guidserver/cmd/guidserver/main.go
go build -o bin/guildserver.exe apps/guildserver/cmd/guildserver/main.go
go build -o bin/groupserver.exe apps/guildserver/cmd/groupserver/main.go
go build -o bin/mailserver.exe apps/mailserver/cmd/mailserver/main.go
```
4. Now in `bin` directory you should see 8 .exe files. We will get back to them on Setup & Run steps.
4. Now in `bin` directory you should see 9 .exe files. We will get back to them on Setup & Run steps.

### Build AzerothCore

Expand Down Expand Up @@ -88,6 +89,7 @@ Then run the rest of exe files:
* chatserver.exe
* game-load-balancer.exe
* guildserver.exe
* groupserver.exe
* mailserver.exe

At this point, you should be able to log in to your account (if you have any in the database) and see the list of your characters.
Expand Down

0 comments on commit 2a6ee3b

Please sign in to comment.