Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Major] Refactor the server to a REST api which saves "post" data into buckets and re-loads the same data with "get" #109

Open
dbirman opened this issue Sep 10, 2023 · 1 comment
Assignees
Labels
feature New feature or request
Milestone

Comments

@dbirman
Copy link
Member

dbirman commented Sep 10, 2023

We'll just use JSON queries to represent all the data. To prevent resources from getting overwhelmingly large we'll host the binary blob data separately (as .bytes files) and just reference these from JSON request, so the client then has to download them itself.

Posting data will be restricted by a token, and people will have to pay for their tokens, presumably by some combination of data size and amount of access? For now we'll just leave it unrestricted.

On the Unity side, when you load a bucket it will request the JSON for that bucket and then parse it to reconstruct the scene. One issue is how to "ping" the client to update the scene when the user posts something new to the bucket? Maybe we timestamp the last update and we poll continuously?

@dbirman dbirman added the feature New feature or request label Sep 10, 2023
@dbirman dbirman added this to the v0.5.x milestone Sep 10, 2023
@dbirman dbirman self-assigned this Sep 10, 2023
@dbirman dbirman modified the milestones: v0.5.x, v1.0.x Oct 28, 2023
@dbirman
Copy link
Member Author

dbirman commented Feb 28, 2024

New plan: API talks to proxy, proxy talks to Unity, Unity talks to server. So Unity can independently load a scene from the server, but you can also control the scene from the API. A "Save" message triggers Unity to override what's on the server, and control messages can be used to send back and forth token data and to set the name of the current scene. Seems pretty straightforward?

As far as how data is stored, binary data should probably still be blobbed as bytes files. This should be done on the REST API itself probably so that Unity just sees the standard JSON data itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant