striot-0.2.1.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Striot.CompileIoT

Synopsis

Documentation

createPartitions :: StreamGraph -> PartitionMap -> PartitionedGraph Source #

createPartitions returns ([partitions], [inter-graph links]) where inter-graph links are the cut edges due to partitioning

partitionGraph :: StreamGraph -> PartitionMap -> GenerateOpts -> IO () Source #

Partitions the supplied StreamGraph according to the supplied PartitionMap; invokes generateCode for each derived sub-graph; writes out the resulting source code to individual source code files, one per node.

  • TODO*: move GenerateOpts to first parameter?

data GenerateOpts Source #

Options for source code generation are captured in instances of the GenerateOpts data-type.

Constructors

GenerateOpts 

Fields

defaultOpts :: GenerateOpts Source #

Sensible default values for GenerateOpts. Users who wish to customise options in GenerateOpts are encouraged to derive from defaultOpts.

type Partition = Int Source #

A Partition, a.k.a. *Node*, in a deployment. Eventually we may define properties about Partitions in these types. For now they are considered to be homogeneous. The chosen type just needs to be enumerable.

type PartitionMap = [[Int]] Source #

The user's desired partitioning of the input Graph. Each element in the outer-most list corresponds to a distinct partition. The inner-lists are the IDs of Operators to include in that partition.

data Plan Source #

A Plan is a pairing of a StreamGraph with a PartitionMap that could be used for its partitioning and deployment.

Instances

Instances details
Eq Plan Source # 
Instance details

Defined in Striot.CompileIoT

Methods

(==) :: Plan -> Plan -> Bool #

(/=) :: Plan -> Plan -> Bool #

generateCode :: GenerateOpts -> StreamGraph -> PartitionMap -> [String] Source #

Partitions the supplied StreamGraph according to the supplied PartitionMap and options specified within the supplied GenerateOpts and returns a list of the sub-graphs converted into source code and encoded as Strings.