Skip to content
elaverman edited this page Nov 20, 2012 · 5 revisions

The goals of the Signal/Collect programming model are:

  • Expressive enough to tersely formulate a broad range of graph algorithms
  • Can define both synchronous and dataflow-like asynchronous computations
  • Straightforward to parallelize/distribute

The intuition behind the Signal/Collect programming model is that computations are executed on a graph, where the vertices are the computational units that interact by the means of signals that flow along the edges. This is similar to the actor programming model. All computations in the vertices are accomplished by collecting the incoming signals and then signaling the neighbors in the graph.

This means that every vertex, beyond holding the information about its own id and state, has a collect function which computes the new vertex state based on the old vertex state and the signals that were received.

class Vertex {
  def collect(oldState: State, uncollectedSignals: Iterable[Signal]): State
}

Every edge has a reference to its source vertex (if it is attached to one), the id of the target vertex and its weight. It implements a signal function which computes the signal sent along this edge based on its source vertex.

class Edge {
  def signal(sourceVertex: SourceVertex): Signal
}

Previous: Home

Next: Java Example Algorithm