Hacker News new | ask | show | jobs
by agentultra 4803 days ago
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("example@foo.com")),
                     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.