Permalink
Browse files

a few things for a 0.0.1

  • Loading branch information...
joshrotenberg committed Dec 28, 2011
1 parent f1a2939 commit 3f88d2f524fbfc3c2443eb4aa1c6dcbcd982e11f
Showing with 24 additions and 14 deletions.
  1. +11 −0 README.md
  2. +2 −1 project.clj
  3. +11 −13 test/md_clj/test/echo.clj
View
@@ -68,6 +68,17 @@ Note that this has nothing to do with the mailing list called Majordomo:
This is a Clojure wrapper around the Java implementation. I started a
pure Clojure implementation, but this works right now.
+## Requirements
+
+Get, build and install ZeroMQ: http://www.zeromq.org/intro:get-the-software
+
+Get, build and install jzmq: https://github.com/zeromq/jzmq
+
+In your project.clj:
+
+```
+[md-clj "0.0.1"]
+```
## Usage
The Majordomo Pattern provides a framework for building "Reliable
View
@@ -7,7 +7,8 @@
[compojure "0.6.5"]
[ring/ring-jetty-adapter "0.3.9"]
[clj-http "0.2.6"]
- [cheshire "2.0.4"]]
+ [cheshire "2.0.4"]
+ [lein-clojars "0.6.0"]]
:source-path "src/clj"
:java-source-path "src/jvm"
:jvm-opts ["-Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib"])
View
@@ -28,14 +28,13 @@
echo-client (mdc/new-client "tcp://localhost:5555")]
(future (mdw/run echo-worker))
- (time
- (doseq [x random-strings]
- (let [reply (mdc/send! echo-client :echo x)]
-
+ (doseq [x random-strings]
+ (let [reply (mdc/send! echo-client :echo x)]
+
(is (= x (-> (.toArray reply)
first
.getData
- String.))))))))
+ String.)))))))
;; test an async client. send! a bunch of request. then go back and get
;; all the results
@@ -73,13 +72,12 @@
(doseq [w echo-workers]
(future (mdw/run w)))
-
- (time
- (doseq [x random-strings]
- (let [reply (mdc/send! echo-client :echo-multi x)]
- (is (= x (-> (.toArray reply)
- first
- .getData
- String.))))))))
+
+ (doseq [x random-strings]
+ (let [reply (mdc/send! echo-client :echo-multi x)]
+ (is (= x (-> (.toArray reply)
+ first
+ .getData
+ String.)))))))

0 comments on commit 3f88d2f

Please sign in to comment.