fmq 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/History.txt
CHANGED
data/README.txt
CHANGED
@@ -14,10 +14,10 @@ Project github repositiory: git://github.com/threez/fmq.git
|
|
14
14
|
The project implements a queue system with a server and some client apis.
|
15
15
|
|
16
16
|
The server is a rack server that holds REST-named queues, so that the
|
17
|
-
|
17
|
+
implementation can be changed rapidly. You can GET, POST, DELETE, HEAD queue
|
18
18
|
messages using the normal HTTP requests. The system itself uses a configuration
|
19
|
-
file (
|
20
|
-
implementations can be changed or you can
|
19
|
+
file (config.ru) to setup queues at startup or even at runtime. The queue
|
20
|
+
implementations can be changed or you can develop own queues with ease.
|
21
21
|
|
22
22
|
For an simple administration try out the integrated ajax based web interface.
|
23
23
|
|
@@ -29,16 +29,6 @@ The queue itself is a RESTful url like http://localhost:5884/myQueueName/
|
|
29
29
|
or http://localhost:5884/myApplication/myQueueName/. If you do a GET request
|
30
30
|
to this url with a web browser you will receive one message from the queue.
|
31
31
|
|
32
|
-
== FEATURES/PROBLEMS:
|
33
|
-
|
34
|
-
* FIFO message store
|
35
|
-
* easy setup and maintenance of system (rack)
|
36
|
-
* using http for communication
|
37
|
-
* changeable queue implementation
|
38
|
-
* ruby client lib
|
39
|
-
* simple ajax admin interface
|
40
|
-
* implements a rack server stack
|
41
|
-
|
42
32
|
== SYNOPSIS:
|
43
33
|
|
44
34
|
After installing the gem you can start by creating a project:
|
@@ -1,50 +1,73 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
3
|
-
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
</head>
|
11
|
-
<body onload="updateSelects(); updateTable();">
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
5
|
+
<title>Free Message Queue</title>
|
6
|
+
<link href="stylesheets/application.css" rel="stylesheet" type="text/css" media="screen" />
|
7
|
+
<script type="text/javascript" src="javascript/prototype.js"></script>
|
8
|
+
<script type="text/javascript" src="javascript/application.js"></script>
|
9
|
+
<link rel="shortcut icon" href="images/logo.png" />
|
10
|
+
</head>
|
11
|
+
<body onload="updateSelects(); updateTable();">
|
12
|
+
<div id="header">
|
13
|
+
<div id="logo">
|
14
|
+
<h1><a href="#">Free Message Queue</a></h1>
|
15
|
+
<p>the easy http queue system</p>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
<div id="page">
|
19
|
+
<div id="content">
|
20
|
+
<!-- SEND MESSAGE TO QUEUE -->
|
21
|
+
<h1 class="title">Put a message</h1>
|
22
|
+
<p>
|
23
|
+
Queue path: <select id="post-queue-name"><option>NONE</option></select><br />
|
24
|
+
<textarea id="post-body" class="block-text" rows="5" cols="20"></textarea><br />
|
25
|
+
<input id="post-button" type="button" value="send"
|
26
|
+
onclick="sendMessageToQueue('post-button', 'post-queue-name', 'post-body');"/>
|
27
|
+
</p>
|
28
|
+
|
29
|
+
<!-- GET MESSAGE FROM QUEUE -->
|
30
|
+
<h1 class="title">Poll a message</h1>
|
31
|
+
<p>
|
32
|
+
Queue path: <select id="get-queue-name"><option>NONE</option></select><br />
|
33
|
+
<code id="get-body" class="block-text"></code>
|
34
|
+
<input id="get-button" type="button" value="get one"
|
35
|
+
onclick="getMessageFromQueue('get-button', 'get-queue-name', 'get-body');"/>
|
36
|
+
</p>
|
37
|
+
</div>
|
38
|
+
<div id="sidebar">
|
39
|
+
<!-- LIST QUEUE -->
|
40
|
+
<h2>Queues</h2>
|
41
|
+
<p>
|
42
|
+
<span id="queue-table-space"></span>
|
43
|
+
<input type="button" value="delete" onclick="deleteQueue('queue_to_delete');"/>
|
44
|
+
<input type="button" value="update" onclick="updateTable();" />
|
45
|
+
</p>
|
46
|
+
<!-- CREATE QUEUE -->
|
47
|
+
<h2>Create queue</h2>
|
48
|
+
<p>
|
49
|
+
Queue path: /<input id="queue-create-path" /><br />
|
50
|
+
Maximum messages: <input id="queue-create-max-messages" value="1000000" /><br />
|
51
|
+
Maximum queue size in kb, mb, gb: <input id="queue-create-size" value="100mb" /><br />
|
52
|
+
<input type="button" value="create" onclick="createQueue()" />
|
53
|
+
</p>
|
54
|
+
</div>
|
55
|
+
<div style="clear: both;"> </div>
|
56
|
+
</div>
|
57
|
+
<div id="footer">
|
58
|
+
<p>This interface is based on <a href="http://www.prototypejs.org/">prototype</a>.
|
59
|
+
Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
|
60
|
+
</div>
|
61
|
+
</body>
|
62
|
+
</html>
|
63
|
+
<!--
|
64
|
+
Design by Free CSS Templates
|
65
|
+
http://www.freecsstemplates.org
|
66
|
+
Released for free under a Creative Commons Attribution 2.5 License
|
67
|
+
|
68
|
+
Name : Printing
|
69
|
+
Description: A two-column, fixed-width design with dark color scheme.
|
70
|
+
Version : 1.0
|
71
|
+
Released : 20080425
|
72
|
+
|
73
|
+
-->
|
@@ -29,17 +29,17 @@ function updateTable() {
|
|
29
29
|
}
|
30
30
|
|
31
31
|
function fillTableSpaceWithQueues(table_space, queues) {
|
32
|
-
var
|
33
|
-
'<tr><th>Queue name</th><th>queue size</th><th>messages in queue</th><th>options</th></tr>';
|
32
|
+
var list = '';
|
34
33
|
|
35
34
|
queues.each ( function (queue) {
|
36
|
-
|
37
|
-
|
35
|
+
list += "<div><small>" +
|
36
|
+
'<input type="checkbox" class="queue_to_delete" value="' + queue[0] + '"/><strong>' +
|
37
|
+
queue[0] + "</strong><br />(" + queue[1] + "/" + queue[2] +") bytes (" +
|
38
|
+
queue[3] + "/" + queue[4] + ") messages</small> " +
|
39
|
+
'</div>';
|
38
40
|
});
|
39
|
-
|
40
|
-
table += '</table>';
|
41
41
|
|
42
|
-
$(table_space).innerHTML =
|
42
|
+
$(table_space).innerHTML = list;
|
43
43
|
}
|
44
44
|
|
45
45
|
function fillSelectWithQueuePaths(select_id, queues) {
|
@@ -113,15 +113,21 @@ function createQueue() {
|
|
113
113
|
});
|
114
114
|
}
|
115
115
|
|
116
|
-
function deleteQueue(
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
116
|
+
function deleteQueue(delete_radio) {
|
117
|
+
radios = document.getElementsByClassName(delete_radio);
|
118
|
+
for (i = 0; i < radios.length; i++) {
|
119
|
+
radio = radios[i]
|
120
|
+
if (radio.checked) {
|
121
|
+
new Ajax.Request(ADMIN_QUEUE_PATH, {
|
122
|
+
method: 'POST',
|
123
|
+
postBody: "_method=delete&path=" + radio.value,
|
124
|
+
onSuccess: function(transport) {
|
125
|
+
updateSelects();
|
126
|
+
updateTable();
|
127
|
+
alert("Queue " + radio.value + " successfully deleted");
|
128
|
+
},
|
129
|
+
onFailure: function(transport){ alert(transport.getHeader("ERROR")) }
|
130
|
+
});
|
131
|
+
}
|
132
|
+
}
|
127
133
|
}
|
@@ -1,61 +1,213 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
#
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
1
|
+
/*
|
2
|
+
Design by Free CSS Templates
|
3
|
+
http://www.freecsstemplates.org
|
4
|
+
Released for free under a Creative Commons Attribution 2.5 License
|
5
|
+
*/
|
6
|
+
|
7
|
+
body {
|
8
|
+
margin: 0;
|
9
|
+
background: #35393D;
|
10
|
+
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
11
|
+
font-size: 13px;
|
12
|
+
color: #787878;
|
13
|
+
}
|
14
|
+
|
15
|
+
h1, h2, h3 {
|
16
|
+
margin: 0;
|
17
|
+
text-transform: uppercase;
|
18
|
+
letter-spacing: .15em;
|
19
|
+
font-family: Arial, Helvetica, sans-serif;
|
20
|
+
}
|
21
|
+
|
22
|
+
h1 {
|
23
|
+
font-size: 1.8em;
|
24
|
+
}
|
25
|
+
|
26
|
+
h2 {
|
27
|
+
font-size: 1.4em;
|
28
|
+
}
|
29
|
+
|
30
|
+
h3 {
|
31
|
+
font-size: 1em;
|
32
|
+
}
|
33
|
+
|
34
|
+
p, ul, ol {
|
35
|
+
margin-top: 0;
|
36
|
+
line-height: 180%;
|
37
|
+
}
|
38
|
+
|
39
|
+
ul, ol {
|
40
|
+
}
|
41
|
+
|
42
|
+
a {
|
43
|
+
text-decoration: none;
|
44
|
+
color: #C0BFBF;
|
45
|
+
}
|
46
|
+
|
47
|
+
a:hover {
|
48
|
+
background: none;
|
49
|
+
}
|
50
|
+
|
51
|
+
/* Header */
|
52
|
+
|
53
|
+
#header {
|
54
|
+
width: 940px;
|
55
|
+
height: 160px;
|
56
|
+
margin: 0 auto;
|
57
|
+
background: #000000;
|
58
|
+
}
|
59
|
+
|
60
|
+
/* Logo */
|
61
|
+
|
62
|
+
#logo {
|
63
|
+
float: left;
|
64
|
+
}
|
65
|
+
|
66
|
+
#logo h1 {
|
67
|
+
float: left;
|
68
|
+
margin-left: 40px;
|
69
|
+
padding-top: 85px;
|
70
|
+
text-transform: uppercase;
|
71
|
+
font-size: 2.6em;
|
72
|
+
}
|
73
|
+
|
74
|
+
#logo p {
|
75
|
+
float: left;
|
76
|
+
margin: 0;
|
77
|
+
padding: 102px 0 0 2px;
|
78
|
+
text-transform: lowercase;
|
79
|
+
letter-spacing: .2em;
|
80
|
+
font: bold 1.2em Arial, Helvetica, sans-serif;
|
81
|
+
}
|
82
|
+
|
83
|
+
#logo a {
|
84
|
+
background: none;
|
85
|
+
text-decoration: none;
|
86
|
+
color: #FFFFFF;
|
87
|
+
}
|
88
|
+
|
89
|
+
/* Menu */
|
90
|
+
|
91
|
+
#menu {
|
92
|
+
width: 940px;
|
93
|
+
height: 60px;
|
94
|
+
margin: 0 auto;
|
95
|
+
}
|
96
|
+
|
97
|
+
#menu ul {
|
98
|
+
margin: 0;
|
99
|
+
margin-left: 30px;
|
100
|
+
padding: 16px 0 0 10px;
|
101
|
+
list-style: none;
|
102
|
+
line-height: normal;
|
103
|
+
}
|
104
|
+
|
105
|
+
#menu li {
|
106
|
+
float: left;
|
107
|
+
}
|
108
|
+
|
109
|
+
#menu a {
|
110
|
+
margin-right: 3px;
|
111
|
+
padding: 5px 20px;
|
112
|
+
background: #000000;
|
113
|
+
text-transform: lowercase;
|
114
|
+
text-decoration: none;
|
115
|
+
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
116
|
+
font-size: 16px;
|
117
|
+
font-weight: normal;
|
118
|
+
color: #FFFFFF;
|
119
|
+
}
|
120
|
+
|
121
|
+
#menu a:hover, #menu .current_page_item a {
|
122
|
+
color: #FFFFFF;
|
123
|
+
}
|
124
|
+
|
125
|
+
#menu a:hover {
|
126
|
+
text-decoration: underline;
|
127
|
+
}
|
128
|
+
|
129
|
+
/* Page */
|
130
|
+
|
131
|
+
#page {
|
132
|
+
width: 860px;
|
133
|
+
margin: 0 auto;
|
134
|
+
padding: 40px;
|
135
|
+
}
|
136
|
+
|
137
|
+
/* Content */
|
138
|
+
|
139
|
+
#content {
|
140
|
+
float: left;
|
141
|
+
width: 560px;
|
142
|
+
}
|
143
|
+
|
144
|
+
table {
|
145
|
+
width: 560px;
|
146
|
+
border: 1px solid black;
|
147
|
+
}
|
148
|
+
|
149
|
+
/* Sidebar */
|
150
|
+
|
151
|
+
#sidebar {
|
152
|
+
float: right;
|
153
|
+
width: 258px;
|
154
|
+
background: #E8E8E8;
|
155
|
+
border: 1px solid #D3D3D3;
|
156
|
+
}
|
157
|
+
|
158
|
+
#sidebar ul {
|
159
|
+
margin: 0;
|
160
|
+
padding: 0;
|
161
|
+
list-style: none;
|
162
|
+
}
|
163
|
+
|
164
|
+
#sidebar li {
|
165
|
+
}
|
166
|
+
|
167
|
+
#sidebar li ul {
|
168
|
+
padding: 20px;
|
169
|
+
}
|
170
|
+
|
171
|
+
#sidebar li li {
|
172
|
+
}
|
173
|
+
|
174
|
+
#sidebar h2 {
|
175
|
+
padding: 5px 10px;
|
176
|
+
background: #000000;
|
177
|
+
font-size: 1.2em;
|
178
|
+
}
|
179
|
+
|
180
|
+
#sidebar p {
|
181
|
+
padding: 20px;
|
182
|
+
}
|
183
|
+
|
184
|
+
/* Footer */
|
185
|
+
|
186
|
+
#footer {
|
187
|
+
width: 940px;
|
188
|
+
margin: 0 auto;
|
189
|
+
padding: 20px 0;
|
190
|
+
background: #000000;
|
191
|
+
border-top: 1px solid #000000;
|
192
|
+
border-bottom: 1px solid #000000;
|
193
|
+
}
|
194
|
+
|
195
|
+
#footer p {
|
196
|
+
margin: 0;
|
197
|
+
line-height: normal;
|
198
|
+
font-size: 9px;
|
199
|
+
text-transform: uppercase;
|
200
|
+
text-align: center;
|
201
|
+
}
|
202
|
+
|
203
|
+
.block-text {
|
204
|
+
font-family:"Courier New", Courier, monospace;
|
205
|
+
border: 1px solid #D3D3D3;
|
206
|
+
background-color: #000;
|
207
|
+
color: #D3D3D3;
|
208
|
+
padding: 5px;
|
209
|
+
font-size: 0.8em;
|
210
|
+
width: 560px;
|
211
|
+
min-height: 160px;
|
212
|
+
display: block;
|
213
|
+
}
|
data/lib/fmq/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fmq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vincent Landgraf
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-09-
|
12
|
+
date: 2008-09-06 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|