KirinDave / fuzed

A new revision of Fuzed, the Erlang-based frontend for web apps. Check out the mailing list at http://groups.google.com/group/fuzed

fuzed / README
7241ddf6 » mojombo 2008-05-29 add readme with details on ... 1 fuzed
7765d8c0 » mojombo 2008-06-01 fix static asset url in rea... 2 by Dave Fayram <dfayram at powerset dot com>,
3 Tom Preston-Werner <tom at powerset dot com>,
4 Abhay Kumar <abhay at powerset dot com>
5
6 Webiste: http://fuzed.rubyforge.org
7 Mailing List: http://groups.google.com/group/fuzed
7241ddf6 » mojombo 2008-05-29 add readme with details on ... 8
9 == Summary
10
d6286a3b » KirinDave 2008-06-05 Gave the README summary a b... 11 Fuzed is an Erlang-based clustering system designed to let several
12 single-threaded processes (which may or may not be reliable) form
13 into a pool which can serve requests to remote hosts. These resources
14 need not be homogeneous, Fuzed breaks them up into homogeneous pools
15 internally and serves out requests without "crossing the streams"
16 of different software/versions of software.
17
18 This is a release of Powerset's internal clustering software which
19 has been adapted for use with Rails, but see the generic_json_responder
20 to see exactly how it is used internally.
7241ddf6 » mojombo 2008-05-29 add readme with details on ... 21
22
23 == Dependencies
24
25 * Erlang: http://www.erlang.org (>= 5.6.1)
26 * Ruby: http://www.ruby-lang.org (>= 1.8.6)
27 * Ruby Gems:
28 * rake: http://rake.rubyforge.org (>= 0.8.1)
29 * rack: http://rack.rubyforge.org (>= 0.3.0)
7765d8c0 » mojombo 2008-06-01 fix static asset url in rea... 30 * erlectricity: http://github.com/mojombo/erlectricity (>= 0.2.1)
7241ddf6 » mojombo 2008-05-29 add readme with details on ... 31
32 == Installation
33
34 Fuzed is currently only available as a source distribution. A gem will be made
35 available shortly.
36
37 First, clone the source repo from GitHub. The following command will clone the
38 repo into a directory named 'fuzed' within your current working directory.
39
40 $ git clone git://github.com/KirinDave/fuzed.git
41
c701f00b » abhay 2008-07-09 updated README for submodules 42 Move into the 'fuzed' directory and run the following commands to build fuzed:
7241ddf6 » mojombo 2008-05-29 add readme with details on ... 43
44 $ cd fuzed
c701f00b » abhay 2008-07-09 updated README for submodules 45 $ git submodule init
46 $ git submodule update
47 $ rake build_deps
7241ddf6 » mojombo 2008-05-29 add readme with details on ... 48 $ rake
49
50 You should not see any error messages if the build was successful.
51
c701f00b » abhay 2008-07-09 updated README for submodules 52 Whenever additional dependencies added, you'll need to run init and update again.
53
7241ddf6 » mojombo 2008-05-29 add readme with details on ... 54 == Setting up a simple Rails cluster on a single machine
55
56 Every cluster starts with a 'master' node. From the fuzed root directory, run
57 the following to start a master. The command will drop you into interactive
58 mode for the Erlang runtime. It's best to work this way while you familiarize
59 yourself with the system as it will be easier to see any error messages that
60 reported.
61
62 $ bin/fuzed start -n master@volcano.local
63
64 Replace 'volcano.local' with your hostname. Note: 'localhost' will not work
7765d8c0 » mojombo 2008-06-01 fix static asset url in rea... 65 here, it must be an externally addressable hostname. It's best to always name
66 your master node 'master'. It makes setting up frontend and backend nodes much
67 easier.
7241ddf6 » mojombo 2008-05-29 add readme with details on ... 68
7765d8c0 » mojombo 2008-06-01 fix static asset url in rea... 69 Next, start and attach a Rails 'frontend' node. This will bind to a TCP port
70 (default 8080) and serve static assets as well as direct dynamic requests to
71 your Rails node.
7241ddf6 » mojombo 2008-05-29 add readme with details on ... 72
7765d8c0 » mojombo 2008-06-01 fix static asset url in rea... 73 $ bin/fuzed frontend -z volcano.local -r test/app/public -s 'kind=rails' \
7241ddf6 » mojombo 2008-05-29 add readme with details on ... 74 -n f8080@volcano.local
75
76 Let's break this command down so you understand what each option specifies. -z
77 denotes the hostname of the master (must match what you used in your `fuzed
78 start` command. -r specifies the document root for static assets. -s specifies
79 a details list that will select the proper backend node. For a simple cluster,
80 leave this alone. -n names the node. Every node that joins a cluster must be
81 uniquely named. Here I've named it after the port that will be bound. Because
82 this is a single machine cluster, I use the same hostname as the master. In a
83 multi-machine setup, you will specify the hostname of the machine that is
84 running the node.
85
7765d8c0 » mojombo 2008-06-01 fix static asset url in rea... 86 You should now be able to request a static asset from your cluster. Try
87 requesting:
7241ddf6 » mojombo 2008-05-29 add readme with details on ... 88
7765d8c0 » mojombo 2008-06-01 fix static asset url in rea... 89 http://localhost:8080/robots.txt
7241ddf6 » mojombo 2008-05-29 add readme with details on ... 90
7765d8c0 » mojombo 2008-06-01 fix static asset url in rea... 91 Now we'll need a 'rails' node to serve dynamic requests. The following command
92 will start a single Rails node.
7241ddf6 » mojombo 2008-05-29 add readme with details on ... 93
94 $ bin/fuzed rails -z volcano.local --rails-root=test/app -n n1@volcano.local
95
7765d8c0 » mojombo 2008-06-01 fix static asset url in rea... 96 Once again -z specifies the master hostname. --rails-root must point to the
97 Rails root of your app. -n names the node.
7241ddf6 » mojombo 2008-05-29 add readme with details on ... 98
7765d8c0 » mojombo 2008-06-01 fix static asset url in rea... 99 At this point, if all is well, you will have a fully assembled and operational
100 Rails cluster!