Hi Gunnar,  A Virtual Sensor is a Fey performer that can be configured via a 
Fey orchestration to mimic different types of sensors. You can configure it to 
be a numeric “environmental” sensor like temperature, humidity or air pressure. 
It can also be configured to be a sound, sight, or vibration sensor. I will add 
more information in the README.md file for the performer. This also relates to 
another question that was raised a few days ago about the resources folder for 
the virtual sensor performer folder (src/main/resources). The resources folder 
contains samples of the types of sounds or images that a virtual sensor would 
produce if it is configured to be an image or sound sensor. Going back to your 
question this virtual sensor is self contained and doesn’t need to go out to 
any other source to act as a sensor. When you create the instance of the 
virtual sensor in a fey orchestration you would specify the type of the sensor 
(environmental, wav, vib ), You would also specify the frequency with which the 
virtual sensor should operate. E.g. An environmental sensor called temperature 
producing a value for temperature every 10 seconds. Any performer getting input 
from this performer would get a temperature every 5 seconds. You can also 
specify ways in which the señor can behave differently at different times of 
the day. Perhaps overnight the temperature varies between 45 and 55 F, the 
morning hours 55 to 65 F, the afternoon 65 to 70F etc.

If someone was interested in improving this basic virtual sensor performer it 
would be a great way of contributing to the project. Just a thought for anyone 
that would like to do that.

You could also write augment the performer by adding restful call capabilities 
in which it would as you suggest go out to “things” on the internet to pull 
them in. I described this as a restful performer in a previous post. Think of 
it as Postman in a performer. Your suggestion would add restful capabilities to 
the virtual sensor performer.

I hope this helps.

Example orchestration using the VirtualSensor performer used in a fey 
orchestration - I made this up in the hope that it helps you and others connect 
the dots…

-Tony

{
  "guid": “DEMO",
  "command": "RECREATE",
  "timestamp": "2319028301283018",
  "name": "Keeps all performers under the same ensemble so the activeMQ 
performer can be reused",
  "ensembles": [
    {
      "guid": "SENSORS-PIPELINE",
      "command": "NONE",
      "performers": [
        {
          "guid": "AIR-PRESSURE",
          "schedule": 10000,
          "backoff": 0,
          "source": {
            "name": "fey-virtual-sensor.jar",
            "classPath": "org.apache.iota.fey.performer.VirtualSensor",
            "parameters": {
              "sensor_type": "environmental",
              "name": "air_pressure",
              "lrn": "78a1bc991a26416992d376a7e27401ee",
              "exceptions": "[ 
{\"start_time\":[9,28,30],\"end_time\":[9,29,0],\"expected_value\":900}, 
{\"start_time\":[11,0,0],\"end_time\":[11,21,3],\"expected_value\":99.0} ]"
            }
          }
        },
        {
          "guid": "HUMIDITY",
          "schedule": 10000,
          "backoff": 0,
          "source": {
            "name": "fey-virtual-sensor.jar",
            "classPath": "org.apache.iota.fey.performer.VirtualSensor",
            "parameters": {
              "sensor_type": "environmental",
              "name": "humidity",
              "lrn": "7d6f770d4f24418eb664298d31d3085a",
              "exceptions": "[ 
{\"start_time\":[9,28,30],\"end_time\":[9,29,0],\"expected_value\":900}, 
{\"start_time\":[11,0,0],\"end_time\":[11,21,3],\"expected_value\":99.0} ]"
            }
          }
        },
        {
          "guid": "SOUND-DB",
          "schedule": 10000,
          "backoff": 0,
          "source": {
            "name": "fey-virtual-sensor.jar",
            "classPath": "org.apache.iota.fey.performer.VirtualSensor",
            "parameters": {
              "sensor_type": "environmental",
              "name": "sound_db",
              "lrn": "7c1eccfa54db438684488f020c5c4911",
              "exceptions": "[ 
{\"start_time\":[9,28,30],\"end_time\":[9,29,0],\"expected_value\":900}, 
{\"start_time\":[11,0,0],\"end_time\":[11,21,3],\"expected_value\":99.0} ]"
            }
          }
        },
        {
          "guid": "SOUND-WAV",
          "schedule": 60000,
          "backoff": 0,
          "source": {
            "name": "fey-virtual-sensor.jar",
            "classPath": "org.apache.iota.fey.performer.VirtualSensor",
            "parameters": {
              "sensor_type": "wav",
              "name": "sound_db",
              "lrn": "7c5b34a026e34277801149d5a1365321",
              "exceptions": "[ 
{\"start_time\":[9,28,30],\"end_time\":[9,29,0],\"expected_value\":900}, 
{\"start_time\":[11,0,0],\"end_time\":[11,21,3],\"expected_value\":99.0} ]"
            }
          }
        },
        {
          "guid": "TEMPERATURE",
          "schedule": 10000,
          "backoff": 0,
          "source": {
            "name": "fey-virtual-sensor.jar",
            "classPath": "org.apache.iota.fey.performer.VirtualSensor",
            "parameters": {
              "sensor_type": "environmental",
              "name": "temperature",
              "lrn": "76b3ebdbaeeb4ebb8c8cdc7ab8c29449",
              "exceptions": "[ 
{\"start_time\":[9,28,30],\"end_time\":[9,29,0],\"expected_value\":900}, 
{\"start_time\":[11,0,0],\"end_time\":[11,21,3],\"expected_value\":99.0} ]"
            }
          }
        },
        {
          "guid": "VIBRATION-STREAM",
          "schedule": 30000,
          "backoff": 0,
          "source": {
            "name": "fey-virtual-sensor.jar",
            "classPath": "org.apache.iota.fey.performer.VirtualSensor",
            "parameters": {
              "sensor_type": "vibration",
              "name": "vibration",
              "lrn": "774350123d5043f29972a9148089ecc7",
              "exceptions": "[ 
{\"start_time\":[9,28,30],\"end_time\":[9,29,0],\"expected_value\":900}, 
{\"start_time\":[11,0,0],\"end_time\":[11,21,3],\"expected_value\":99.0} ]"
            }
          }
        },
        {
          "guid": "VIBRATION-STRENGTH",
          "schedule": 10000,
          "backoff": 0,
          "source": {
            "name": "fey-virtual-sensor.jar",
            "classPath": "org.apache.iota.fey.performer.VirtualSensor",
            "parameters": {
              "sensor_type": "environmental",
              "name": "vibration_strength",
              "lrn": "7d7191323eb7456eb1f8f7c4983746b6",
              "exceptions": "[ 
{\"start_time\":[9,28,30],\"end_time\":[9,29,0],\"expected_value\":900}, 
{\"start_time\":[11,0,0],\"end_time\":[11,21,3],\"expected_value\":99.0} ]"
            }
          }
        },
        {
          "guid": “ACTIVEMQ-PUBLISHER",
          "schedule": 0,
          "backoff": 0,
          "source": {
            "name": “fey-activemq.jar",
            "classPath": "org.apache.iota.fey.performer.activeMQ",
            "parameters": {
              "_port": "31883",
              "port": "1883",
              "_target": "54.200.218.146",
              "target": "localhost",
              "topic": “demo/data/viv7",
              "user": “demo",
              "password": “FROM_ENV_VARIABLE",
              "max_in_flight": "10000"
            }
          }
        }
      ],
      "connections": [
        {
          "AIR-PRESSURE": [
            “ACTIVEMQ-PUBLISHER"
          ]
        },
        {
          "SOUND-DB": [
            "ACTIVEMQ-PUBLISHER"
          ]
        },
        {
          "SOUND-WAV": [
            "ACTIVEMQ-PUBLISHER"
          ]
        },
        {
          "HUMIDITY": [
            "ACTIVEMQ-PUBLISHER"
          ]
        },
        {
          "VIBRATION-STREAM": [
            "ACTIVEMQ-PUBLISHER"
          ]
        },
        {
          "VIBRATION-STRENGTH": [
            "ACTIVEMQ-PUBLISHER"
          ]
        },
        {
          "TEMPERATURE": [
            "ACTIVEMQ-PUBLISHER"
          ]
        }
      ]
    }
  ]


> On Feb 10, 2017, at 10:13 PM, Gunnar Tapper <[email protected]> wrote:
> 
> Hi,
> 
> I'm trying to match the code with what's being said on 
> http://iota.incubator.apache.org/features.html 
> <http://iota.incubator.apache.org/features.html>
> 
> I'm not clear where I find; for example, docker and spark parts?
> 
> What's your advise for someone who wants to contribute? It seems like a good 
> idea to read up on akka but then what?
> 
> I'm setting up my project to use eclipse. Is that the IDE of choice or is 
> there something more appropriate?
> 
> 
> -- 
> Thanks,
> 
> Gunnar
> If you think you can you can, if you think you can't you're right.

Reply via email to