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