Clutch 0.4.0-SNAPSHOT

168 views
Skip to first unread message

Chas Emerick

unread,
May 3, 2012, 12:12:55 PM5/3/12
to clojure...@googlegroups.com
Hi all,

I have pushed Clutch 0.4.0-SNAPSHOT.  This is the beginning of a fairly big step for clutch in terms of cleaning up some historical artifacts in its internals, and simplifying the support for CouchDB's _changes feed.

New Leiningen coordinates: [com.ashafa/clutch "0.4.0-SNAPSHOT"]

Changelog so far:
  • API change: watch-changes, stop-changes, and changes-error have been removed. See the usage section on changes above. The _changes API support now consists of:
    • changes to obtain a lazy seq of updates from _changes directly
    • change-agent, start-changes, and stop-changes for creating and then controlling the activity of a Clojure agent whose state reflects the latest row from a continuous or longpoll view of _changes.
  • cheshire is now being used for all JSON operations.
  • clj-http is now being used for all HTTP operations.
The API breakage is unfortunate, but necessary: the original _changes support maintained a global mapping of watches that was too difficult to manage (especially in error conditions).  `watch-changes` moves to expose the agent that is pulling in each change event.  Feedback on this API is most welcome; note that it may yet change to suit such feedback.

Of course, eliminating the usage of the classic clojure-contrib library is huge in terms of cutting away dead weight (and load-time warnings!).  After some benchmarking, it's clear that cheshire is a better choice for our JSON needs, and clj-http is a much more reliable foundation that has eliminated some sporadic failures I've seen in testing that I have to assume are due to the legendarily flaky JDK-standard HTTP client.

So, give the snapshot a roll, and let us know how it goes.  Once I have some independent verification that all is well, and that the _changes API is reasonably sane, I'll cut a -beta1 release.

Cheers,

- Chas

--
http://cemerick.com
[Clojure Programming from O'Reilly](http://www.clojurebook.com)

Tunde Ashafa

unread,
May 3, 2012, 12:19:12 PM5/3/12
to clojure...@googlegroups.com
Wow. Great work Chas. You are a machine.

Chas Emerick

unread,
May 3, 2012, 12:22:39 PM5/3/12
to clojure...@googlegroups.com
In this case, I started from a good foundation. :-)

- Chas

--
http://cemerick.com
[Clojure Programming from O'Reilly](http://www.clojurebook.com)

Chas Emerick

unread,
May 7, 2012, 8:31:00 AM5/7/12
to Clojure Clutch
I have pushed a new cut of 0.4.0-SNAPSHOT that completely folds in the
ClojureScript view support from clutch-clojurescript (which is now
deprecated). The ClojureScript view support is now loaded in lazily,
which should translate into a less confusing setup process (i.e. there
is none!), and sane error messages if you don't have ClojureScript
available.

See the docs for this feature, starting here: https://github.com/clojure-clutch/clutch#cljsviews

Cheers,

- Chas

--
http://cemerick.com
[Clojure Programming from O'Reilly](http://www.clojurebook.com)

> --http://cemerick.com
Reply all
Reply to author
Forward
0 new messages