Hive2Hive / Android

Android application for Hive2Hive
MIT License
17 stars 7 forks source link

where is h2h deployment's data store path? #4

Open call518 opened 8 years ago

call518 commented 8 years ago

i am testing h2h... i ran "org.hive2hive.android.deployment" with java -jar, then i had connected on mobile client and upload a photo file. i have tested, deleting on my phone, and re-downloading the photo. that is success, but when i stop "org.hive2hive.android.deployment", then all data is reset. can i persistent sync/uploaded data? additional questens is, where is sync/uploaded data, and i can config replication factor?

nicoruti commented 7 years ago

Sorry for the late reply, I somehow missed this issue.

but when i stop "org.hive2hive.android.deployment", then all data is reset. can i persistent sync/uploaded data?

Unfortunately, this is still an open issue in the underlying TomP2P framework. There are storage variants providing persistency even when the peer is down. However, there are lots of difficulties because of replication / getting out of sync. Easiest is to ensure that always some peers are running. Sorry for not giving you a more positive answer.

where is sync/uploaded data, and i can config replication factor?

The data is splitted and distributed to many other nodes. The replication factor is currently set to 5 here. By now, this factor cannot be configured dynamically, as it's required that every node uses the same factor. Nevertheless, if you clone Hive2Hive and build the app yourself, you can change the constant in the code.