Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nakkaya/net-eval
Dead Simple Distributed Computing for Clojure
https://github.com/nakkaya/net-eval
Last synced: 2 months ago
JSON representation
Dead Simple Distributed Computing for Clojure
- Host: GitHub
- URL: https://github.com/nakkaya/net-eval
- Owner: nakkaya
- License: mit
- Created: 2010-02-16T15:02:15.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2013-04-24T10:37:40.000Z (over 11 years ago)
- Last Synced: 2024-10-13T08:13:18.738Z (3 months ago)
- Language: Clojure
- Homepage: http://nakkaya.com/net-eval.markdown
- Size: 118 KB
- Stars: 35
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# net-eval
A Clojure library designed to execute code on remote nodes.
## Usage
Start the REPL by running `lein repl` in the top directory. Start a worker:
(use '[net-eval.core :only [start-worker]])
(start-worker 4321)In another terminal (possibly on anther computer) start the REPL again, define
a task and send it to the worker.(use 'net-eval.core)
(deftask sum-and-print-task [x y]
(let [s (+ x y)]
(do
(println s)
s)))
(def ip "localhost")
(def response (net-eval [[ip 4321 #'sum-and-print-task 4 5]
[ip 4321 #'sum-and-print-task 6 9]]))
(println (map deref response))