0

I'm working with an academic project that's trying to optimize energy efficiency for homeowners by collecting sensor data in smart homes. The problem is that they have to upload their sensor data from a network of heterogeneous patchwork-quilt machines (some Windows laptops, some Linux servers, some Raspberry Pis, etc.).

The solution needs to have the following properties:

  • Sync to/from S3. We've already got some data on S3, but we don't really care about the provider as long as it's cheap and low-failure backing storage that looks like a directory.

  • One-way, per-file sync. It should be able to upload changes for only a specific file, rather than for an entire directory. It should also be able to push changes.

  • Delta writes. The files will be large and we don't want to re-upload them in full each time -- only the changes.

  • Stores metadata separately. We need to be able to read the files on the remote end as they are on the local end; if the files are wrapped in some kind of envelope/container that will make it harder to consume them.

  • Command-line interface. It needs to be scriptable because we'll be driving the synchronization process with an external script.

  • Cross-platform. It should work on Windows 7+ and Ubuntu.

  • Minimal external dependencies. Ideally, "installation" would consist of dropping a folder somewhere or downloading a package.

Options I've looked at and had to reject:

  • Write directly using s3fs: Doesn't support delta writes; re-uploads entire file for any change. Ouch!

  • rsync + s3rsync.com: Prohibitively expensive, since our rsync streams will be uploading lots of data, all the time. Also, site is defunct ("copyright 2010"), lots of bad reviews.

  • Duplicity: Doesn't support writing raw file content -- every file is wrapped in metadata that only Duplicity understands.

  • Syncany: Doesn't support one-way, single-file sync.

3
  • I have no idea how complicated installation on windows is, but have you thought about git, or any other distributed revision control system? Writing batch files which setup the paths correctly should make a drop-a-folder-installation possible. Feb 3, 2014 at 13:58
  • I hadn't thought about a DVCS, but I'm not sure that would work well. The sensor logs are huge, on the order of gigabytes generated per day. Git's use case, for instance, is really for source code, not storage of large files. I imagine most VCSs are similar -- you don't want to store huge, frequently updated files in there. (On the plus side, installation is definitely pretty easy on Windows.) Feb 3, 2014 at 14:01
  • Well, it at least supports patch transfer, which would give what you need. You just need to prevent it from packing, which is a quite expensive operation (both CPU- and Memory-wise) for large files. You could squash the history after some days if you want to save storage. You just need to do that synchronously in some way, but it should be possible with git. However, in general, to keep the load reasonable, logrotating the files so that there is one file per day would help a lot already. Feb 3, 2014 at 14:28

0

You must log in to answer this question.

Browse other questions tagged .