From: Gurpal 2000 Date: 2009-11-13T07:45:18+09:00 Subject: Re: queuing work in a web app (sinatra/webrick) Gurpal 2000 wrote: > Hi > > I want to make a webapp that allows users to queue bit of work > (converting video for example). They are also able to see the queue at > any time and check the progress (queued|processing|done) and are able to > REORDER items in the queue. > The queue can be stopped (ie. paused) and resumed in between conversions > of course. > > I'm using sintatra and the LoopingThread example from here > http://codeidol.com/other/rubyckbk/Multitasking-and-Multithreading/Terminating-a-Thread/ > > Im sure there's ppl out there who've done something similar. I can do > this in java no problem (synchronized lists etc) but not sure how to do > this in ruby as im sort of a newbie. > > I have a working bit of code but im sure im missing something (memory > leak, synchorizing issues etc). Can post more code (very small) if > someone's willing to help. > > Thanks! Oh and i forgot to mention that the queue can be persisted if u want - i dont care at this stage. But im essentially keeping the queue in a flat file on disk to hopefully get some 'cheap locking'. I'd like to do this without a DB so to speak. thx -- Posted via http://www.ruby-forum.com/.