News for hackers. Stuff that matters.
Re:Graph: Faster Abstractions for Structured Computation by agentultra on Wednesday May 01, 2013 @03:58PM (#5640393)
You can do push-based dataflow graphs in Python rather easily (especially in 3.3+ using `yield from`). Coroutines work especially well for this.
Re:Graph: Faster Abstractions for Structured Computation by aria on Wednesday May 01, 2013 @04:51PM (#5640706)
Definitely not the same thing. Take a look at our earlier graph post. http://blog.getprismatic.com/blog/2013/2/1/graph-abstraction...
Re:Graph: Faster Abstractions for Structured Computation by agentultra on Thursday May 02, 2013 @07:35AM (#5643727)
I might have to read the source of your implementation, but in what way is it different? I'll grant that Python makes it difficult to wrap it up in a nice DSL.

I'm building a stream-processing system much like Riemann in Python and the user configuration is built on co-routines. The stream is a graph of co-routines essentially (although typically with only one input and many possible buckets). I tend to think of it as data flowing through functions.

It might look like:

    stream = when(lambda event: event['metric'] > 2.0,
                  by(lambda event: (event['host'], event['metric']),
                     rollup(5, email("[email protected]")),
                     every(7200, alert("555-555-5555"))))
Which is a very simple graph of co-routines. And maybe that's what's different from you library (ie: it's not doing anything with intermediate values, but Python has a rich number of libraries providing various executor strategies).

Anyway I wasn't suggesting Graph was somehow trivial or something. The OP claims to be a Python programmer and I was suggesting Python options.