RESTful server or UE4 server for Account/Ranked/purchases etc

Hello,

I am wondering which is the best option to setup a classic clients-server architecture to manage the account, sessions, purchase, XP, Ranked points, Level, customisation and friends list like fortnite, dota 2 or Starcraft.
For now I went with a RESTful server, I can create an account, login, get a session ID and save what needs to be saved server-side.

This is fine but I wonder if this is the best way to achieve an ingame friend list, save all information regarding XP, ranked points, matches stats or customisation because it needs to go through an in-game server.
Should I connect automatically the player to a “main menu” UE4 Server, make this server discuss with the RESTful server to get data ?
Should I throw away the REST server and do everything through the UE4 server (with the database behind it etc) ?
Is there another better option ?

I could write my own C++ server and handle everything by hand but there has to be a quicker thing to do.

rXp

I would keep it all like you already have it: RESTful/Web/PHP server. It is definitely more lightweight solution and easy to scale. UE4 server seems much heavier solution and you still need the same communication with DB. Also, how many simultaneous clients are you going to connect to UE4 server? You might need multiple server instances to handle all the clients/traffic. While on the web server you can easily handle almost unlimited clients, since it is all quick request/response messages.

Yeah but I would need to implement socket to make a friend list and invites etc…
If I want interaction between players in the main menu, I need a socket and a connection.
Should I switch to a full costume C++ server ? Socket etc

I see you point.

Are you going to make your own list of friends or somehow get it from “fortnite, dota 2 or Starcraft”?

For interaction - if you need instant notifications, then yes, you will need to have a listening server with open socket, and have like TCP or UDP connection. The server part could be quickly done in C#, the client part, here is a great wiki - A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums,Receive_Binary_Data_From_an_IP/Port_Into_UE4,%28Full_Code_Sample%29

Obviously, it is all can be done using just Unreal that can handle connected players. The question is will you be able to connect all the players at once? If yes, then you basically already have the client-server solution and it can be better than custom server solution. The only thing to keep in mind would be that for most changes on a client side, you will need to redeploy the server as well, otherwise Unreal will complain that server and client have different versions and your clients will not be able to connect. While with a custom solution it is not a problem at all, as long as communication messages remain the same.

But quite honest, since you want interaction, probably be quick out of the door, and more likely you do not really expect hundreds of thousands users connected to your server(s) (you would probably be a big company at that point), Unreal server might work the best for you.

I went for a full custom c++ server I implemented everything from socket with openssl to json serialization and compression with zlib to be fully compatible with UE4.