You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iota.apache.org by to...@apache.org on 2016/07/09 22:44:44 UTC
[5/5] incubator-iota git commit: Refactored the source code to enable
easier development in IDEs like Intellij and PyCharm (Free community
editions). Also added a new performer 'virtual_sensor'
Refactored the source code to enable easier development in IDEs like Intellij and PyCharm (Free community editions). Also added a new performer 'virtual_sensor'
Project: http://git-wip-us.apache.org/repos/asf/incubator-iota/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-iota/commit/b459b227
Tree: http://git-wip-us.apache.org/repos/asf/incubator-iota/tree/b459b227
Diff: http://git-wip-us.apache.org/repos/asf/incubator-iota/diff/b459b227
Branch: refs/heads/master
Commit: b459b227c751202c51ae968464fccb0ff3745056
Parents: c381fc4
Author: tonyfaustini <to...@yahoo.com>
Authored: Sat Jul 9 15:43:51 2016 -0700
Committer: tonyfaustini <to...@yahoo.com>
Committed: Sat Jul 9 15:43:51 2016 -0700
----------------------------------------------------------------------
.gitignore | 2 +-
.../fey/FeyConfiguration/feyConfiguration | 4 +-
Performers/fey/FeyJSONRepo/raspberryPi.json | 368 -------------------
Performers/fey/FeyJSONRepo/test.json | 26 --
Performers/project/Build.scala | 57 ---
Performers/project/BuildSettings.scala | 55 ---
Performers/project/Dependencies.scala | 29 --
Performers/project/build.properties | 1 -
Performers/project/plugins.sbt | 5 -
fey-core/project/Build.scala | 109 ------
fey-core/project/build.properties | 17 -
fey-core/project/plugins.sbt | 22 --
performers/fey/FeyJSONRepo/timestamp.json | 27 ++
performers/fey/JSONSamples/raspberryPi.json | 368 +++++++++++++++++++
performers/fey/JSONSamples/temperature.json | 28 ++
.../src/main/resources/background_noise | 1 +
.../virtual_sensor/src/main/resources/door_slam | 1 +
.../virtual_sensor/src/main/resources/sound | 1 +
.../virtual_sensor/src/main/resources/vibration | 1 +
.../apache/iota/fey/performer/Application.scala | 23 ++
.../org/apache/iota/fey/performer/Sensor.scala | 172 +++++++++
project/Build.scala | 74 ++++
project/BuildSettings.scala | 93 +++++
project/Dependencies.scala | 44 +++
project/build.properties | 1 +
project/plugins.sbt | 6 +
26 files changed, 843 insertions(+), 692 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/b459b227/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index ca0cfbb..12348da 100644
--- a/.gitignore
+++ b/.gitignore
@@ -87,4 +87,4 @@ metastore_db/
nohup*.out
#generated jars
-Performers/fey/FeyJARRepo/*.jar
+performers/fey/FeyJARRepo/*.jar
http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/b459b227/Performers/fey/FeyConfiguration/feyConfiguration
----------------------------------------------------------------------
diff --git a/Performers/fey/FeyConfiguration/feyConfiguration b/Performers/fey/FeyConfiguration/feyConfiguration
index ca23bc8..4e2b650 100644
--- a/Performers/fey/FeyConfiguration/feyConfiguration
+++ b/Performers/fey/FeyConfiguration/feyConfiguration
@@ -1,5 +1,5 @@
fey-global-configuration{
- json-repository = "/Users/<username>/Performers/fey/FeyJSONRepo"
- jar-repository = "/Users/<username>/Performers/fey/FeyJARRepo"
+ json-repository = "/Users/tonyfaustini19/IntelliJProjects/apache-incubator-iota/performers/fey/FeyJSONRepo"
+ jar-repository = "/Users/tonyfaustini19/IntelliJProjects/apache-incubator-iota/performers/fey/FeyJARRepo"
enable-checkpoint=false
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/b459b227/Performers/fey/FeyJSONRepo/raspberryPi.json
----------------------------------------------------------------------
diff --git a/Performers/fey/FeyJSONRepo/raspberryPi.json b/Performers/fey/FeyJSONRepo/raspberryPi.json
deleted file mode 100644
index d1df8ed..0000000
--- a/Performers/fey/FeyJSONRepo/raspberryPi.json
+++ /dev/null
@@ -1,368 +0,0 @@
-{
- "guid": "RaspberryPi",
- "command": "CREATE",
- "timestamp": "1467731017",
- "name": "RaspberryPi",
- "ensembles": [
- {
- "guid": "TEMPERATURE",
- "command": "NONE",
- "performers": [
- {
- "guid": "Heartbeat",
- "schedule": 30000,
- "backoff": 0,
- "source": {
- "name": "fey_stream.jar",
- "classPath": "org.apache.iota.fey.performer.Heartbeat",
- "parameters": {
- }
- }
- },
- {
- "guid": "Cherry",
- "schedule": 1000,
- "backoff": 0,
- "source": {
- "name": "fey_cherry_rp.jar",
- "classPath": "org.apache.iota.fey.performer.CherryRP",
- "parameters": {
- "cherry": "{\"op\":\"cov\", \"args\":[{\"string\":\"1ed6aed2b028486fa478b3d3f6e7ee61\"}, {\"float\":0.5} ]}",
- "lrns": "[\"1ed6aed2b028486fa478b3d3f6e7ee61\"]",
- "host": "192.168.0.17"
- }
- }
- },
- {
- "guid": "ZMQPublisher",
- "schedule": 0,
- "backoff": 0,
- "source": {
- "name": "fey_zmq.jar",
- "classPath": "org.apache.iota.fey.performer.ZMQPublisher",
- "parameters": {
- "zmq_port": "5559",
- "zmq_target": "192.168.0.139"
- }
- }
- }
- ],
- "connections": [
- {
- "Heartbeat": [
- "Cherry"
- ]
- },
- {
- "Cherry": [
- "ZMQPublisher"
- ]
- }
- ]
- },
- {
- "guid": "PRESSURE",
- "command": "NONE",
- "performers": [
- {
- "guid": "Heartbeat",
- "schedule": 10000,
- "backoff": 0,
- "source": {
- "name": "fey_stream.jar",
- "classPath": "org.apache.iota.fey.performer.Heartbeat",
- "parameters": {
- }
- }
- },
- {
- "guid": "Cherry",
- "schedule": 1000,
- "backoff": 0,
- "source": {
- "name": "fey_cherry_rp.jar",
- "classPath": "org.apache.iota.fey.performer.CherryRP",
- "parameters": {
- "cherry": "{\"op\":\"cov\", \"args\":[{\"string\":\"3fd7aed2b028486fa478b3d3f6e7ee61\"}, {\"float\":0.1} ]}",
- "lrns": "[\"3fd7aed2b028486fa478b3d3f6e7ee61\"]",
- "host": "192.168.0.17"
- }
- }
- },
- {
- "guid": "ZMQPublisher",
- "schedule": 0,
- "backoff": 0,
- "source": {
- "name": "fey_zmq.jar",
- "classPath": "org.apache.iota.fey.performer.ZMQPublisher",
- "parameters": {
- "zmq_port": "5559",
- "zmq_target": "192.168.0.139"
- }
- }
- }
- ],
- "connections": [
- {
- "Heartbeat": [
- "Cherry"
- ]
- },
- {
- "Cherry": [
- "ZMQPublisher"
- ]
- }
- ]
- },
- {
- "guid": "HUMIDITY",
- "command": "NONE",
- "performers": [
- {
- "guid": "Heartbeat",
- "schedule": 30000,
- "backoff": 0,
- "source": {
- "name": "fey_stream.jar",
- "classPath": "org.apache.iota.fey.performer.Heartbeat",
- "parameters": {
- }
- }
- },
- {
- "guid": "Cherry",
- "schedule": 1000,
- "backoff": 0,
- "source": {
- "name": "fey_cherry_rp.jar",
- "classPath": "org.apache.iota.fey.performer.CherryRP",
- "parameters": {
- "cherry": "{\"op\":\"cov\", \"args\":[{\"string\":\"2fd6aed2b028486fa478b3d3f6e7ee61\"}, {\"float\":5.0} ]}",
- "lrns": "[\"2fd6aed2b028486fa478b3d3f6e7ee61\"]",
- "host": "192.168.0.17"
- }
- }
- },
- {
- "guid": "ZMQPublisher",
- "schedule": 0,
- "backoff": 0,
- "source": {
- "name": "fey_zmq.jar",
- "classPath": "org.apache.iota.fey.performer.ZMQPublisher",
- "parameters": {
- "zmq_port": "5559",
- "zmq_target": "192.168.0.139"
- }
- }
- }
- ],
- "connections": [
- {
- "Heartbeat": [
- "Cherry"
- ]
- },
- {
- "Cherry": [
- "ZMQPublisher"
- ]
- }
- ]
- },
- {
- "guid": "SOUNDDB",
- "command": "NONE",
- "performers": [
- {
- "guid": "Heartbeat",
- "schedule": 10000,
- "backoff": 0,
- "source": {
- "name": "fey_stream.jar",
- "classPath": "org.apache.iota.fey.performer.Heartbeat",
- "parameters": {
- }
- }
- },
- {
- "guid": "Cherry",
- "schedule": 1000,
- "backoff": 0,
- "source": {
- "name": "fey_cherry_rp.jar",
- "classPath": "org.apache.iota.fey.performer.CherryRP",
- "parameters": {
- "cherry": "{\"op\":\"cov\", \"args\":[{\"string\":\"7fd6aed2b028486fa478b3d3f6e7ee61\"}, {\"float\":3.0} ]}",
- "lrns": "[\"7fd6aed2b028486fa478b3d3f6e7ee61\"]",
- "host": "192.168.0.17"
- }
- }
- },
- {
- "guid": "ZMQPublisher",
- "schedule": 0,
- "backoff": 0,
- "source": {
- "name": "fey_zmq.jar",
- "classPath": "org.apache.iota.fey.performer.ZMQPublisher",
- "parameters": {
- "zmq_port": "5559",
- "zmq_target": "192.168.0.139"
- }
- }
- }
- ],
- "connections": [
- {
- "Heartbeat": [
- "Cherry"
- ]
- },
- {
- "Cherry": [
- "ZMQPublisher"
- ]
- }
- ]
- },
- {
- "guid": "VIBRATION_AGGREGATE",
- "command": "NONE",
- "performers": [
- {
- "guid": "Heartbeat",
- "schedule": 10000,
- "backoff": 0,
- "source": {
- "name": "fey_stream.jar",
- "classPath": "org.apache.iota.fey.performer.Heartbeat",
- "parameters": {
- }
- }
- },
- {
- "guid": "Cherry",
- "schedule": 1000,
- "backoff": 0,
- "source": {
- "name": "fey_cherry_rp.jar",
- "classPath": "org.apache.iota.fey.performer.CherryRP",
- "parameters": {
- "cherry": "{\"op\":\"cov\", \"args\":[{\"string\":\"5fd6aed2b028486fa478b3d3f6e7ee61\"}, {\"float\":0.02} ]}",
- "lrns": "[\"5fd6aed2b028486fa478b3d3f6e7ee61\"]",
- "host": "192.168.0.17"
- }
- }
- },
- {
- "guid": "ZMQPublisher",
- "schedule": 0,
- "backoff": 0,
- "source": {
- "name": "fey_zmq.jar",
- "classPath": "org.apache.iota.fey.performer.ZMQPublisher",
- "parameters": {
- "zmq_port": "5559",
- "zmq_target": "192.168.0.139"
- }
- }
- }
- ],
- "connections": [
- {
- "Heartbeat": [
- "Cherry"
- ]
- },
- {
- "Cherry": [
- "ZMQPublisher"
- ]
- }
- ]
- },
- {
- "guid": "VIBRATION",
- "command": "NONE",
- "performers": [
- {
- "guid": "VibrationStream",
- "schedule": 1000,
- "backoff": 0,
- "source": {
- "name": "fey_cherry_rp.jar",
- "classPath": "org.apache.iota.fey.performer.CherryRP",
- "parameters": {
- "cherry": "{\"didVibrationChange\":\"6fd6aed2b028486fa478b3d3f6e7ee61\"}",
- "lrns": "[\"6fd6aed2b028486fa478b3d3f6e7ee61\"]",
- "host": "192.168.0.17"
- }
- }
- },
- {
- "guid": "ZMQPublisher",
- "schedule": 0,
- "backoff": 0,
- "source": {
- "name": "fey_zmq.jar",
- "classPath": "org.apache.iota.fey.performer.ZMQPublisher",
- "parameters": {
- "zmq_port": "5559",
- "zmq_target": "192.168.0.139"
- }
- }
- }
- ],
- "connections": [
- {
- "VibrationStream": [
- "ZMQPublisher"
- ]
- }
- ]
- },
- {
- "guid": "SOUND_WAV",
- "command": "NONE",
- "performers": [
- {
- "guid": "Cherry",
- "schedule": 3000,
- "backoff": 0,
- "source": {
- "name": "fey_cherry_rp.jar",
- "classPath": "org.apache.iota.fey.performer.CherryRP",
- "parameters": {
- "cherry": "{\"didSoundChange\":\"9fd6aed2b028486fa478b3d3f6e7ee61\"}",
- "lrns": "[\"9fd6aed2b028486fa478b3d3f6e7ee61\"]",
- "host": "192.168.0.17"
- }
- }
- },
- {
- "guid": "ZMQPublisher",
- "schedule": 0,
- "backoff": 0,
- "source": {
- "name": "fey_zmq.jar",
- "classPath": "org.apache.iota.fey.performer.ZMQPublisher",
- "parameters": {
- "zmq_port": "5559",
- "zmq_target": "192.168.0.139"
- }
- }
- }
- ],
- "connections": [
- {
- "Cherry": [
- "ZMQPublisher"
- ]
- }
- ]
- }
- ]
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/b459b227/Performers/fey/FeyJSONRepo/test.json
----------------------------------------------------------------------
diff --git a/Performers/fey/FeyJSONRepo/test.json b/Performers/fey/FeyJSONRepo/test.json
deleted file mode 100644
index d6d148e..0000000
--- a/Performers/fey/FeyJSONRepo/test.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "guid": "SimpleOrchestration",
- "command": "CREATE",
- "timestamp": "1467731017",
- "name": "SimpleOrchestration",
- "ensembles": [
- {
- "guid": "SimpleEnsemble",
- "command": "NONE",
- "performers": [
- {
- "guid": "SimplePerformer",
- "schedule": 1000,
- "backoff": 0,
- "source": {
- "name": "fey_stream.jar",
- "classPath": "org.apache.iota.fey.performer.Timestamp",
- "parameters": {}
- }
- }
- ],
- "connections": [
- ]
- }
- ]
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/b459b227/Performers/project/Build.scala
----------------------------------------------------------------------
diff --git a/Performers/project/Build.scala b/Performers/project/Build.scala
deleted file mode 100644
index d326900..0000000
--- a/Performers/project/Build.scala
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * (C) Copyright Litbit 2016
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import sbt._
-import sbt.Keys._
-
-object ModuleDependencies {
-
- import Dependencies._
-
- val StreamDependencies = provided(akka_actor, fey)
- val ZMQDependecies = provided(akka_actor, fey) ++ compile(zmq)
-}
-
-object PerformersBuild extends Build {
-
- import BuildSettings._
-
- lazy val parent = Project(
- id = "jars_parent",
- base = file("."),
- aggregate = Seq(Stream, ZMQ),
- settings = rootbuildSettings ++ Seq(
- aggregate in update := false
- )
- )
-
- lazy val stream = Project(
- id = "fey_stream",
- base = file("./stream"),
- settings = BasicSettings ++ StreambuildSettings ++ Seq(
- libraryDependencies ++= ModuleDependencies.StreamDependencies
-
- ))
-
- lazy val zmq = Project(
- id = "fey_zmq",
- base = file("./zmq"),
- settings = BasicSettings ++ ZMQbuildSettings ++ Seq(
- libraryDependencies ++= ModuleDependencies.ZMQDependecies
- ))
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/b459b227/Performers/project/BuildSettings.scala
----------------------------------------------------------------------
diff --git a/Performers/project/BuildSettings.scala b/Performers/project/BuildSettings.scala
deleted file mode 100644
index c9560bd..0000000
--- a/Performers/project/BuildSettings.scala
+++ /dev/null
@@ -1,55 +0,0 @@
-import sbt.{Defaults, Watched}
-import sbt.Keys._
-
-object BuildSettings {
-
- import Dependencies.Resolvers._
-
- val ParentProject = "jars_parent"
- val Stream = "fey_stream"
- val ZMQ = "fey_zmq"
-
-
- val Version = "1.0"
- val ScalaVersion = "2.11.8"
-
- lazy val rootbuildSettings = Defaults.coreDefaultSettings ++ Seq(
- name := ParentProject,
- version := Version,
- scalaVersion := ScalaVersion,
- organization := "org.apache.iota",
- description := "Fey External Jars Project",
- scalacOptions := Seq("-deprecation", "-unchecked", "-encoding", "utf8", "-Xlint")
- )
-
- lazy val BasicSettings = Seq(
- organization := "org.apache.iota",
- maxErrors := 5,
- ivyScala := ivyScala.value map {
- _.copy(overrideScalaVersion = true)
- },
- triggeredMessage := Watched.clearWhenTriggered,
- resolvers := allResolvers,
- fork := true,
- connectInput in run := true
- )
-
- lazy val StreambuildSettings = Defaults.coreDefaultSettings ++ Seq(
- name := Stream,
- version := Version,
- scalaVersion := ScalaVersion,
- description := "Simple Stream Application",
- scalacOptions := Seq("-deprecation", "-unchecked", "-encoding", "utf8", "-Xlint"),
- mainClass := Some("org.apache.iota.fey.performer.Application")
- )
-
- lazy val ZMQbuildSettings = Defaults.coreDefaultSettings ++ Seq(
- name := ZMQ,
- version := Version,
- scalaVersion := ScalaVersion,
- description := "ZMQ Application",
- scalacOptions := Seq("-deprecation", "-unchecked", "-encoding", "utf8", "-Xlint"),
- mainClass := Some("org.apache.iota.fey.performer.Application")
- )
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/b459b227/Performers/project/Dependencies.scala
----------------------------------------------------------------------
diff --git a/Performers/project/Dependencies.scala b/Performers/project/Dependencies.scala
deleted file mode 100644
index 7149662..0000000
--- a/Performers/project/Dependencies.scala
+++ /dev/null
@@ -1,29 +0,0 @@
-import sbt._
-
-object Dependencies {
-
- object Resolvers {
- val typesafe = "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
- val sonatype = "Sonatype Release" at "https://oss.sonatype.org/content/repositories/releases"
- val mvnrepository = "MVN Repo" at "http://mvnrepository.com/artifact"
- val litbitBitbucket = "Litbit Repo" at "https://s3-us-west-2.amazonaws.com/maven.litbit.com/snapshots"
- val emuller = "emueller-bintray" at "http://dl.bintray.com/emueller/maven"
-
- val allResolvers = Seq(typesafe, sonatype, mvnrepository, emuller, litbitBitbucket)
-
- }
-
- def compile(deps: ModuleID*): Seq[ModuleID] = deps map (_ % "compile")
-
- def provided(deps: ModuleID*): Seq[ModuleID] = deps map (_ % "provided")
-
- def test(deps: ModuleID*): Seq[ModuleID] = deps map (_ % "test")
-
- def runtime(deps: ModuleID*): Seq[ModuleID] = deps map (_ % "runtime")
-
- def container(deps: ModuleID*): Seq[ModuleID] = deps map (_ % "container")
-
- val akka_actor = "com.typesafe.akka" %% "akka-actor" % "2.4.2"
- val fey = "org.apache.iota" %% "fey-core" % "1.0-SNAPSHOT"
- val zmq = "org.zeromq" % "jeromq" % "0.3.5"
-}
http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/b459b227/Performers/project/build.properties
----------------------------------------------------------------------
diff --git a/Performers/project/build.properties b/Performers/project/build.properties
deleted file mode 100644
index 9ad7e84..0000000
--- a/Performers/project/build.properties
+++ /dev/null
@@ -1 +0,0 @@
-sbt.version=0.13.8
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/b459b227/Performers/project/plugins.sbt
----------------------------------------------------------------------
diff --git a/Performers/project/plugins.sbt b/Performers/project/plugins.sbt
deleted file mode 100644
index 2fa2a46..0000000
--- a/Performers/project/plugins.sbt
+++ /dev/null
@@ -1,5 +0,0 @@
-logLevel := Level.Warn
-
-addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.13.0")
-addSbtPlugin("io.spray" % "sbt-revolver" % "0.7.2")
-addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.8.0")
http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/b459b227/fey-core/project/Build.scala
----------------------------------------------------------------------
diff --git a/fey-core/project/Build.scala b/fey-core/project/Build.scala
deleted file mode 100644
index 75503b0..0000000
--- a/fey-core/project/Build.scala
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import sbt._
-import sbt.Keys._
-import sbtassembly.AssemblyPlugin.autoImport._
-
-object Settings {
-
- lazy val iota_connectors = Defaults.coreDefaultSettings ++ Seq(
- name := "FEY-CORE",
- version := "1.0-SNAPSHOT",
- scalaVersion := "2.11.8",
- organization := "org.apache.iota",
- description := "Framework of the event processing / actions engine for IOTA",
- scalacOptions := Seq("-deprecation", "-unchecked", "-encoding", "utf8", "-Xlint")
- )
-
-}
-
-object Resolvers {
-
- val typesafe = "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
- val sonatype = "Sonatype Release" at "https://oss.sonatype.org/content/repositories/releases"
- val mvnrepository = "MVN Repo" at "http://mvnrepository.com/artifact"
- val emuller = "emueller-bintray" at "http://dl.bintray.com/emueller/maven"
-
- val allResolvers = Seq(typesafe, sonatype, mvnrepository, emuller)
-
-}
-
-object Dependency {
-
- val akka_actor = "com.typesafe.akka" %% "akka-actor" % "2.4.2"
- val typesafe_config = "com.typesafe" % "config" % "1.3.0"
-
- val playJson = "com.typesafe.play" %% "play-json" % "2.5.3"
- val jsonValidator = "com.eclipsesource" %% "play-json-schema-validator" % "0.7.0"
-
- //Logger
- val slf4j = "com.typesafe.akka" %% "akka-slf4j" % "2.4.2"
- val log4jbind = "ch.qos.logback" % "logback-classic" % "1.1.7"
- val javaFilter = "janino" % "janino" % "2.5.10"
-
- //restapi
- val sprayCan = "io.spray" %% "spray-can" % "1.3.3"
- val sprayRouting = "io.spray" %% "spray-routing" % "1.3.3"
-
-}
-
-object Dependencies {
- import Dependency._
-
- val iota_dep_conn = Seq(akka_actor,typesafe_config,playJson,slf4j,log4jbind,sprayCan,sprayRouting,jsonValidator,javaFilter)
-}
-
-object IotaBuild extends Build{
- import Resolvers._
- import Dependencies._
- import Settings._
-
- lazy val iota = Project(
- id = "iota-fey-core",
- base = file("."),
- settings = iota_connectors ++ Seq(
- maxErrors := 5,
- ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) },
- triggeredMessage := Watched.clearWhenTriggered,
- resolvers := allResolvers,
- libraryDependencies ++= iota_dep_conn,
- mainClass := Some("org.apache.iota.fey.Application"),
- fork := true,
- connectInput in run := true,
- assemblyJarName in assembly := "iota-fey-core.jar",
- publishTo := {
- val nexus = "s3://maven.litbit.com/"
- if (isSnapshot.value)
- Some("snapshots" at nexus + "snapshots")
- else
- Some("releases" at nexus + "releases")
- },
- publishMavenStyle := true,
- conflictManager := ConflictManager.all,
- assemblyMergeStrategy in assembly := {
- case PathList("org", "slf4j", xs @ _*) => MergeStrategy.last
- case x =>
- val oldStrategy = (assemblyMergeStrategy in assembly).value
- oldStrategy(x)
- }
- )
- )
-}
-
-
-
http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/b459b227/fey-core/project/build.properties
----------------------------------------------------------------------
diff --git a/fey-core/project/build.properties b/fey-core/project/build.properties
deleted file mode 100644
index a3c5bf0..0000000
--- a/fey-core/project/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-sbt.version = 0.13.11
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/b459b227/fey-core/project/plugins.sbt
----------------------------------------------------------------------
diff --git a/fey-core/project/plugins.sbt b/fey-core/project/plugins.sbt
deleted file mode 100644
index 82fae02..0000000
--- a/fey-core/project/plugins.sbt
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-logLevel := Level.Warn
-
-addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.13.0")
-addSbtPlugin("io.spray" % "sbt-revolver" % "0.7.2")
-addSbtPlugin("com.frugalmechanic" % "fm-sbt-s3-resolver" % "0.9.0")
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/b459b227/performers/fey/FeyJSONRepo/timestamp.json
----------------------------------------------------------------------
diff --git a/performers/fey/FeyJSONRepo/timestamp.json b/performers/fey/FeyJSONRepo/timestamp.json
new file mode 100644
index 0000000..a51cbfa
--- /dev/null
+++ b/performers/fey/FeyJSONRepo/timestamp.json
@@ -0,0 +1,27 @@
+{
+ "guid": "Orch2",
+ "command": "CREATE",
+ "timestamp": "591997890",
+ "name": "DESCRIPTION",
+ "ensembles": [
+ {
+ "guid": "En2",
+ "command": "NONE",
+ "performers": [
+ {
+ "guid": "S2",
+ "schedule": 1000,
+ "backoff": 0,
+ "source": {
+ "name": "fey_stream.jar",
+ "classPath": "org.apache.iota.fey.performer.Timestamp",
+ "parameters": {
+ }
+ }
+ }
+ ],
+ "connections": [
+ ]
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/b459b227/performers/fey/JSONSamples/raspberryPi.json
----------------------------------------------------------------------
diff --git a/performers/fey/JSONSamples/raspberryPi.json b/performers/fey/JSONSamples/raspberryPi.json
new file mode 100644
index 0000000..d1df8ed
--- /dev/null
+++ b/performers/fey/JSONSamples/raspberryPi.json
@@ -0,0 +1,368 @@
+{
+ "guid": "RaspberryPi",
+ "command": "CREATE",
+ "timestamp": "1467731017",
+ "name": "RaspberryPi",
+ "ensembles": [
+ {
+ "guid": "TEMPERATURE",
+ "command": "NONE",
+ "performers": [
+ {
+ "guid": "Heartbeat",
+ "schedule": 30000,
+ "backoff": 0,
+ "source": {
+ "name": "fey_stream.jar",
+ "classPath": "org.apache.iota.fey.performer.Heartbeat",
+ "parameters": {
+ }
+ }
+ },
+ {
+ "guid": "Cherry",
+ "schedule": 1000,
+ "backoff": 0,
+ "source": {
+ "name": "fey_cherry_rp.jar",
+ "classPath": "org.apache.iota.fey.performer.CherryRP",
+ "parameters": {
+ "cherry": "{\"op\":\"cov\", \"args\":[{\"string\":\"1ed6aed2b028486fa478b3d3f6e7ee61\"}, {\"float\":0.5} ]}",
+ "lrns": "[\"1ed6aed2b028486fa478b3d3f6e7ee61\"]",
+ "host": "192.168.0.17"
+ }
+ }
+ },
+ {
+ "guid": "ZMQPublisher",
+ "schedule": 0,
+ "backoff": 0,
+ "source": {
+ "name": "fey_zmq.jar",
+ "classPath": "org.apache.iota.fey.performer.ZMQPublisher",
+ "parameters": {
+ "zmq_port": "5559",
+ "zmq_target": "192.168.0.139"
+ }
+ }
+ }
+ ],
+ "connections": [
+ {
+ "Heartbeat": [
+ "Cherry"
+ ]
+ },
+ {
+ "Cherry": [
+ "ZMQPublisher"
+ ]
+ }
+ ]
+ },
+ {
+ "guid": "PRESSURE",
+ "command": "NONE",
+ "performers": [
+ {
+ "guid": "Heartbeat",
+ "schedule": 10000,
+ "backoff": 0,
+ "source": {
+ "name": "fey_stream.jar",
+ "classPath": "org.apache.iota.fey.performer.Heartbeat",
+ "parameters": {
+ }
+ }
+ },
+ {
+ "guid": "Cherry",
+ "schedule": 1000,
+ "backoff": 0,
+ "source": {
+ "name": "fey_cherry_rp.jar",
+ "classPath": "org.apache.iota.fey.performer.CherryRP",
+ "parameters": {
+ "cherry": "{\"op\":\"cov\", \"args\":[{\"string\":\"3fd7aed2b028486fa478b3d3f6e7ee61\"}, {\"float\":0.1} ]}",
+ "lrns": "[\"3fd7aed2b028486fa478b3d3f6e7ee61\"]",
+ "host": "192.168.0.17"
+ }
+ }
+ },
+ {
+ "guid": "ZMQPublisher",
+ "schedule": 0,
+ "backoff": 0,
+ "source": {
+ "name": "fey_zmq.jar",
+ "classPath": "org.apache.iota.fey.performer.ZMQPublisher",
+ "parameters": {
+ "zmq_port": "5559",
+ "zmq_target": "192.168.0.139"
+ }
+ }
+ }
+ ],
+ "connections": [
+ {
+ "Heartbeat": [
+ "Cherry"
+ ]
+ },
+ {
+ "Cherry": [
+ "ZMQPublisher"
+ ]
+ }
+ ]
+ },
+ {
+ "guid": "HUMIDITY",
+ "command": "NONE",
+ "performers": [
+ {
+ "guid": "Heartbeat",
+ "schedule": 30000,
+ "backoff": 0,
+ "source": {
+ "name": "fey_stream.jar",
+ "classPath": "org.apache.iota.fey.performer.Heartbeat",
+ "parameters": {
+ }
+ }
+ },
+ {
+ "guid": "Cherry",
+ "schedule": 1000,
+ "backoff": 0,
+ "source": {
+ "name": "fey_cherry_rp.jar",
+ "classPath": "org.apache.iota.fey.performer.CherryRP",
+ "parameters": {
+ "cherry": "{\"op\":\"cov\", \"args\":[{\"string\":\"2fd6aed2b028486fa478b3d3f6e7ee61\"}, {\"float\":5.0} ]}",
+ "lrns": "[\"2fd6aed2b028486fa478b3d3f6e7ee61\"]",
+ "host": "192.168.0.17"
+ }
+ }
+ },
+ {
+ "guid": "ZMQPublisher",
+ "schedule": 0,
+ "backoff": 0,
+ "source": {
+ "name": "fey_zmq.jar",
+ "classPath": "org.apache.iota.fey.performer.ZMQPublisher",
+ "parameters": {
+ "zmq_port": "5559",
+ "zmq_target": "192.168.0.139"
+ }
+ }
+ }
+ ],
+ "connections": [
+ {
+ "Heartbeat": [
+ "Cherry"
+ ]
+ },
+ {
+ "Cherry": [
+ "ZMQPublisher"
+ ]
+ }
+ ]
+ },
+ {
+ "guid": "SOUNDDB",
+ "command": "NONE",
+ "performers": [
+ {
+ "guid": "Heartbeat",
+ "schedule": 10000,
+ "backoff": 0,
+ "source": {
+ "name": "fey_stream.jar",
+ "classPath": "org.apache.iota.fey.performer.Heartbeat",
+ "parameters": {
+ }
+ }
+ },
+ {
+ "guid": "Cherry",
+ "schedule": 1000,
+ "backoff": 0,
+ "source": {
+ "name": "fey_cherry_rp.jar",
+ "classPath": "org.apache.iota.fey.performer.CherryRP",
+ "parameters": {
+ "cherry": "{\"op\":\"cov\", \"args\":[{\"string\":\"7fd6aed2b028486fa478b3d3f6e7ee61\"}, {\"float\":3.0} ]}",
+ "lrns": "[\"7fd6aed2b028486fa478b3d3f6e7ee61\"]",
+ "host": "192.168.0.17"
+ }
+ }
+ },
+ {
+ "guid": "ZMQPublisher",
+ "schedule": 0,
+ "backoff": 0,
+ "source": {
+ "name": "fey_zmq.jar",
+ "classPath": "org.apache.iota.fey.performer.ZMQPublisher",
+ "parameters": {
+ "zmq_port": "5559",
+ "zmq_target": "192.168.0.139"
+ }
+ }
+ }
+ ],
+ "connections": [
+ {
+ "Heartbeat": [
+ "Cherry"
+ ]
+ },
+ {
+ "Cherry": [
+ "ZMQPublisher"
+ ]
+ }
+ ]
+ },
+ {
+ "guid": "VIBRATION_AGGREGATE",
+ "command": "NONE",
+ "performers": [
+ {
+ "guid": "Heartbeat",
+ "schedule": 10000,
+ "backoff": 0,
+ "source": {
+ "name": "fey_stream.jar",
+ "classPath": "org.apache.iota.fey.performer.Heartbeat",
+ "parameters": {
+ }
+ }
+ },
+ {
+ "guid": "Cherry",
+ "schedule": 1000,
+ "backoff": 0,
+ "source": {
+ "name": "fey_cherry_rp.jar",
+ "classPath": "org.apache.iota.fey.performer.CherryRP",
+ "parameters": {
+ "cherry": "{\"op\":\"cov\", \"args\":[{\"string\":\"5fd6aed2b028486fa478b3d3f6e7ee61\"}, {\"float\":0.02} ]}",
+ "lrns": "[\"5fd6aed2b028486fa478b3d3f6e7ee61\"]",
+ "host": "192.168.0.17"
+ }
+ }
+ },
+ {
+ "guid": "ZMQPublisher",
+ "schedule": 0,
+ "backoff": 0,
+ "source": {
+ "name": "fey_zmq.jar",
+ "classPath": "org.apache.iota.fey.performer.ZMQPublisher",
+ "parameters": {
+ "zmq_port": "5559",
+ "zmq_target": "192.168.0.139"
+ }
+ }
+ }
+ ],
+ "connections": [
+ {
+ "Heartbeat": [
+ "Cherry"
+ ]
+ },
+ {
+ "Cherry": [
+ "ZMQPublisher"
+ ]
+ }
+ ]
+ },
+ {
+ "guid": "VIBRATION",
+ "command": "NONE",
+ "performers": [
+ {
+ "guid": "VibrationStream",
+ "schedule": 1000,
+ "backoff": 0,
+ "source": {
+ "name": "fey_cherry_rp.jar",
+ "classPath": "org.apache.iota.fey.performer.CherryRP",
+ "parameters": {
+ "cherry": "{\"didVibrationChange\":\"6fd6aed2b028486fa478b3d3f6e7ee61\"}",
+ "lrns": "[\"6fd6aed2b028486fa478b3d3f6e7ee61\"]",
+ "host": "192.168.0.17"
+ }
+ }
+ },
+ {
+ "guid": "ZMQPublisher",
+ "schedule": 0,
+ "backoff": 0,
+ "source": {
+ "name": "fey_zmq.jar",
+ "classPath": "org.apache.iota.fey.performer.ZMQPublisher",
+ "parameters": {
+ "zmq_port": "5559",
+ "zmq_target": "192.168.0.139"
+ }
+ }
+ }
+ ],
+ "connections": [
+ {
+ "VibrationStream": [
+ "ZMQPublisher"
+ ]
+ }
+ ]
+ },
+ {
+ "guid": "SOUND_WAV",
+ "command": "NONE",
+ "performers": [
+ {
+ "guid": "Cherry",
+ "schedule": 3000,
+ "backoff": 0,
+ "source": {
+ "name": "fey_cherry_rp.jar",
+ "classPath": "org.apache.iota.fey.performer.CherryRP",
+ "parameters": {
+ "cherry": "{\"didSoundChange\":\"9fd6aed2b028486fa478b3d3f6e7ee61\"}",
+ "lrns": "[\"9fd6aed2b028486fa478b3d3f6e7ee61\"]",
+ "host": "192.168.0.17"
+ }
+ }
+ },
+ {
+ "guid": "ZMQPublisher",
+ "schedule": 0,
+ "backoff": 0,
+ "source": {
+ "name": "fey_zmq.jar",
+ "classPath": "org.apache.iota.fey.performer.ZMQPublisher",
+ "parameters": {
+ "zmq_port": "5559",
+ "zmq_target": "192.168.0.139"
+ }
+ }
+ }
+ ],
+ "connections": [
+ {
+ "Cherry": [
+ "ZMQPublisher"
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/b459b227/performers/fey/JSONSamples/temperature.json
----------------------------------------------------------------------
diff --git a/performers/fey/JSONSamples/temperature.json b/performers/fey/JSONSamples/temperature.json
new file mode 100644
index 0000000..614a328
--- /dev/null
+++ b/performers/fey/JSONSamples/temperature.json
@@ -0,0 +1,28 @@
+{
+ "guid": "Orch1",
+ "command": "CREATE",
+ "timestamp": "591997890",
+ "name": "DESCRIPTION",
+ "ensembles": [
+ {
+ "guid": "En1",
+ "command": "NONE",
+ "performers": [
+ {
+ "guid": "S1",
+ "schedule": 5000,
+ "backoff": 0,
+ "source": {
+ "name": "fey_virtual_sensors.jar",
+ "classPath": "org.apache.iota.fey.performer.Sensor",
+ "parameters": {
+ "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} ]"
+ }
+ }
+ }
+ ],
+ "connections": [
+ ]
+ }
+ ]
+}
\ No newline at end of file