Differences between C++ and C# AWS GameLift Server SDK

0

Hi!

I am working on porting AWS GameLift Server SDK to Rust. As a reference, I use the official AWS GameLift Server SDKs - C++ and C# version. As a 3rd party implementation, I also use Javascript implementation.

But I found one interesting difference between C++ and C# SDKs - how they connect to the AWS GameLift Server. C++ version creates 2 WebSocket connection (actually, it's a socket.io connection) on localhost:5757; C# version creates 1 WebSocket connection on localhost:5759 and sends HTTP requests to localhost:5758.

Honestly, I like the C# design here since the implementation of request-response pattern over WebSocket in C++ and JS SDKs is a little bit ugly (IMHO).

My question is: is it safe for me in my custom SDK use C# approach instead of C++? Because other custom implementation like JS uses only raw websockets without any HTTP. Who knows, maybe using HTTP is strictly restricted to the official SDK...

So if anyone has any information about that - please share :)

demandé il y a 3 ans347 vues
16 réponses
0

Hey zamazan4ik,

The idea behind the C# SDK update is that the socket.io library was creating a lot of issues for us (e.g. race condition), particularly in C#, so we have updated the C# architecture to get rid of socket.io, and while doing so, also updated it to use a lightweight and full-duplex protocol with open-source libraries in a large variety of languages (C#, C++, Java, JS being the required ones to support). Eventually, Websocket over HTTP was chosen due to the "variety of language' requirement; we have also considered using plain socket but eventually decided against it due to it not being available in open-source libraries of all aforementioned languages.

So, you can implement with either plain socket or websocket. There is no preference on the gamelift's side. Though, GameLift has only tested with websocket officially, so you could potentially have better support when going that route.

répondu il y a 3 ans
0

Thanks for the information! I will choose C# SDK approach for the Rust version of the SDK. HTTP + WebSocket is more preferrable for me than Socket.io (actually I don't like the idea of using Socket.io here). If you have any influence on AWS Docs team, will be awesome, if you put the information about the differences between SDKs somehwere in AWS GameLift Server SDKs documentation.

Thanks!

répondu il y a 3 ans
0

Btw, is there any additional form to post any feedback to the AWS GameLift team? E.g. about publishing officially Protobuf scheme as a part of the SDK? Now only unofficial reverse-engineered version is available and that's too inconvenient to use

répondu il y a 3 ans
0

Thanks, I have submitted a request to update the doc. Someone from GameLift will reply to this thread once the update is completed.

GLIFT-14761

répondu il y a 3 ans
0

We do have a backlog task to open source the SDK on Github, though I cannot guarantee when that would be. However, here is the protobuf scheme to unblock you: https://pastebin.com/CVzNKWkc

répondu il y a 3 ans
0

Thanks! Honestly few hours ago I just reverse-engineered the latest scheme: https://github.com/ZaMaZaN4iK/GameLift-Server-Protobuf :)

But thanks a lot! Would be awesome, if you be able to somehow to publish updated schema with every SDK release.

répondu il y a 3 ans
0

@REDACTEDUSER

répondu il y a 2 ans
0
répondu il y a 2 ans
0

Thanks! Exactly what I needed

répondu il y a 2 ans
0

Are you making a custom client SDK? :)

répondu il y a 2 ans
0

Yes, I was attempting to port to Java/Kotlin. Do you happen to know of an existing port? If not, will there be any issues with me publishing on github when I'm done?

répondu il y a 2 ans
0

@REDACTEDUSER

You can easily publish it to GitHub without any issues. Community already done some ports to other languages like JS, Go, Rust.

répondu il y a 2 ans
0

@REDACTEDUSER

répondu il y a 2 ans
0

Hi @REDACTEDUSER

répondu il y a 2 ans
0
répondu il y a 2 ans
0

Thank you. I am very interested in this.

répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions