Uploaded image for project: 'Sample Applications'
  1. Sample Applications
  2. APP-227

Basic level Apps: Data collection: Review and update bundle scenario flow

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: Sample app: common
    • Labels:
      None

      Description

      Scenario description

      This application bundle will demonstrate the capability to collect records (logs) that periodically delivered from a sensor. Note that as the "Your first Kaa application" we chose Data collection demo, so it is basically the same application and they will have same demonstration flow.

      In this demo application, we gather temperature measurements from some "virtual" temperature sensor with a sampling rate that defined in a configuration.
      So we use two Kaa features: Log collection and Configuration. We will have two schemas:

      Logging schema

      {
        "type" : "record",
        "name" : "DataCollection",
        "namespace" : "org.kaaproject.kaa.schema.sample",
        "fields" : [ {
          "name" : "temperature",
          "type" : "int"
        } ],
        "displayName" : "org.kaaproject.kaa.schema.sample.DataCollection"
      }
      

      And configuration schema

      {
        "type" : "record",
        "name" : "Configuration",
        "namespace" : "org.kaaproject.kaa.schema.sample",
        "fields" : [ {
          "name" : "samplePeriod",
          "type" : "int",
          "by_default" : 1
        } ],
        "displayName" : "org.kaaproject.kaa.schema.sample.Configuration"
      }
      

      Both logging and configuration schemes are simple schemas contains only one value - the result of measurements from a sensor and the configuration schema - sampling period respectively.

      The client applications will output the log messages with some sampling period into console (in case of iOS: display on the screen) and to the default log appender (provided by Kaa) that stores logs in MongoDB. The application will use trustful credentials service for simplicity. Neither EP profiling nor grouping will be used in the stock application. Rather, configuration from group "all" will be distributed by default. On startup the client application must output its Endpoint ID to the console (or screen - for iOS).

      The client application will be sending log records continuously until a user stops it with some period that will be defined using configuration. Default sampling period is 1 second.

      Scenario flow

      1. User runs the client application.
      2. The client application registers with the Sandbox and outputs the Endpoint ID.
      3. The client application outputs current configuration.
      4. The client application starts to generate and send log messages with period defined in latest received configuration (default or from group "All").
      5. The client application prints in console log record delivery information.
      6. User explores the collected a by querying the sandbox MongoDB instance.
      7. User navigates to the endpoint group "All" in "Admin console" and change configuration thus changes sampling period.
      8. The client application prints message that it's configuration has been changed and prints new sampling period.
      9. The client application generates new log records with a new period.
      10. User stops the application.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              krupet Peter Krutsiuk
              Reporter:
              cb-ayarinych Anatoly Yarinich
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 8h Original Estimate - 8h
                  8h
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 9h
                  9h

                    Git Integration