boogaloo 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. data/CHANGELOG +2 -0
  2. data/DEBUGGING +4 -0
  3. data/MIT-LICENSE +7 -0
  4. data/README +106 -0
  5. data/RUNNING_UNIT_TESTS +5 -0
  6. data/Rakefile +44 -0
  7. data/bin/boogaloo +159 -0
  8. data/doc/classes/Boogaloo.html +149 -0
  9. data/doc/classes/Boogaloo/Cache.html +121 -0
  10. data/doc/classes/Boogaloo/Cache/Base.html +664 -0
  11. data/doc/classes/Boogaloo/Cache/Persistent.html +122 -0
  12. data/doc/classes/Boogaloo/Cache/Temporary.html +439 -0
  13. data/doc/classes/Boogaloo/Client.html +111 -0
  14. data/doc/classes/Boogaloo/Client/Connection.html +228 -0
  15. data/doc/classes/Boogaloo/Config.html +540 -0
  16. data/doc/classes/Boogaloo/ServiceGateway.html +176 -0
  17. data/doc/classes/Boogaloo/ServiceRequest.html +210 -0
  18. data/doc/classes/Boogaloo/ThreadPool.html +205 -0
  19. data/doc/classes/Boogaloo/WorkerThread.html +239 -0
  20. data/doc/created.rid +1 -0
  21. data/doc/files/DEBUGGING.html +113 -0
  22. data/doc/files/MIT-LICENSE.html +129 -0
  23. data/doc/files/README.html +261 -0
  24. data/doc/files/examples/boogaloo_conf.html +130 -0
  25. data/doc/files/lib/boogaloo/cache/base_rb.html +101 -0
  26. data/doc/files/lib/boogaloo/cache/persistent_rb.html +108 -0
  27. data/doc/files/lib/boogaloo/cache/temporary_rb.html +101 -0
  28. data/doc/files/lib/boogaloo/client/connection_rb.html +101 -0
  29. data/doc/files/lib/boogaloo/config_rb.html +109 -0
  30. data/doc/files/lib/boogaloo/service_gateway_rb.html +110 -0
  31. data/doc/files/lib/boogaloo/service_request_rb.html +108 -0
  32. data/doc/files/lib/boogaloo/thread_pool_rb.html +101 -0
  33. data/doc/files/lib/boogaloo/util_rb.html +240 -0
  34. data/doc/files/lib/boogaloo/version_rb.html +114 -0
  35. data/doc/files/lib/boogaloo/worker_thread_rb.html +101 -0
  36. data/doc/fr_class_index.html +38 -0
  37. data/doc/fr_file_index.html +41 -0
  38. data/doc/fr_method_index.html +67 -0
  39. data/doc/index.html +24 -0
  40. data/doc/rdoc-style.css +208 -0
  41. data/examples/boogaloo.conf +17 -0
  42. data/lib/boogaloo/cache/base.rb +222 -0
  43. data/lib/boogaloo/cache/persistent.rb +15 -0
  44. data/lib/boogaloo/cache/temporary.rb +173 -0
  45. data/lib/boogaloo/client/connection.rb +55 -0
  46. data/lib/boogaloo/config.rb +206 -0
  47. data/lib/boogaloo/service_gateway.rb +37 -0
  48. data/lib/boogaloo/service_request.rb +39 -0
  49. data/lib/boogaloo/thread_pool.rb +40 -0
  50. data/lib/boogaloo/util.rb +29 -0
  51. data/lib/boogaloo/version.rb +1 -0
  52. data/lib/boogaloo/worker_thread.rb +46 -0
  53. data/test/test_persistent_cache.rb +99 -0
  54. data/test/test_service_gateway.rb +27 -0
  55. data/test/test_synchronicity.rb +29 -0
  56. data/test/test_temporary_cache.rb +42 -0
  57. metadata +113 -0
@@ -0,0 +1,239 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Boogaloo::WorkerThread</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Boogaloo::WorkerThread</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/boogaloo/worker_thread_rb.html">
59
+ lib/boogaloo/worker_thread.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Thread
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ Handles method calls to a service instance in a thread.
84
+ </p>
85
+
86
+ </div>
87
+
88
+
89
+ </div>
90
+
91
+ <div id="method-list">
92
+ <h3 class="section-bar">Methods</h3>
93
+
94
+ <div class="name-list">
95
+ <a href="#M000026">new</a>&nbsp;&nbsp;
96
+ <a href="#M000028">perform</a>&nbsp;&nbsp;
97
+ <a href="#M000027">use_instance</a>&nbsp;&nbsp;
98
+ </div>
99
+ </div>
100
+
101
+ </div>
102
+
103
+
104
+ <!-- if includes -->
105
+
106
+ <div id="section">
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+ <!-- if method_list -->
116
+ <div id="methods">
117
+ <h3 class="section-bar">Public Class methods</h3>
118
+
119
+ <div id="method-M000026" class="method-detail">
120
+ <a name="M000026"></a>
121
+
122
+ <div class="method-heading">
123
+ <a href="#M000026" class="method-signature">
124
+ <span class="method-name">new</span><span class="method-args">()</span>
125
+ </a>
126
+ </div>
127
+
128
+ <div class="method-description">
129
+ <p>
130
+ Initialize a new <a href="WorkerThread.html">WorkerThread</a> instance.
131
+ </p>
132
+ <p><a class="source-toggle" href="#"
133
+ onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
134
+ <div class="method-source-code" id="M000026-source">
135
+ <pre>
136
+ <span class="ruby-comment cmt"># File lib/boogaloo/worker_thread.rb, line 7</span>
137
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
138
+
139
+ <span class="ruby-keyword kw">super</span> {}
140
+ <span class="ruby-ivar">@obj</span> = <span class="ruby-keyword kw">nil</span>
141
+
142
+ <span class="ruby-keyword kw">end</span>
143
+ </pre>
144
+ </div>
145
+ </div>
146
+ </div>
147
+
148
+ <h3 class="section-bar">Public Instance methods</h3>
149
+
150
+ <div id="method-M000028" class="method-detail">
151
+ <a name="M000028"></a>
152
+
153
+ <div class="method-heading">
154
+ <a href="#M000028" class="method-signature">
155
+ <span class="method-name">perform</span><span class="method-args">(meth, *a, &amp;b)</span>
156
+ </a>
157
+ </div>
158
+
159
+ <div class="method-description">
160
+ <p>
161
+ Perform method calls on the service instance.
162
+ </p>
163
+ <p><a class="source-toggle" href="#"
164
+ onclick="toggleCode('M000028-source');return false;">[Source]</a></p>
165
+ <div class="method-source-code" id="M000028-source">
166
+ <pre>
167
+ <span class="ruby-comment cmt"># File lib/boogaloo/worker_thread.rb, line 26</span>
168
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">perform</span>(<span class="ruby-identifier">meth</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">a</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">b</span>)
169
+
170
+ <span class="ruby-identifier">ret</span> = <span class="ruby-keyword kw">nil</span>
171
+
172
+ <span class="ruby-keyword kw">begin</span>
173
+
174
+ <span class="ruby-identifier">ret</span> = <span class="ruby-ivar">@obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">meth</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">a</span>)
175
+
176
+ <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">NoMethodError</span>, <span class="ruby-constant">TypeError</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
177
+
178
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">e</span>
179
+
180
+ <span class="ruby-keyword kw">end</span>
181
+
182
+ <span class="ruby-identifier">ret</span>
183
+
184
+ <span class="ruby-keyword kw">end</span>
185
+ </pre>
186
+ </div>
187
+ </div>
188
+ </div>
189
+
190
+ <div id="method-M000027" class="method-detail">
191
+ <a name="M000027"></a>
192
+
193
+ <div class="method-heading">
194
+ <a href="#M000027" class="method-signature">
195
+ <span class="method-name">use_instance</span><span class="method-args">(obj)</span>
196
+ </a>
197
+ </div>
198
+
199
+ <div class="method-description">
200
+ <p>
201
+ Tells the <a href="WorkerThread.html">WorkerThread</a> to forward method
202
+ calls to the given service instance.
203
+ </p>
204
+ <p>
205
+ Parameters:
206
+ </p>
207
+ <table>
208
+ <tr><td valign="top"><tt>obj</tt>:</td><td>The service instance to forward to.
209
+
210
+ </td></tr>
211
+ </table>
212
+ <p><a class="source-toggle" href="#"
213
+ onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
214
+ <div class="method-source-code" id="M000027-source">
215
+ <pre>
216
+ <span class="ruby-comment cmt"># File lib/boogaloo/worker_thread.rb, line 19</span>
217
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">use_instance</span>(<span class="ruby-identifier">obj</span>)
218
+
219
+ <span class="ruby-ivar">@obj</span> = <span class="ruby-identifier">obj</span>
220
+
221
+ <span class="ruby-keyword kw">end</span>
222
+ </pre>
223
+ </div>
224
+ </div>
225
+ </div>
226
+
227
+
228
+ </div>
229
+
230
+
231
+ </div>
232
+
233
+
234
+ <div id="validator-badges">
235
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
236
+ </div>
237
+
238
+ </body>
239
+ </html>
data/doc/created.rid ADDED
@@ -0,0 +1 @@
1
+ Sat Oct 14 01:32:02 BST 2006
@@ -0,0 +1,113 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: DEBUGGING</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>DEBUGGING</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>DEBUGGING
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Sat Oct 14 00:26:48 BST 2006</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+ <div id="description">
72
+ <h2>Debugging <a href="../classes/Boogaloo.html">Boogaloo</a></h2>
73
+ <p>
74
+ You can either enable debugging via the configuration file by putting
75
+ &#8216;debug = true&#8217; in the <em>Server</em> section, or enable it as
76
+ the server is running by sending a USR1 signal:
77
+ </p>
78
+ <pre>
79
+ kill -SIGUSR1 `pidof boogaloo`
80
+ </pre>
81
+
82
+ </div>
83
+
84
+
85
+ </div>
86
+
87
+
88
+ </div>
89
+
90
+
91
+ <!-- if includes -->
92
+
93
+ <div id="section">
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+ <!-- if method_list -->
103
+
104
+
105
+ </div>
106
+
107
+
108
+ <div id="validator-badges">
109
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
110
+ </div>
111
+
112
+ </body>
113
+ </html>
@@ -0,0 +1,129 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: MIT-LICENSE</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>MIT-LICENSE</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>MIT-LICENSE
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Wed Oct 11 16:23:38 BST 2006</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+ <div id="description">
72
+ <p>
73
+ Copyright &#169; 2006 Refreshing Software
74
+ </p>
75
+ <p>
76
+ Permission is hereby granted, free of charge, to any person obtaining a
77
+ copy of this software and associated documentation files (the
78
+ &quot;Software&quot;), to deal in the Software without restriction,
79
+ including without limitation the rights to use, copy, modify, merge,
80
+ publish, distribute, sublicense, and/or sell copies of the Software, and to
81
+ permit persons to whom the Software is furnished to do so, subject to the
82
+ following conditions:
83
+ </p>
84
+ <p>
85
+ The above copyright notice and this permission notice shall be included in
86
+ all copies or substantial portions of the Software.
87
+ </p>
88
+ <p>
89
+ THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,
90
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
91
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
92
+ NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
93
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
94
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
95
+ USE OR OTHER DEALINGS IN THE SOFTWARE.
96
+ </p>
97
+
98
+ </div>
99
+
100
+
101
+ </div>
102
+
103
+
104
+ </div>
105
+
106
+
107
+ <!-- if includes -->
108
+
109
+ <div id="section">
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+ <!-- if method_list -->
119
+
120
+
121
+ </div>
122
+
123
+
124
+ <div id="validator-badges">
125
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
126
+ </div>
127
+
128
+ </body>
129
+ </html>