Show / Hide Table of Contents

    Namespace Sensus.DataStores.Remote

    Classes

    AmazonS3RemoteDataStore

    The Amazon S3 Remote Data Store allows Sensus to upload data from the device to Amazon's Simple Storage Service (S3). The S3 service is a simple, non-relational storage system that is relatively cheap, easy to use, and robust.

    Prerequisites

    • Sign up for an account with Amazon Web Services, if you don't have one already. The Free Tier is sufficient.
    • Install the AWS Command Line Interface(CLI).
    • Download and unzip our AWS configuration scripts.
    • Run the following command to configure an S3 bucket for use within a Sensus Amazon S3 Remote Data Store, where NAME is an informative name (alphanumerics and dashes only) and REGION is the region in which your bucket will reside (e.g., us-east-1):
    ./configure-s3.sh NAME REGION
    
    • The previous command will create a bucket as well as an IAM group and user with write-only access to the bucket. If successful, the command will output something like the following:
    Done. Details:
    Sensus S3 bucket:  test-bucket-eee8ef46-5d6a-4508-b745-e6635d195a85
    Sensus S3 IAM account:  XXXX:XXXX
    
    • The bucket and IAM account produced on the final line should be kept confidential. Use these values as Bucket and IamAccountString, respectively.

    Downloading Data from Amazon S3

    Install the AWS Command Line Interface. Assuming you have created and populated an S3 bucket named BUCKET and a folder named FOLDER, you can download all of your Sensus data in a few different ways:

    1. You can use the functions (e.g., sensus.sync.from.aws.s3) in the SensusR package.
    2. You can execute the following command to download everything to a directory named data on your desktop:

      aws s3 cp --recursive s3://BUCKET/FOLDER ~/data
      
    3. You can use a third-party application like Bucket Explorer to browse and download data from Amazon S3.

    Deconfiguration

    If you are finished collecting data and you would like to prevent any future data submission, you can deconfigure the IAM group and user with the following command, where BUCKET corresponds to the Sensus S3 bucket name created above:

    ./deconfigure-s3.sh BUCKET
    

    The preceding command will not delete your bucket or data.

    ConsoleRemoteDataStore

    When using the ConsoleRemoteDataStore, all data accumulated in LocalDataStore are simply ignored. This is useful for debugging purposes and is not recommended for practical Sensus deployments since it provides no means of moving the data off of the device.

    RemoteDataStore

    A Remote Data Store periodically transfers data from the device's LocalDataStore to a remote storage system (e.g., Amazon's Simple Storage Service). The job of the Remote Data Store is to ensure that data accumulated locally on the device are safely transferred off of the device before their accumulated size grows too large or they are corrupted, deleted, lost, etc.

    Back to top Copyright © 2014-2018 University of Virginia
    Generated by DocFX