ruote tmp/log_2011-05-31.html

2011-05-31 09:39:54 utc Farrel Another newbie question. Does Ruote worker on process in parrallel or in a queue?
2011-05-31 09:39:58 utc Farrel if I have one worker
2011-05-31 09:40:09 utc Farrel and three processes that each take an hour to complete
2011-05-31 09:40:23 utc Farrel does it work on one exclusively before moving on to the next?
2011-05-31 09:40:31 utc Farrel or all three?
2011-05-31 10:20:40 utc Farrel found the answer in the docs... it's all threaded an in parrallel....
2011-05-31 12:30:01 utc jmettraux Farrel: hello, workers share a queue, if you have two workers, they'll compete for work
2011-05-31 12:30:17 utc jmettraux people tend to run workers in separate ruby processes
2011-05-31 12:31:18 utc jmettraux a worker itself [ab]uses one thread
2011-05-31 13:03:49 utc Farrel yes that's the plan
2011-05-31 13:04:01 utc Farrel but a worker can work on more than one process concurrently?
2011-05-31 13:06:49 utc Farrel I'm asking because I noticed that if I call $engine.process( wfid ) and my worker is not running
2011-05-31 13:06:53 utc Farrel I get nil back
2011-05-31 13:07:03 utc Farrel and I can't tell if the wfid is waiting to be processed
2011-05-31 13:07:06 utc Farrel or finished
2011-05-31 13:07:10 utc Farrel or just a junk value
2011-05-31 13:07:36 utc Farrel is there a way to find out what workitems are in storage but might not have started processing yet?
2011-05-31 13:07:55 utc jmettraux yes a worker can work on more than one process
2011-05-31 13:08:30 utc jmettraux $engine.process(wfid) => nil means "there is no process with the wfid currently running"
2011-05-31 13:08:56 utc jmettraux when there is no worker, there is no execution, thus no process running
2011-05-31 13:09:25 utc jmettraux I don't understand your last question
2011-05-31 13:09:33 utc Farrel is there a way to find the workitems that are waiting to be processed?
2011-05-31 13:09:44 utc Farrel that are in storage
2011-05-31 13:09:54 utc Farrel but haven't been picked up by a worker yet
2011-05-31 13:10:05 utc jmettraux there is no such thing
2011-05-31 13:10:12 utc jmettraux there are "msgs"
2011-05-31 13:10:27 utc jmettraux those are read by the workers, they are unit of work
2011-05-31 13:10:36 utc Farrel ok
2011-05-31 13:10:42 utc jmettraux launching a process places a "launch that process" msg on the queue
2011-05-31 13:10:50 utc jmettraux (and returns a wfid)
2011-05-31 13:11:05 utc Farrel here's my scenario
2011-05-31 13:11:16 utc Farrel I have a rails app with an engine and just storage (no worker)
2011-05-31 13:11:29 utc Farrel the worker is in a seperate engine daemon
2011-05-31 13:11:39 utc Farrel connected via storage
2011-05-31 13:12:34 utc Farrel the user clicks a button in the rails app and the engine launches the process
2011-05-31 13:12:38 utc Farrel for the daemon to pick up
2011-05-31 13:13:03 utc Farrel if the daemon is down or the process hasn't been picked up yet I'd like to indicate that the process is waiting
2011-05-31 13:13:18 utc Farrel but $engine.process(wfid) in the rails app returns nil
2011-05-31 13:13:40 utc jmettraux the process will "processing" anyway
2011-05-31 13:13:48 utc jmettraux it's all asynchronous
2011-05-31 13:14:12 utc jmettraux sleep for half a second and they ask the engine
2011-05-31 13:14:18 utc jmettraux and then ask the engine
2011-05-31 13:21:51 utc Farrel but if the worker is down there is no way to tell from the other engine though...
2011-05-31 13:22:17 utc Farrel or just if the wfid has not started processing yet...
2011-05-31 13:22:44 utc jmettraux you know that if you ask immediately you'll get a nil answer
2011-05-31 13:23:08 utc Farrel but if the worker is down will that remain nil indefinitely?
2011-05-31 13:23:15 utc jmettraux and you know that if you ask after, let's say, a second and you get a nil answer, something went wrong
2011-05-31 13:23:39 utc Farrel ok
2011-05-31 13:23:49 utc jmettraux in your use case you can quickly assert that something went wrong
2011-05-31 13:24:12 utc Farrel yeah... we'll just keep an external status that is stored on the model we want to process
2011-05-31 13:24:21 utc Farrel so like "submitted to ruote"
2011-05-31 13:24:21 utc jmettraux that's overkill
2011-05-31 13:26:09 utc jmettraux well, if I understood your use case correctly, it's all about clicking and having an answer immediately
2011-05-31 13:26:44 utc Farrel yeah
2011-05-31 13:26:49 utc Farrel gotta keep users soothed
2011-05-31 13:27:43 utc jmettraux keeping users soothed and knowing whether the worker is still up
2011-05-31 13:28:15 utc Farrel yeah the admins will be monitoring that
2011-05-31 13:28:25 utc Farrel I was just getting worried that after I launched a process
2011-05-31 13:28:46 utc Farrel and then asked the engine for the process with the wfid returned I got nil
2011-05-31 13:29:10 utc jmettraux if you ask immediately it will always return nil
2011-05-31 13:29:15 utc Farrel ok
2011-05-31 13:29:17 utc jmettraux maybe you fear "double launching"
2011-05-31 13:30:02 utc Farrel no I was just confused about when a submitted workitem becomes a process officially
2011-05-31 13:30:24 utc jmettraux workitems never become processes
2011-05-31 13:30:57 utc Farrel well when they start processing...
2011-05-31 13:31:03 utc Farrel you get the gist
2011-05-31 13:31:46 utc jmettraux I get the gist, but if I encourage you into shortcuts, it feeds the confusion
2011-05-31 13:32:17 utc Farrel yes
2011-05-31 13:32:30 utc jmettraux I have to escape now
2011-05-31 13:32:56 utc jmettraux if nobody answers here, feel free to use the mailing list http://groups.google.com/group/openwferu-users
2011-05-31 13:33:05 utc jmettraux have a good evening
2011-05-31 19:56:32 utc hartog lbt: did the rapture just occur in your timezone and are you now in hell? ;-)
2011-05-31 20:02:55 utc lbt_hel hartog: I assume you're making that assumption because you've seen some of my code?
2011-05-31 20:03:19 utc hartog ACTION grins
2011-05-31 20:03:56 utc hartog lbt_hel: no, there is an lbt and an lbt_hel in here.
2011-05-31 20:04:10 utc hartog but show me a gist and I might change my mind >;)
2011-05-31 20:04:15 utc lbt_hel ah... he wrote the good code :)
2011-05-31 20:05:54 utc lbt_hel I was sad to miss all the fun for the rapture... I was at the MeeGo conf in SF telling everyone about BOSS (and thanking jmettraux at the same time)
2011-05-31 20:06:34 utc lbt_hel (but FYI hel is for Helsinki)
2011-05-31 23:05:16 utc kitplummer hey guys. i'm dinking with getting ruote-amqp like support for stomp. actually trying to replicate the ping-pong experiment using stomp instead of amqp.
2011-05-31 23:05:31 utc kitplummer any interest? i can share.