Karsten Schmidt is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

postspectacular / clj-estuary

Easy construction of dataflow graphs using standard Clojure agents

Clone this repository (size: 25.7 KB): HTTPS / SSH
hg clone https://bitbucket.org/postspectacular/clj-estuary
hg clone ssh://hg@bitbucket.org/postspectacular/clj-estuary

clj-estuary overview

Recent commits See more »

Estuary

Easy construction of dataflow graphs using standard Clojure agents.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
(ns user
    (:use [estuary.core]))

(defgraph g)
(defnode g a `set-value {:value 0})
(defnode g b `set-value {:value 0})
(defaccu g c `set-and-accumulate 2)
(conn! a c :in0)
(conn! b c :in1)
(send-off a set-value 23)
(send-off b set-value 42)
(Thread/sleep 100)
(is (= 65 (:value @c))))

License

Copyright (C) 2011 Karsten Schmidt

Distributed under the Eclipse Public License, the same as Clojure.