What Unity services to store and retrieve files from server?

In a nutshell, my question is:
With which unity services can I save files and have a little script on the server which is:

  • taking criteria from the client
  • chosing and returning files according to passed criteria

A bit more detailed:

  • Clients produce little files (serialized classes,10kB) and send them to server, where they get stored (thousands of them)
  • Clients send requests with criteria (criteria concern the file name only).
  • Server returns 3 random files matching the passed criteria.

Easiest for me would be a C# script running on the server taking the criteria as arguments and returning 3 files.
I could also immagine some kind of database query.

I would like to avoid using firebase, but cannot fathom how CloudCode / CloudSave / CCD work together or which I should use for that.

Can anybody give me a hint, or recommend a tutorial or a cloud code demo project??

Is writing your own server app in C# and running it on a rented virtual machine an option for you?
You could use AWS, and then use protocol of your choice - even HTTP - to communicate with it.
I would make sure though, that your clients are somehow validated by the server, so random users cannot just upload random files there. If you plan to distribute your game through steam, then you can pass a steam generated token (from thje steam client app) to the server and let it talk to Steam servers to make sure that the player owns the game, for example.
Really depends on what custom scripts you want to run on the server, how scalable do you need it to be, etc. So you either use some existing cloud based service, or build your own.
I’ve tried doing the above thing with steam and it worked nicely. But I am in no way a server architecture expert, and I don’t know how it would behave under some DOS attack scenarios. So make sure you reject any unauthorized clients and that you limit the storage per client to some sane levels.

Hi @Pflosch,

From your description it sounds like you could use Cloud Code in combination with Cloud Save to retrieve the serialized classes. Integrate with other Unity services

Cloud Save can be setup to use an index if you wish to query your dataset with criteria. Cloud Save Queries
Unity SDK tutorial

However its unclear from your description whether your use case would fall foul of the Cloud Save limits Cloud Save Player Data as you’ve mentioned producing 1000’s of 10kb values but its not clear if thats across a player base or just a single client?

Thanks @Pangamini
I wanted to avoid using services outside of unity as much as possible including writing own server. The effort seems too big.

Is there no way to do this within the “Unity cloud infrastructure”?
I mean… “CloudCode” and “CloudSave” very much sounds like one could somehow save things and have a script running there, I just don’t see how to implement that :confused:

So far the only thing I could figure is to save and retrieve Dictionaries<string,object> on Cloudsave. But this obviously doesn’t cut the mustard here.

Anybody? I’'m really completely lost here…