From 55f5cdac8ba57e199f306ff7d80142ba72507b54 Mon Sep 17 00:00:00 2001 From: intelligide Date: Fri, 5 Jun 2020 10:45:26 -0400 Subject: [PATCH] Update to OM 1.0.0 --- src/OpenMatch/OpenMatch.csproj | 8 +++---- src/OpenMatch/proto/api/backend.proto | 30 ++++++++++++++++++++------ src/OpenMatch/proto/api/frontend.proto | 4 +--- src/OpenMatch/proto/api/messages.proto | 22 ++++++++++--------- src/OpenMatch/proto/api/query.proto | 8 +++---- 5 files changed, 45 insertions(+), 27 deletions(-) diff --git a/src/OpenMatch/OpenMatch.csproj b/src/OpenMatch/OpenMatch.csproj index fdb2b69..ea82d87 100644 --- a/src/OpenMatch/OpenMatch.csproj +++ b/src/OpenMatch/OpenMatch.csproj @@ -4,7 +4,7 @@ netstandard2.1 OpenMatch.Api OpenMatch Api - 0.10.0 + 1.0.0 C# API for OpenMatch FrozenStorm Interactive License @@ -26,9 +26,9 @@ - - - + + + diff --git a/src/OpenMatch/proto/api/backend.proto b/src/OpenMatch/proto/api/backend.proto index d2d63a5..c2939f5 100644 --- a/src/OpenMatch/proto/api/backend.proto +++ b/src/OpenMatch/proto/api/backend.proto @@ -88,6 +88,10 @@ message ReleaseTicketsRequest{ message ReleaseTicketsResponse {} +message ReleaseAllTicketsRequest{} + +message ReleaseAllTicketsResponse {} + // AssignmentGroup contains an Assignment and the Tickets to which it should be applied. message AssignmentGroup{ // TicketIds is a list of strings representing Open Match generated Ids which apply to an Assignment. @@ -120,9 +124,11 @@ message AssignTicketsResponse { // The BackendService implements APIs to generate matches and handle ticket assignments. service BackendService { - // FetchMatches triggers a MatchFunction with the specified MatchProfile and returns a set of match proposals that - // match the description of that MatchProfile. - // FetchMatches immediately returns an error if it encounters any execution failures. + // FetchMatches triggers a MatchFunction with the specified MatchProfile and + // returns a set of matches generated by the Match Making Function, and + // accepted by the evaluator. + // Tickets in matches returned by FetchMatches are moved from active to + // pending, and will not be returned by query. rpc FetchMatches(FetchMatchesRequest) returns (stream FetchMatchesResponse) { option (google.api.http) = { post: "/v1/backendservice/matches:fetch" @@ -138,9 +144,8 @@ service BackendService { }; } - // ReleaseTickets removes the submitted tickets from the list that prevents tickets - // that are awaiting assignment from appearing in MMF queries, effectively putting them back into - // the matchmaking pool + // ReleaseTickets moves tickets from the pending state, to the active state. + // This enables them to be returned by query, and find different matches. // // BETA FEATURE WARNING: This call and the associated Request and Response // messages are not finalized and still subject to possible change or removal. @@ -150,4 +155,17 @@ service BackendService { body: "*" }; } + + // ReleaseAllTickets moves all tickets from the pending state, to the active + // state. This enables them to be returned by query, and find different + // matches. + // + // BETA FEATURE WARNING: This call and the associated Request and Response + // messages are not finalized and still subject to possible change or removal. + rpc ReleaseAllTickets(ReleaseAllTicketsRequest) returns (ReleaseAllTicketsResponse) { + option (google.api.http) = { + post: "/v1/backendservice/tickets:releaseall" + body: "*" + }; + } } diff --git a/src/OpenMatch/proto/api/frontend.proto b/src/OpenMatch/proto/api/frontend.proto index 0378549..756e4ed 100644 --- a/src/OpenMatch/proto/api/frontend.proto +++ b/src/OpenMatch/proto/api/frontend.proto @@ -95,9 +95,7 @@ service FrontendService { } // DeleteTicket immediately stops Open Match from using the Ticket for matchmaking and removes the Ticket from state storage. - // The client must delete the Ticket when finished matchmaking with it. - // - If SearchFields exist in a Ticket, DeleteTicket will deindex the fields lazily. - // Users may still be able to assign/get a ticket after calling DeleteTicket on it. + // The client should delete the Ticket when finished matchmaking with it. rpc DeleteTicket(DeleteTicketRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/frontendservice/tickets/{ticket_id}" diff --git a/src/OpenMatch/proto/api/messages.proto b/src/OpenMatch/proto/api/messages.proto index f17b1f8..adb17a4 100644 --- a/src/OpenMatch/proto/api/messages.proto +++ b/src/OpenMatch/proto/api/messages.proto @@ -21,16 +21,18 @@ import "google/rpc/status.proto"; import "google/protobuf/any.proto"; import "google/protobuf/timestamp.proto"; -// A Ticket is a basic matchmaking entity in Open Match. A Ticket represents either an -// individual 'Player' or a 'Group' of players. Open Match will not interpret -// what the Ticket represents but just treat it as a matchmaking unit with a set -// of SearchFields. Open Match stores the Ticket in state storage and enables an -// Assignment to be associated with this Ticket. +// A Ticket is a basic matchmaking entity in Open Match. A Ticket may represent +// an individual 'Player', a 'Group' of players, or any other concepts unique to +// your use case. Open Match will not interpret what the Ticket represents but +// just treat it as a matchmaking unit with a set of SearchFields. Open Match +// stores the Ticket in state storage and enables an Assignment to be set on the +// Ticket. message Ticket { // Id represents an auto-generated Id issued by Open Match. string id = 1; - // An Assignment represents a game server assignment associated with a Ticket. + // An Assignment represents a game server assignment associated with a Ticket, + // or whatever finalized matched state means for your use case. // Open Match does not require or inspect any fields on Assignment. Assignment assignment = 3; @@ -43,8 +45,8 @@ message Ticket { // Optional, depending on the requirements of the connected systems. map extensions = 5; - // Create time represents the time at which this Ticket was created. It is - // populated by Open Match at the time of Ticket creation. + // Create time is the time the Ticket was created. It is populated by Open + // Match at the time of Ticket creation. google.protobuf.Timestamp create_time = 6; // Deprecated fields. @@ -64,8 +66,8 @@ message SearchFields { repeated string tags = 3; } -// An Assignment represents a game server assignment associated with a Ticket. Open -// match does not require or inspect any fields on assignment. +// An Assignment represents a game server assignment associated with a Ticket. +// Open Match does not require or inspect any fields on assignment. message Assignment { // Connection information for this Assignment. string connection = 1; diff --git a/src/OpenMatch/proto/api/query.proto b/src/OpenMatch/proto/api/query.proto index 6b042cf..dbb3c39 100644 --- a/src/OpenMatch/proto/api/query.proto +++ b/src/OpenMatch/proto/api/query.proto @@ -79,8 +79,8 @@ message QueryTicketIdsResponse { service QueryService { // QueryTickets gets a list of Tickets that match all Filters of the input Pool. // - If the Pool contains no Filters, QueryTickets will return all Tickets in the state storage. - // QueryTickets pages the Tickets by `storage.pool.size` and stream back responses. - // - storage.pool.size is default to 1000 if not set, and has a mininum of 10 and maximum of 10000. + // QueryTickets pages the Tickets by `queryPageSize` and stream back responses. + // - queryPageSize is default to 1000 if not set, and has a mininum of 10 and maximum of 10000. rpc QueryTickets(QueryTicketsRequest) returns (stream QueryTicketsResponse) { option (google.api.http) = { post: "/v1/queryservice/tickets:query" @@ -90,8 +90,8 @@ service QueryService { // QueryTicketIds gets the list of TicketIDs that meet all the filtering criteria requested by the pool. // - If the Pool contains no Filters, QueryTicketIds will return all TicketIDs in the state storage. - // QueryTicketIds pages the TicketIDs by `storage.pool.size` and stream back responses. - // - storage.pool.size is default to 1000 if not set, and has a mininum of 10 and maximum of 10000. + // QueryTicketIds pages the TicketIDs by `queryPageSize` and stream back responses. + // - queryPageSize is default to 1000 if not set, and has a mininum of 10 and maximum of 10000. rpc QueryTicketIds(QueryTicketIdsRequest) returns (stream QueryTicketIdsResponse) { option (google.api.http) = { post: "/v1/queryservice/ticketids:query"