C
C#•2y ago
Steak

Matchmaking Connection

Hello, Im building a Matchmaking Server: built on ASP. NET WebAPI Im confused to choose between HTTP (REST) or TCP Client/Listener Client will start issue MM Ticket, then Keep Get MM Status each interval in order to keep ticket alive VS Client will establish Tcp Connection to Server, Server will return MM Status when needed
18 Replies
Kouhai
Kouhai•2y ago
It depends on how often you're gonna ping the server back for ticket's status, if it's too frequent, go with TCP as (websockets)
Yawnder
Yawnder•2y ago
I might be wrong, but I really don't think you want to keep an HTTP connection open for any long amount of time. I'm not sure it if would scale well, but I would personally go with SignalR if I had to do it.
Kouhai
Kouhai•2y ago
SignalR uses websockets in most modern browsers 😅
Yawnder
Yawnder•2y ago
It tries to, but it has fallbacks.
Kouhai
Kouhai•2y ago
True
Yawnder
Yawnder•2y ago
(And it's not browsers exclusive either.) It's used that way most of the time though. I've used it in a PoC for distributed cache expiration.
Kouhai
Kouhai•2y ago
I personally only used SignalR with web frontends 😅
Steak
Steak•2y ago
so I should just avoid REST HTTP ? btw, TcpListener can listen multiple clients right? are they bi-directional?
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Steak
Steak•2y ago
why HTTP tho.. they are based of interval calls & not realtime will bandwidth much an issue?
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Steak
Steak•2y ago
all great! thank you all of you 1 more question I have dedicated server Instance, I would have Dedicated Server Manager (WebAPI) should which protocol should I use to track on player left / join? from game server to WebAPI
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Steak
Steak•2y ago
good to know
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Steak
Steak•2y ago
yes or REST just fine? gRPC looking promising, just not familiar with protobuff can WebAPI also establish GRPC SERVER?
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Steak
Steak•2y ago
thanks 😀