-
Notifications
You must be signed in to change notification settings - Fork 819
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new GameServer lifecycle diagrams for Reserved
Shows how the workflow can exist for 1st party/distributed matchmakers. Work on #660
- Loading branch information
1 parent
8c80b9b
commit 01846eb
Showing
7 changed files
with
107 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
@startuml | ||
participant Matchmaker | ||
participant Agones | ||
participant "Game Server\nProcess" as Binary | ||
participant "GameServer\nResource" as GameServer | ||
participant SDK | ||
box "Game Server Pod" | ||
participant Binary | ||
participant SDK | ||
end box | ||
|
||
== GameServer Start == | ||
|
||
Agones -> GameServer: GameServer created through\na <i>Fleet</i> configuration | ||
activate GameServer | ||
GameServer -> Binary: Agones creates a Pod with the\nconfigured Game Server Container | ||
activate Binary | ||
activate SDK | ||
Binary -> SDK: SDK.Health() | ||
note right | ||
<i>Health()</i> is a continuous | ||
ping that occurs under | ||
the configured threshold. | ||
end note | ||
GameServer <-- SDK: Maintains Healthy status | ||
|
||
== Match Maker Registration == | ||
group loop | ||
Binary -> SDK: SDK.Reserve(duration) | ||
GameServer <-- SDK: Set state to <i>Reserved</i> for duration | ||
note right | ||
<i>duration</i> should be longer | ||
than how long the matchmaker | ||
requires <i>Register()</i> to be | ||
available for, so it will not be | ||
scaled down | ||
end note | ||
Binary -> Matchmaker: Register() | ||
note right | ||
Register with the Matchmaker as | ||
available to host a game session | ||
end note | ||
note left | ||
match maker registration | ||
could occur on a timed loop | ||
to give each <i>GameServer</i> | ||
time to be scaled down | ||
while <i>Ready</i> if not allocated | ||
end note | ||
end | ||
|
||
|
||
== Matchmaker allocates GameServer == | ||
Matchmaker -> Binary: StartGameSession() | ||
Binary -> SDK: Allocate() | ||
note right | ||
Disables timer to reset <i>Reserved</i> state | ||
back to <i>Ready</i> | ||
end note | ||
SDK --> GameServer: Set state to <i>Allocated</i> | ||
|
||
== Players Finish Game == | ||
|
||
Binary -> GameServer: SDK.Shutdown() | ||
note left | ||
Once gameplay is complete, call | ||
<i>Shutdown()</i> to delete the | ||
<i>GameServer</i> resource and backing Pod. | ||
end note | ||
destroy Binary | ||
destroy SDK | ||
destroy GameServer | ||
|
||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.