task/work queue

G

Gurpal 2000

Hi

I have created essentially a webapp using sinatra/webrick which allows a
user to queue bits of work. These bits of work are essentially long
running processes.

So i was thinking of using the Queue class to queue these requests and a
different thread to work thru the list (for example encoding videos).

The user should be able to check on the progress of list AND
reorder/move items up/down the list.

Now i've hand written stuff like this in java/servlet, but in Ruby
what's the best way to ensure that the queue can be enumerated in a
synchronized way? and in a Queue what's the best way to reorder items?
would i have to use an indexed/synchronized array or something?

Any pointers helpful

Thanks
 
M

Mike Sassak

[Note: parts of this message were removed to make it a legal post.]

Hi

I have created essentially a webapp using sinatra/webrick which allows a
user to queue bits of work. These bits of work are essentially long
running processes.

So i was thinking of using the Queue class to queue these requests and a
different thread to work thru the list (for example encoding videos).

The user should be able to check on the progress of list AND
reorder/move items up/down the list.

Now i've hand written stuff like this in java/servlet, but in Ruby
what's the best way to ensure that the queue can be enumerated in a
synchronized way? and in a Queue what's the best way to reorder items?
would i have to use an indexed/synchronized array or something?

Any pointers helpful

Thanks
Check out this list of Queuing libraries for Ruby on Ruby Toolbox:
http://ruby-toolbox.com/categories/queueing.html. You might not find
anything that fits your requirements exactly, but you could definitely find
some inspiration there.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top