| 2010-03-11 10:29:57 utc | irfn | Hi all |
| 2010-03-11 10:30:15 utc | irfn | new to workflows and ruote |
| 2010-03-11 10:31:30 utc | irfn | we are spiking usage in our company and have been having a hard time understanding ruote |
| 2010-03-11 10:31:53 utc | jmettraux | hi ! |
| 2010-03-11 10:32:22 utc | irfn | ok some "Basics" problem |
| 2010-03-11 10:32:52 utc | jmettraux | sorry, I'm in a meeting right now, I will answer as soon as possible (20 minutes maybe), please fire your questions |
| 2010-03-11 10:33:05 utc | irfn | sure no probs |
| 2010-03-11 10:33:19 utc | irfn | ill meanwhile post our questions |
| 2010-03-11 10:34:14 utc | jmettraux | if you have lots of questions, the mailing lists is probably better |
| 2010-03-11 10:40:38 utc | jmettraux | hello tosch_le |
| 2010-03-11 10:40:54 utc | jmettraux | irfn is here, he has a few questions, but I'm currently in a meeting |
| 2010-03-11 10:41:04 utc | jmettraux | maybe you could asnwer to irfn's questions |
| 2010-03-11 10:41:34 utc | irfn | ok here goes |
| 2010-03-11 10:41:52 utc | irfn | what is difference between a participant and a service |
| 2010-03-11 10:41:53 utc | tosch_le | hi irfn! |
| 2010-03-11 10:42:10 utc | irfn | hi tosch_le |
| 2010-03-11 10:43:31 utc | irfn | what is difference between a participant and a service? |
| 2010-03-11 10:45:41 utc | tosch_le | oups. that's related to ruote's core design, i'm not sure if my answer will suit. but i'll try anyway: |
| 2010-03-11 10:45:43 utc | tosch_le | a service is a part of code that's helping the engine to do the things it has to do. for instance, there's a logger which is implemented as service |
| 2010-03-11 10:46:29 utc | irfn | that makes sense |
| 2010-03-11 10:46:35 utc | tosch_le | a particpant only handles workitems it receives |
| 2010-03-11 10:46:55 utc | irfn | thats cool |
| 2010-03-11 10:47:05 utc | tosch_le | it has to be triggered in a process definition |
| 2010-03-11 10:47:13 utc | irfn | ok |
| 2010-03-11 10:47:29 utc | irfn | so if i define a participant |
| 2010-03-11 10:47:52 utc | irfn | is workitem a means to pass around parameters or results |
| 2010-03-11 10:48:01 utc | tosch_le | in short: services for general engine related stuff, participants for single workflow steps |
| 2010-03-11 10:48:11 utc | tosch_le | yes |
| 2010-03-11 10:48:18 utc | irfn | kool |
| 2010-03-11 10:48:35 utc | irfn | i am confused by engine vs workers |
| 2010-03-11 10:48:51 utc | irfn | what is the responsibility of an engine |
| 2010-03-11 10:49:10 utc | irfn | and where would yu use a worker |
| 2010-03-11 10:50:23 utc | jmettraux | an engine is virtual |
| 2010-03-11 10:50:27 utc | tosch_le | john likes to name 'engine' as dashboard |
| 2010-03-11 10:50:33 utc | jmettraux | engine = storage + worker |
| 2010-03-11 10:50:40 utc | tosch_le | the real work is done by the worker |
| 2010-03-11 10:50:41 utc | irfn | ah |
| 2010-03-11 10:50:47 utc | jmettraux | tosch_le : exactly :) I let you continue |
| 2010-03-11 10:51:18 utc | irfn | why would i require more than one worker |
| 2010-03-11 10:51:22 utc | tosch_le | so i should have said: services are for worker related stuff earlier |
| 2010-03-11 10:51:46 utc | tosch_le | to increase the throughput of your ruote instance, for instance |
| 2010-03-11 10:51:57 utc | tosch_le | but in most cases, that won't be necessary. |
| 2010-03-11 10:52:37 utc | irfn | that makes sense |
| 2010-03-11 10:53:31 utc | irfn | Is Storage used to persist the current state of the workflow? |
| 2010-03-11 10:54:31 utc | irfn | because i saw that one can add a Storage for a participant |
| 2010-03-11 10:54:35 utc | tosch_le | it's a very nice concept for apps which run in environments like passenger, where you can't be sure the process will run at every time. just make sure there's one worker independently from the app in the passender and your done |
| 2010-03-11 10:55:21 utc | tosch_le | the storage is used to persist the current state of all running processes, yes |
| 2010-03-11 10:55:31 utc | irfn | ok |
| 2010-03-11 10:55:48 utc | tosch_le | (and also to persist some other things like the configuration) |
| 2010-03-11 10:55:57 utc | irfn | but what would participant 'alice', Ruote::StorageParticipant |
| 2010-03-11 10:56:00 utc | irfn | mean |
| 2010-03-11 10:56:29 utc | irfn | this is a bit of code from RuoteKit configure block |
| 2010-03-11 10:56:34 utc | tosch_le | Ruote::StorageParticipant is a participant implementation which keeps workitems it receives in the storage |
| 2010-03-11 10:56:46 utc | tosch_le | yeah, i wrote that one ;-) |
| 2010-03-11 10:57:01 utc | irfn | :-) |
| 2010-03-11 10:57:39 utc | irfn | is this storage different than the storage of the worker |
| 2010-03-11 10:57:43 utc | tosch_le | i'll have to write something about participants: most participants receive workitems, process them in some way and immediately reply to the engine |
| 2010-03-11 10:57:49 utc | tosch_le | no, it isn't |
| 2010-03-11 10:58:21 utc | irfn | is it required? |
| 2010-03-11 10:58:27 utc | tosch_le | the storage participant is different: it receives a workitem and puts it in the storage |
| 2010-03-11 10:58:37 utc | tosch_le | what should be required? |
| 2010-03-11 10:58:48 utc | irfn | almost like a message log? |
| 2010-03-11 10:59:18 utc | irfn | i meant : is having a StorageParticipant required? |
| 2010-03-11 10:59:21 utc | tosch_le | you can access the stored items, handle them by yourself, save them to the storage or reply them to the engine so that the flow continues |
| 2010-03-11 10:59:38 utc | tosch_le | no, it isn't. if you don't need it, don't use it ;-) |
| 2010-03-11 11:00:06 utc | tosch_le | the storage participant is like a task list |
| 2010-03-11 11:01:20 utc | irfn | if a participant wants to reply to the engine saying a particular action as successful, |
| 2010-03-11 11:01:27 utc | tosch_le | it is most useful when human interaction is needed: humans won't wait for a workitem every second, they poll there task list some times, do their work and let the flow proceed |
| 2010-03-11 11:02:18 utc | irfn | does it have to add that information to the workitem and return the same to the engine? |
| 2010-03-11 11:02:43 utc | tosch_le | the engine itself doesn't really care about successful or not. ok, there are some error catching and replaying methods in ruote, but i'm not very much into them |
| 2010-03-11 11:03:15 utc | tosch_le | if you need to use that information in your workflow, you'll have to use a workitem field for that |
| 2010-03-11 11:04:03 utc | irfn | so if state of workitem is changed in one step of wworkflow |
| 2010-03-11 11:04:15 utc | irfn | is that accessible in the next |
| 2010-03-11 11:04:35 utc | irfn | for doing exclusive choice etc |
| 2010-03-11 11:05:16 utc | tosch_le | yes, it is. |
| 2010-03-11 11:05:49 utc | tosch_le | have a look at http://ruote.rubyforge.org/, just the first example |
| 2010-03-11 11:05:50 utc | irfn | and that is the intended use as well? |
| 2010-03-11 11:06:47 utc | irfn | ok |
| 2010-03-11 11:07:37 utc | tosch_le | the 'editor' participant there sets the workitem field 'not_ok'. in the process definition, it says: if there's a field named not_ok, then rewind to the beginning of the cursor statement. |
| 2010-03-11 11:08:29 utc | tosch_le | and yes, that's the intended use as far as i understood it |
| 2010-03-11 11:09:14 utc | irfn | ok thats cool |
| 2010-03-11 11:10:23 utc | tosch_le | it is ;-) |
| 2010-03-11 11:10:41 utc | tosch_le | may i ask you what you are trying to do with ruote? |
| 2010-03-11 11:10:53 utc | tosch_le | (i'm just curious) |
| 2010-03-11 11:12:09 utc | irfn | ok sure |
| 2010-03-11 11:12:54 utc | irfn | so i have a bunch of RESTful self contained services |
| 2010-03-11 11:13:48 utc | irfn | and i want to be able to trigger a sequence of them |
| 2010-03-11 11:14:13 utc | irfn | while passing around some data which are resturned by them |
| 2010-03-11 11:14:44 utc | tosch_le | and the sequence may change more often than the code should be changed? |
| 2010-03-11 11:14:58 utc | tosch_le | nice use case for ruote, it seems to me :-) |
| 2010-03-11 11:15:01 utc | irfn | and i also want to be able to revert all steps or restart from a point when there is an error |
| 2010-03-11 11:15:12 utc | irfn | yeah we figured as much |
| 2010-03-11 11:15:43 utc | irfn | we have well defined number of services |
| 2010-03-11 11:15:46 utc | tosch_le | so there's no human interaction needed, so i suppose you really don't need the storage participant |
| 2010-03-11 11:16:03 utc | irfn | yeah thats true |
| 2010-03-11 11:16:22 utc | irfn | but we may have a lot combinations of the sequences of the services |
| 2010-03-11 11:16:39 utc | tosch_le | ruote-jig and ruote-activeresource may be of interest |
| 2010-03-11 11:16:45 utc | irfn | most if the participants would be doing a RESTful POST |
| 2010-03-11 11:17:27 utc | irfn | and the next step may end up using some return from the previous |
| 2010-03-11 11:17:40 utc | irfn | yeah i checked route-jig |
| 2010-03-11 11:17:52 utc | irfn | havent seen ruote-activeresource yet |
| 2010-03-11 11:18:02 utc | irfn | will do that right away |
| 2010-03-11 11:18:28 utc | jmettraux | have to change location, bbiab |
| 2010-03-11 11:19:42 utc | irfn | so tosch_le |
| 2010-03-11 11:20:01 utc | irfn | is RuoteKit a good idea if we dont want to use sinatra |
| 2010-03-11 11:21:30 utc | tosch_le | ruotekit uses sinatra for its own views |
| 2010-03-11 11:21:41 utc | tosch_le | you won't get rk without it. |
| 2010-03-11 11:22:41 utc | tosch_le | rk is a nice pre-built env for using ruote from within web applications, but you don't have to use it |
| 2010-03-11 11:22:52 utc | irfn | so not much point in RuoteKit if i am writing a Rails application that encapsulates some workflows. |
| 2010-03-11 11:23:45 utc | tosch_le | it's ok to use rk even for that: you'll get some nice views inside the processes for free |
| 2010-03-11 11:24:00 utc | irfn | ah ok |
| 2010-03-11 11:24:02 utc | irfn | i want to write an application that exposes REST interface for triggering workflows |
| 2010-03-11 11:24:03 utc | tosch_le | john uses rk inside a rails app |
| 2010-03-11 11:24:18 utc | tosch_le | rk does that itself ;-) |
| 2010-03-11 11:24:50 utc | tosch_le | its a rest interface to ruote using json as data format |
| 2010-03-11 11:25:02 utc | irfn | hmm |
| 2010-03-11 11:25:10 utc | irfn | such as a POST to /worflows/my_fancy_workflow/runs |
| 2010-03-11 11:25:35 utc | irfn | would start my_fancy_workflow |
| 2010-03-11 11:25:38 utc | irfn | etc |
| 2010-03-11 11:25:47 utc | jmettraux_i | What is 'runs' ? |
| 2010-03-11 11:26:29 utc | irfn | so a workflow is run muliple times |
| 2010-03-11 11:26:38 utc | tosch_le | POST /_ruote/processes |
| 2010-03-11 11:26:40 utc | tosch_le | starts a workflow. you'll have to give the process definition in the params |
| 2010-03-11 11:27:04 utc | irfn | ok |
| 2010-03-11 11:27:38 utc | tosch_le | note: the process definition may be stored somewhere on the server (or nearly anywhere) and just pointed to as url in the params |
| 2010-03-11 11:28:11 utc | irfn | ah alright |
| 2010-03-11 11:29:13 utc | tosch_le | btw.: a lot combinations of the sequences of the services won't be a problem, you may use various workflow control patterns with ruote: http://ruote.rubyforge.org/patterns.html |
| 2010-03-11 11:30:46 utc | irfn | i checked the patterns bit and www.workflowpatterns.com/patterns/index.php |
| 2010-03-11 11:31:40 utc | irfn | is there any page on RuoteKit documentation apart from the github README |
| 2010-03-11 11:32:23 utc | tosch_le | yeah: the code ;-) |
| 2010-03-11 11:32:34 utc | irfn | thought i havent put in much effort to checkout ruote-kit yet so please excuse all the naive questions |
| 2010-03-11 11:32:35 utc | tosch_le | it's pretty straightforward. |
| 2010-03-11 11:32:40 utc | irfn | ok |
| 2010-03-11 11:33:05 utc | tosch_le | never mind, your questions are welcome |
| 2010-03-11 11:34:12 utc | irfn | thanks a lot. |
| 2010-03-11 11:35:43 utc | jmettraux | tosch_le: thanks a lot ! |
| 2010-03-11 12:53:17 utc | jmettraux | kennethk_: are you around ? |
| 2010-03-11 12:55:29 utc | kennethk_ | howdy howdy |
| 2010-03-11 12:55:36 utc | jmettraux | :) |
| 2010-03-11 12:56:07 utc | jmettraux | just to tell you that I've got good results with long polling and ruote-couch |
| 2010-03-11 12:56:20 utc | kennethkalmer | awesome ! |
| 2010-03-11 12:56:35 utc | kennethkalmer | lazy question, can you scope /_changes to a single database ? |
| 2010-03-11 12:56:48 utc | jmettraux | still have to test if it wakes up properly before a schedule has to be triggered |
| 2010-03-11 12:56:58 utc | jmettraux | answer : yes, that's what I use |
| 2010-03-11 12:57:10 utc | jmettraux | polling the msgs/_changes |
| 2010-03-11 12:57:52 utc | kennethkalmer | brilliant |
| 2010-03-11 12:58:26 utc | jmettraux | I'm going to push what I have (rufus-jig / ruote-couch) |
| 2010-03-11 12:58:45 utc | jmettraux | tomorrow I'm going to write tests about schedule + longpoll |
| 2010-03-11 13:20:53 utc | jmettraux | grr, that's brittle |
| 2010-03-11 13:21:07 utc | jmettraux | will continue tomorrow |
| 2010-03-11 13:21:11 utc | jmettraux | night ! |
| 2010-03-11 17:24:15 utc | der-dokctor | Hi all! :) |
| 2010-03-11 23:35:02 utc | jmettraux | der-dokctor: hi ! |
| 2010-03-11 23:35:27 utc | der-dokctor | hello John! :-) |
| 2010-03-11 23:36:02 utc | jmettraux | how are you doing ? |
| 2010-03-11 23:36:33 utc | der-dokctor | fine, thanks. And how about you? |
| 2010-03-11 23:36:44 utc | jmettraux | doing good, thank :) |
| 2010-03-11 23:38:05 utc | jmettraux | if there is nobody replying here, please [ab]use the mailing list |
| 2010-03-11 23:39:05 utc | der-dokctor | kenneth told me. And I did already |