有没有办法在设备之间同步数据而不保存在服务器上? [关闭]

I want to make my own music player website and app and I want to make it so whenever I add a new song anywhere it will update on the other platform.

How can I do this without actually saving all the songs on a server? I can use a server to pass the data through for syncing but I wanna do it without saving because my host limits my data.

Here's what I thought about but I'm not sure: Maybe every hour or so both types of clients would connect to the server and share differences (although this would be hard if I add new songs both on the website and on the app). Or I could have a manual sync button and just use it on both the phone and the app to sync. Are my ideas practical? And if not is this even possible?

(I can only use PHP with my host and I will use accounts i.e. username and password for the syncing)

So your desired result is for all clients to be synchronized.

If I had to implement this, I would implement behavior on all my clients that would ask for updates on startup, and push changes on exit. Then on my server, I would create an API that can handle these requests, using a database to store the metadata of these changes (i.e. location of an audio file rather than the entire file). For each change sent to the server, I would keep a datetime for when it was sent, enabling you to incrementally build a change package when a new client asks for updates.

A client will accept an update (probably a json formatted string containing all the information about downloaded music, currently playing music, etc), after which it will handle the update, meaning it will download the corresponding files or play a certain audio file from a certain point.

Note that this does not allow you to start a certain song on the one client, and seeing it start on the other client as well. If you want to achieve this, you need to push notifications to the server from the client where you perform a certain action, and use the server to notify other clients of this action through websockets.