Syncing the renter between computers


  • Global Moderator

    I would like to synchronize my renter, so to speak, between multiple computers. For instance, I would like to upload from one computer and then be able to view remaining blocks etc on another computer.

    For a starter, I assume there would be no issue sharing a wallet and that I could even have multiple instance of Sia running on multiple computers simultaneously without any issues. Correct?

    Second, I assume that files uploaded from one computer will not show up in the renter on another computer. Correct?

    So, it seems I would have still have to share the file with the second (observing) computer. Thus, there is no advantage to using the same wallet, except not having to move funds about.

    Are there any better methods for synchronizing two, or more computers, so that their renters see the same files?


  • admins

    For a starter, I assume there would be no issue sharing a wallet and that I could even have multiple instance of Sia running on multiple computers simultaneously without any issues. Correct?

    Nearly. You'll get some address reuse, which is undesirable. I was recently told about some HD-wallet software that was created for Bitcoin which might solve this problem for Sia (it's written in go, because it was written for btcd). I'll be looking into all of that next time I visit the wallet code (which will be soon-ish, but not 0.5.0)

    Second, I assume that files uploaded from one computer will not show up in the renter on another computer. Correct?

    Yep, won't happen.

    Are there any better methods for synchronizing two, or more computers, so that their renters see the same files?

    Maybe. At that point you are talking about setting up a shared database between the two of them. I have some interesting ideas, but nothing that I'd be implementing soon. A not-yet-analyzed solution:

    1. Store the database on Sia.
    2. Store a pointer to the database on hosts. This is a trusted thing, b/c you aren't adding the pointer to the blockchain. The pointer will need to be updated each time the database updates because that's how authentication in Sia works.
    3. Use signatures to authenticate the pointer. Now you know that the pointer is at least something you've auth'd, but it might not be the most recent pointer.
    4. Put the pointer on a bunch of hosts, and pay the set of hosts that tell you about the most recent pointer. Now you only need 1 of them to be honest.

    That should do it, and all you need to kick-start stuff is a password. I guess I'm still leaving a few details out, but I think you could achieve stateless file storage this way. (Similar to how you only need a password to use NXT, you can put the password into any computer running NXT and access all of your stuff). (NXT I believe cheats though, there's massive address reuse and very little privacy - though I think Sia will be able to accomplish both)



  • This would be essential in the long term, in my opinion, for people to just be able to use Sia as a "cloud service".

    Meanwhile, I may suggest (I haven't tried it) using Syncthing to keep the renter directory synchronized among different machines. The caveat I can immediately think of is that you really shouldn't be changing the renter directories at almost the same time on more than one machine, because Syncthing doesn't handle conflicts automatically.



  • rsync could achieve the same. Once it becomes an issue I assume the developers will address this issue as well, or a clever user will post a working solution for us to use :-)



  • rsync would only achieve the same in a much more manual manner, especially if more than two machines are involved.


  • admins

    We definitely have plans to facilitate syncing a sia folder across multiple computers. But I'm not sure what the timeline is on that, we are still working on other things.



  • I WANT so badly to be able to sync folders across the internet. Do you have plans maybe to sync in real time working/active folders? So if it gets edited it changes all copies nearly instantly? Without having to download the file everytime? Like auto update? I know that concept might be a few years out, but kinda what I want. In the meantime love I can rent out my extra storage for extra money. I forsee a future where we don't have to buy the phone with the most amount of overpriced storage on the planet, we can rent extra storage for our phones with Sia! Only pay for what you use! Sounds very promising.



  • I would be interested to hear exactly what the Nebulous team has in mind.

    I think a multi-device sync feature could already be built with the Sia API and a centralized service.

    One way to think of it would be that different devices can 'subscribe' to each other. Each device has an account with the provider, connects to the provider regularly and uploads a copy of all the .sia files in its renter. Ideally, the .sia files are encrypted when uploaded to the provider (in case the provider's database is hacked etc you don't want people's files all over the place). The .sia files can only be decrypted by subscribing devices that possess an appropriate passphrase. Subscriptions are again handled by the provider, and the provider broadcasts to the subscribers what files are new / changed to the subscribers.

    This is a very rough sketch but something that can today be implemented in a Sia UI plugin.

    The question is whether it is worth anyone's effort to create such a plugin if Nebulous already has future plans for multi-device synchronization (i.e. not a good business idea).



  • Excuse me but... what's the point? Syncthing basically does what you describe (let several device "subscribe to each other" and receive broadcasts that files are new/changed), except without any pesky centralized service, but in an almost fully peer-to-peer fashion (there is a central "discovery" service, I'd rather a DHT but they don't have that for now).
    It is, of course, open source and everything, so I'm not sure why I would reinvent the wheel.

    The thing above and beyond this that I would like to eventually see is being able to connect to Sia (without any centralized service) and access my files by simply using a passphrase, which could generate some kind of key on the fly.


Log in to reply