Last active
August 29, 2015 14:04
-
-
Save andypetrella/12228eb24eea6b3e1389 to your computer and use it in GitHub Desktop.
CRDD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait CRDD[S<:Space] { | |
def continuum:S | |
def break:S#SpacePoint => (S#SpacePoint, S#SpacePoint) | |
// the rest follow more or less the DStream definition | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object CRDDs { | |
trait DStream extends CRDD[ElapsedTime] { | |
val continuum: ElapsedTime | |
val break: TimePoint => Inteval /*(TimePoint, TimePoint)*/ // using slideDuration f.i. | |
} | |
trait TsCRDD extends CRDD[EventHorizon] {} | |
// a continuum composed of events, each holding a field like timestamp that can order them | |
val continuum: EventHorizon | |
val break: TimePoint /*timestamp*/ => Interval | |
} | |
trait CountCRDD extends CRDD[Integers] { | |
val continuum = Integers // 1, 2, 3, ... the counts | |
val break = Int => (Int, Int) // a split every n events [1, 4], [5, 8], ... | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait JobGenerator { | |
//an Observable type that can generate points based on a given semantic/strategy | |
// the handler registered to this producer will use the chopper and outlierManager function based on the cases | |
// like in DStream the "events" are sent to a Actor, in our case the type of the message will depend on these functions | |
def spacePointProducer | |
def chopper:SpacePoint => Boolean | |
def outliers:CRDD[SpacePoint] // ??? | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Space { | |
type SpacePoint | |
def origin: SpacePoint | |
def next: SpacePoint=>SpacePoint | |
def ordering:Ordering[SpacePoint] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment