You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/content/en/docs/Guides/Backfill/_index.md
+14-17Lines changed: 14 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -19,34 +19,31 @@ Some scenarios that could happen when playing multiplayer games include:
19
19
20
20
A Match Function example using Backfill can be found [here](https://github.com/googleforgames/open-match/blob/master/examples/functions/golang/backfill/mmf/matchfunction.go).
21
21
22
-
1. Player creates Ticket (`T1`).
22
+
1. Player 1 creates a Ticket (`T1`).
23
23
2. Director calls `Backend.FetchMatches` with a MatchProfile.
24
24
3. MMF runs `QueryBackfills` and `QueryTickets` using the MatchProfile. It returns `T1`.
25
-
4. MMF use `T1`, constructs a new Backfill (`B1`*) and returns a `Match` containing ticket `T1` and Backfill `B1`.
26
-
5. Director starts allocating GameServer with Backfill `B1` information.
27
-
6.Another player creates a Ticket (`T2`).
25
+
4. MMF constructs a new Backfill (`B1`) and returns a `Match` containing ticket `T1` and Backfill `B1`. The Backfill should be created with field `AllocateGameServer` set to `true`, so the game server orchestrator (e.g.: [Agones](https://agones.dev/site/)) knows it has to create a new Game Server. The Director handles making calls to create the Game Server.
26
+
5. Director starts allocating a Game Server with Backfill `B1` information.
27
+
6.Player 2 creates a Ticket (`T2`).
28
28
7. Director calls `Backend.FetchMatches`.
29
29
8. MMF runs `QueryBackfills` and `QueryTickets` using the MatchProfile. They return `B1` and `T2` accordingly.
30
-
9. MMF determines `B1` could be used because it has open slots available. `T2` and `B1` forms a new Match.
31
-
10. When GameServer allocating ends, it starts polling Open Match to acknowledge the backfill with `Frontend.AcknowledgeBackfill` by ID received in the Match (`B1.ID`) and in order to assign the address of the GameServer for `T1` and `T2`.
32
-
33
-
*: The Backfill should be created with field `AllocateGameServer` set to `true`, so GameServer orchestrator (e.g.: [Agones](https://agones.dev/site/)) knows it has to create a new GameServer.
30
+
9. MMF determines `B1` could be used based on data set on `B1` by the last run of the MMF (e.g. a number of open slots). `T2` and `B1` form a new Match.
31
+
10. When the Game Server has started, it begins polling Open Match to acknowledge the backfill with `Frontend.AcknowledgeBackfill` using the backfill's ID (`B1.ID`) and supplies connection information for the server, to be returned as the `Assignment` data of the tickets `T1` and `T2`. The Game Server also receives the ticket data of the tickets that were assigned so that any data supplied on the ticket (e.g. player IDs) may be used by the game server.
34
32
35
33
## Considerations
36
34
37
-
In order to use Backfill you need to customize your MMF and your Game Servers. BackfillId should be propagated to each Game Server during Game Server allocation. Which would be used later in `AcknowledgeBackfill` requests to define Backfill which is tied to this Game Server.
38
-
If Backfill is not being used, no changes are required since the Backfill API doesn't change
39
-
the behavior of the current Open Match API state.
35
+
In order to use Backfill you need to customize your MMF and your Game Servers. Backfill IDs should be propagated to each Game Server during Game Server allocation to be used in `AcknowledgeBackfill` requests to define Backfill which is tied to the Game Server.
36
+
37
+
If Backfill is not being used, no changes are required since the Backfill API doesn't change the behavior of the current Open Match API state.
40
38
41
39
### Acknowledging Backfills
42
40
43
-
AcknowledgeBackfill is a request, that acts as a periodic ping, made to Open Match Frontend to set the assignment on the tickets associated with this backfill.
44
-
GameServer receives current Backfill status as a response.
41
+
`AcknowledgeBackfill` is a request made to the Open Match Frontend that serves to notify Open Match that server still interested in the backfill, and to confirm the assignment of the tickets associated with this backfill in the same manner as `Backend.AssignTickets`. The Game Server receives the current Backfill status as well as a list of new tickets that were just acknowledged by the request as a response. The list is not idempotent, but can be appended to prior lists received from `AcknowledgeBackfill`.
45
42
46
-
GameServers would run `AcknowledgeBackfill`every N seconds, where N is, at most, `backfillTTL`represents 80% of pendingReleaseTimeout and this value MUST always be bigger than N (backfillTTL = 0.8 * pendingReleaseTimeout; N < backfillTTL, where N is AcknowledgeBackfill interval)
43
+
GameServers must run `AcknowledgeBackfill`within `backfillTTL` seconds after the Backfill is created and within `backfillTTL` of the last `AcknowledgeBackfill` call after that, where `backfillTTL` is 80% of the pendingReleaseTimeout configuration value.
47
44
48
-
### Cleaning up Backfills
45
+
**Note:** You must keep acknowledging a backfill until it is no longer needed, and if it expires the Backfill object must be recreated and the new ID communicated to the Game Server to begin the `AcknowledgeBackfill` process anew.
49
46
50
-
This process deletes expired Backfill objects from the state store. Backifll becomes expired if it is not acknowledged in `backfillTTL` period.
47
+
### Cleaning up Backfills
51
48
52
-
Note: you need to keep acknowledging a backfill and if it expires you need to recreate the Backfill object again.
49
+
This process deletes expired Backfill objects from the state store. Backfills become expired if they are not acknowledged in the `backfillTTL` period.
BETA FEATURE WARNING: This Request message is not finalized and still subject
420
+
to possible change or removal.
421
+
422
+
423
+
| Field | Type | Label | Description |
424
+
| ----- | ---- | ----- | ----------- |
425
+
| backfill |[Backfill](#openmatch.Backfill)|| The Backfill that was acknowledged. |
426
+
| tickets |[Ticket](#openmatch.Ticket)| repeated | All of the Tickets that were successfully assigned |
427
+
428
+
429
+
430
+
431
+
432
+
415
433
<aname="openmatch.CreateBackfillRequest"></a>
416
434
417
435
### CreateBackfillRequest
@@ -570,7 +588,7 @@ The FrontendService implements APIs to manage and query status of a Tickets.
570
588
| DeleteTicket |[DeleteTicketRequest](#openmatch.DeleteTicketRequest)|[.google.protobuf.Empty](#google.protobuf.Empty)| DeleteTicket immediately stops Open Match from using the Ticket for matchmaking and removes the Ticket from state storage. The client should delete the Ticket when finished matchmaking with it. |
571
589
| GetTicket |[GetTicketRequest](#openmatch.GetTicketRequest)|[Ticket](#openmatch.Ticket)| GetTicket get the Ticket associated with the specified TicketId. |
572
590
| WatchAssignments |[WatchAssignmentsRequest](#openmatch.WatchAssignmentsRequest)|[WatchAssignmentsResponse](#openmatch.WatchAssignmentsResponse) stream | WatchAssignments stream back Assignment of the specified TicketId if it is updated. - If the Assignment is not updated, GetAssignment will retry using the configured backoff strategy. |
573
-
| AcknowledgeBackfill |[AcknowledgeBackfillRequest](#openmatch.AcknowledgeBackfillRequest)|[Backfill](#openmatch.Backfill)| AcknowledgeBackfill is used to notify OpenMatch about GameServer connection info This triggers an assignment process. BETA FEATURE WARNING: This call and the associated Request and Response messages are not finalized and still subject to possible change or removal. |
591
+
| AcknowledgeBackfill |[AcknowledgeBackfillRequest](#openmatch.AcknowledgeBackfillRequest)|[AcknowledgeBackfillResponse](#openmatch.AcknowledgeBackfillResponse)| AcknowledgeBackfill is used to notify OpenMatch about GameServer connection info This triggers an assignment process. BETA FEATURE WARNING: This call and the associated Request and Response messages are not finalized and still subject to possible change or removal. |
574
592
| CreateBackfill |[CreateBackfillRequest](#openmatch.CreateBackfillRequest)|[Backfill](#openmatch.Backfill)| CreateBackfill creates a new Backfill object. BETA FEATURE WARNING: This call and the associated Request and Response messages are not finalized and still subject to possible change or removal. |
575
593
| DeleteBackfill |[DeleteBackfillRequest](#openmatch.DeleteBackfillRequest)|[.google.protobuf.Empty](#google.protobuf.Empty)| DeleteBackfill receives a backfill ID and deletes its resource. Any tickets waiting for this backfill will be returned to the active pool, no longer pending. BETA FEATURE WARNING: This call and the associated Request and Response messages are not finalized and still subject to possible change or removal. |
576
594
| GetBackfill |[GetBackfillRequest](#openmatch.GetBackfillRequest)|[Backfill](#openmatch.Backfill)| GetBackfill returns a backfill object by its ID. BETA FEATURE WARNING: This call and the associated Request and Response messages are not finalized and still subject to possible change or removal. |
0 commit comments