aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Lasseter <nathan.je.lasseter@googlemail.com>2011-01-28 19:46:31 +0000
committerNathan Lasseter <nathan.je.lasseter@googlemail.com>2011-01-28 19:46:31 +0000
commitd17fe944ccbfb25ff535d04aaee616df6672044b (patch)
tree892eb40a219254c8c0d8885cf19136a1f01f657c
parentd0aff34c5c7f08e341428010e70a35910d9a20ca (diff)
Added TODO and textiled docs
-rw-r--r--README20
-rw-r--r--README.textile28
-rw-r--r--TODO.textile13
3 files changed, 41 insertions, 20 deletions
diff --git a/README b/README
deleted file mode 100644
index ed6e7b3..0000000
--- a/README
+++ /dev/null
@@ -1,20 +0,0 @@
-erlbal is an erlang load balancer.
-
-
-start_bal/0 spawns a balancer.
-stop_bal/1 takes a balancer and kills all of its servers and then kills the balancer.
-list_servers/1 takes a balancer and returns a list of the servers it balances over.
-
-start_server/2 takes a balancer, a node and a function and spawns a server on the node to serve the function.
-stop_server/2 takes a balancer and a server PID and stops the server and removes it from the balancer.
-
-make_request/1 takes a balancer and returns the response from the server.
-make_request/2 takes a balancer and an argument and returns the response from the server.
-
-
-The balancer round robins requests between erlang processes.
-When it receives a request, it forwards it on to the next server in the round robin.
-The server then runs the function with the argument passed to it and returns a response to the balancer.
-The balancer forwards the response back to the requestor.
-
-The function arg could be anything, so you can pass multiple args in a tuple or list, etc.
diff --git a/README.textile b/README.textile
new file mode 100644
index 0000000..42f05f3
--- /dev/null
+++ b/README.textile
@@ -0,0 +1,28 @@
+h1. erlbal
+
+erlbal is an erlang load balancer.
+
+h2. Balancer calls:
+
+* start_bal/0 spawns a balancer.
+* stop_bal/1 takes a balancer and kills all of its servers and then kills the balancer.
+* list_servers/1 takes a balancer and returns a list of the servers it balances over.
+
+h2. Server calls:
+
+* start_server/2 takes a balancer, a node and a function and spawns a server on the node to serve the function.
+* stop_server/2 takes a balancer and a server PID and stops the server and removes it from the balancer.
+
+h2. Request calls:
+
+* make_request/1 takes a balancer and returns the response from the server.
+* make_request/2 takes a balancer and an argument and returns the response from the server.
+
+h2. Info
+
+p. The balancer round robins requests between erlang processes.
+When it receives a request, it forwards it on to the next server in the round robin.
+The server then runs the function with the argument passed to it and returns a response to the balancer.
+The balancer forwards the response back to the requestor.
+
+p. The function arg could be anything, so you can pass multiple args in a tuple or list, etc.
diff --git a/TODO.textile b/TODO.textile
new file mode 100644
index 0000000..2d10dfa
--- /dev/null
+++ b/TODO.textile
@@ -0,0 +1,13 @@
+h1. TODO
+
+h2. Little changes:
+
+* Remove the Balancer variable from the server
+* Add server state
+* Remove the argless request call and implement strict listed args
+* Make the server return directly to the requester, not to the balancer
+
+h2. BIG changes:
+
+* erlbal-p: current implementation of erlbal to schedule across processes
+* erlbal-n: new project to actually load balance across nodes