How to use SNS or SQS on Unreal with FlexMatch

0

We have currently working matchmaking done with flexmatch and we are using describematchmaking to get the status of the matchmaking ticket. I have been trying to get my head around on how to get this working with event notifications as the documentation suggests but I can't quite get it. There doesn't seem to be any easy way to subscribe into an SNS topic from c++ application directly? And even if there was isn't it quite bad to get every single message on all of the clients that have subscribed to that topic? Can lambdas be used to somehow send messages to clients? If I have understood correctly sending the SNS message to the SQS queue is one way to handle this, but there doesn't seem to be any way to subscribe into the SQS queue and the client would have to poll the messages from the queue, isn't this as bad as polling describematchmaking?

질문됨 4년 전238회 조회
1개 답변
0

You don't want your clients polling directly on the SQS/SNS queue because 99.8% of the messages are not for the client; it will end up wasting a lot of resources.

Ideally you have some game service(s) that mediates your client -> GameLift interactions. Its this that should be listening to the SNS events. Clients could query, through the service, for their matching results or be notified when theres something of interest:

Some examples of this can be found in: https://www.gamasutra.com/view/news/316444/Sponsored_Designing_architecture_to_support_crossplatform_play.php

https://aws.amazon.com/blogs/gametech/fitting-the-pattern-serverless-custom-matchmaking-with-amazon-gamelift/

(I'm trying to find a more recent example that I think is clearer but for some reason my search skills are failing me today. If I find it I will post it.)

There some useful information in this other forum post: https://forums.awsgametech.com/t/flexmatch-making-sns-notification-for-pc-console-game/6850/3

I know the GameLift team is aware that:

  • Documentation needs an update to describe how best to use the SNS topic and patterns for consumption
  • There is this gap wrt to how clients getting notifications at high # number of requests per second without requiring a lot of development effort.

For local testing you can call DescribeMatchmaking directly on your clients, but at high volume you may start hitting throttling limits as per the documentation.

답변함 4년 전
profile picture
전문가
검토됨 8일 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠