On Nov 20, 8:51 pm, Chouser <chou...@gmail.com> wrote:
> On Thu, Nov 19, 2009 at 12:39 PM, Krukow <karl.kru...@gmail.com> wrote:
[snip]
> > I guess I am just asking if the performance guarantees are those I
> > would expect of Clojure (i.e., "too fast" ;-))
>
> This is definitely still too fast.  In fact, it keeps getting worse.
>
> --Chouser

We gotta stop him ;-)

No, more seriously, I really like these new features. Not just for the
speed, but for the modeling support.

I'm wondering if I could get some feed-back on a defprotocol/deftype
example. I am wondering if I am thinking "too object oriented" here
and misusing the features, or if I am inline with the intended use of
protocols and types.

The example code is a "Circuit Breaker" (the stability pattern
mentioned in Michael Nygaard's "Release It!").

Code:
Circuit breaker states and transitions
http://gist.github.com/239797


Circuit breaker
http://gist.github.com/239798

Git repository:
http://github.com/krukow/clojure-circuit-breaker

The circuit breaker has a wrap function that takes another function
and returns a wrapped version of that function that uses the circuit
breaker. Right now there is only one circuit breaker instance, but
that's easy to generalize.

Feedback very welcome!

/Karl

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to