| 2011-01-14 10:21:15 utc | mauko | hi |
| 2011-01-14 10:22:37 utc | tosch_le | mauko: hello and welcome to #ruote! |
| 2011-01-14 10:23:08 utc | mauko | hi tosch_le |
| 2011-01-14 10:23:27 utc | mauko | i enter here looking for some advice, could you provide me some? |
| 2011-01-14 10:23:37 utc | tosch_le | i can try |
| 2011-01-14 10:24:54 utc | mauko | i need to do some process, and after reading jmettraux post about workflow vs state machines, i don't know what suits for my needs |
| 2011-01-14 10:25:01 utc | mauko | look |
| 2011-01-14 10:26:42 utc | tosch_le | ok. what are your needs? |
| 2011-01-14 10:26:43 utc | mauko | http://pastie.org/1459436 |
| 2011-01-14 10:27:07 utc | mauko | i need to do a step-by-step acceptation process, with both user and admin intervention |
| 2011-01-14 10:28:04 utc | mauko | in the code example, submits are done by the user, and request_queues are done by the admin |
| 2011-01-14 10:28:16 utc | tosch_le | do you expect the process to change over time? |
| 2011-01-14 10:28:36 utc | mauko | sure, that's a vanilla idea of the process |
| 2011-01-14 10:28:51 utc | mauko | as the business does, the process should change too |
| 2011-01-14 10:31:40 utc | tosch_le | that would be a point for ruote, you don't need to change the code if the process changes, just the process definition |
| 2011-01-14 10:31:41 utc | tosch_le | i'll be back in a few minutes, have to talk to someone |
| 2011-01-14 10:31:41 utc | mauko | ok |
| 2011-01-14 10:31:49 utc | tosch_le | ok, i'm back. the process looks like a webflow to me. is that right? |
| 2011-01-14 10:34:55 utc | tosch_le | and it looks to me that you've already implemented a part of the code. does that work for you? |
| 2011-01-14 10:39:59 utc | mauko | i just mocket it up |
| 2011-01-14 10:40:03 utc | mauko | *mocked |
| 2011-01-14 10:40:20 utc | tosch_le | ok. |
| 2011-01-14 10:40:33 utc | tosch_le | do you have any special needs? |
| 2011-01-14 10:41:01 utc | mauko | its basicly like this: |
| 2011-01-14 10:42:41 utc | mauko | a user sends it's info through a form, and it qet queued to the admin to review, and then the admin send the user to other form |
| 2011-01-14 10:42:57 utc | mauko | then the user submit new info, |
| 2011-01-14 10:43:09 utc | mauko | and the process repeats that way |
| 2011-01-14 10:43:31 utc | mauko | and finally the admin "aproves" a user |
| 2011-01-14 10:43:57 utc | tosch_le | ok, that's what jmettraux calls a "webflow" |
| 2011-01-14 10:44:54 utc | tosch_le | ruote doesn't give you any user handling, you'd have to cover that in your app anyway. |
| 2011-01-14 10:45:29 utc | mauko | ah! the roles stuff, yeah that goes on my part. |
| 2011-01-14 10:46:00 utc | tosch_le | ruote would perfectly drive your process, but i don't see a point which would make me say "you really have to use ruote because it's better than a state engine" |
| 2011-01-14 10:46:19 utc | tosch_le | for your use case, i mean. |
| 2011-01-14 10:46:35 utc | mauko | good to know that |
| 2011-01-14 10:46:52 utc | tosch_le | only advantage is perhaps the point about changing the process definition |
| 2011-01-14 10:47:07 utc | mauko | are there route implementations examples ? |
| 2011-01-14 10:47:31 utc | mauko | i had found a lack of examples on the most of state machines gems |
| 2011-01-14 10:47:34 utc | mauko | :/ |
| 2011-01-14 10:49:10 utc | tosch_le | there's an examples dir: https://github.com/jmettraux/ruote/tree/ruote2.1/examples |
| 2011-01-14 10:50:18 utc | tosch_le | there's also https://github.com/threetee/ruote-rails-example , but that's adavanced, it uses amqp |
| 2011-01-14 10:51:03 utc | tosch_le | there's barley: http://jmettraux.wordpress.com/2010/01/29/barley/ |
| 2011-01-14 10:51:32 utc | tosch_le | and you'll find many examples in the docs section of the website: http://ruote.rubyforge.org/documentation.html |
| 2011-01-14 10:55:36 utc | mauko | nice |
| 2011-01-14 10:55:44 utc | mauko | i'll be reviewing those so |
| 2011-01-14 10:55:45 utc | mauko | :D |
| 2011-01-14 10:55:53 utc | mauko | thanks for your help |
| 2011-01-14 10:56:20 utc | tosch_le | you're welcome! |
| 2011-01-14 11:23:43 utc | mauko | btw |
| 2011-01-14 11:23:44 utc | mauko | https://github.com/tosch/ruote-on-rails |
| 2011-01-14 11:23:55 utc | mauko | that's a working example of yours? |
| 2011-01-14 11:25:38 utc | tosch_le | it's not really an example, it's just a starting point if you want to use ruote within a rails project |
| 2011-01-14 11:27:44 utc | mauko | i'm trying to figure out how goes the MVC in a rails 3 route implementation |
| 2011-01-14 11:28:11 utc | mauko | perhaps should review that code you wrote |
| 2011-01-14 11:28:43 utc | tosch_le | it goes it's usual way ;-) no need to change anything, there are just the process definitions in addition. |
| 2011-01-14 11:29:06 utc | tosch_le | jmettraux wrote a huge part of the example stuff which is in route-on-rails |
| 2011-01-14 11:30:26 utc | tosch_le | and yes, having a look at ruote-on-rails is a good idea. sorry that i forgot to mention it earlier. |
| 2011-01-14 13:49:31 utc | jmettraux | tosch_le: hello, many thanks for the help |
| 2011-01-14 13:55:40 utc | belucid | jmettraux, you here? |
| 2011-01-14 13:55:49 utc | jmettraux | hello, yes |
| 2011-01-14 13:55:57 utc | belucid | hey, how's it going |
| 2011-01-14 13:56:04 utc | jmettraux | going fine, and you ? |
| 2011-01-14 13:56:09 utc | belucid | going pretty well |
| 2011-01-14 13:56:23 utc | belucid | got a minute for some questions on ruote-couch? |
| 2011-01-14 13:56:45 utc | jmettraux | yes, but please let me tell you it's a slow thing |
| 2011-01-14 13:56:52 utc | belucid | :-) |
| 2011-01-14 13:56:56 utc | belucid | yup, I see that |
| 2011-01-14 13:57:01 utc | belucid | the slowness is not the question |
| 2011-01-14 13:57:09 utc | jmettraux | :-) |
| 2011-01-14 13:57:31 utc | belucid | so... ensure_msgs_thread_is_running and ensure_schedules_thread_is_running |
| 2011-01-14 13:57:37 utc | belucid | in storage.rb |
| 2011-01-14 13:57:47 utc | belucid | are setting up 2 long polls |
| 2011-01-14 13:58:03 utc | belucid | on ruote_schedules/_changes?feed=continuous&heartbeat=20000&include_docs=true 200 for example |
| 2011-01-14 13:58:07 utc | belucid | for schedules |
| 2011-01-14 13:58:14 utc | belucid | they are not behaving :-( |
| 2011-01-14 13:58:26 utc | belucid | works fine in my browser... I can long poll on those all day |
| 2011-01-14 13:58:36 utc | jmettraux | which version of ruote-couch are you using ? |
| 2011-01-14 13:59:01 utc | belucid | uhh... master in github |
| 2011-01-14 13:59:09 utc | jmettraux | ok |
| 2011-01-14 13:59:16 utc | belucid | I get a closed stream (IOError) |
| 2011-01-14 13:59:30 utc | belucid | from rufus jig |
| 2011-01-14 14:00:04 utc | belucid | couch.rb:340 |
| 2011-01-14 14:00:28 utc | jmettraux | ? |
| 2011-01-14 14:00:59 utc | jmettraux | https://github.com/jmettraux/ruote-couch/blob/ccb5797ca2b48fd20ca3cf3456f3b53cc4684baa/lib/ruote/couch.rb |
| 2011-01-14 14:01:12 utc | belucid | sorry |
| 2011-01-14 14:01:24 utc | belucid | there is also a couch.rb in rufus-jig gem |
| 2011-01-14 14:01:35 utc | belucid | which is used by ruote-couch |
| 2011-01-14 14:01:50 utc | jmettraux | could you please gist the stack trace ? |
| 2011-01-14 14:01:57 utc | jmettraux | what operating system ? |
| 2011-01-14 14:02:01 utc | jmettraux | which version of ruby ? |
| 2011-01-14 14:02:08 utc | belucid | 1.9.2 |
| 2011-01-14 14:02:10 utc | belucid | OS X |
| 2011-01-14 14:02:19 utc | jmettraux | what's different from your browser ? Is the couch local ? |
| 2011-01-14 14:02:39 utc | belucid | yes, couch is local |
| 2011-01-14 14:02:40 utc | belucid | https://gist.github.com/cedb3513bd51007889e8 |
| 2011-01-14 14:02:53 utc | belucid | ignore the line # on storage.rb |
| 2011-01-14 14:02:55 utc | jmettraux | some kind of authentication ? |
| 2011-01-14 14:03:12 utc | belucid | my line #'s changed because of debug statements |
| 2011-01-14 14:03:29 utc | belucid | it's this line: @dbs['schedules'].couch.on_change do |_, deleted, doc| |
| 2011-01-14 14:03:50 utc | jmettraux | what does couch say ? |
| 2011-01-14 14:04:04 utc | jmettraux | wait |
| 2011-01-14 14:04:14 utc | jmettraux | what are the exact symptoms ? |
| 2011-01-14 14:04:26 utc | jmettraux | do you start it and it immediately crashes ? |
| 2011-01-14 14:04:40 utc | belucid | yes... the participant immediately crashes |
| 2011-01-14 14:04:55 utc | belucid | let me bounce couch so I can get you a clean gist of what it says is going on |
| 2011-01-14 14:04:57 utc | belucid | 1 sec. |
| 2011-01-14 14:04:58 utc | jmettraux | not possible |
| 2011-01-14 14:05:04 utc | belucid | lol |
| 2011-01-14 14:05:07 utc | belucid | not possible? |
| 2011-01-14 14:05:10 utc | jmettraux | the participant has nothing to do with that |
| 2011-01-14 14:05:14 utc | belucid | I'll show you |
| 2011-01-14 14:05:54 utc | belucid | here is my AMQP participant crashing on startup: |
| 2011-01-14 14:05:55 utc | belucid | https://gist.github.com/a295b676124a9b281d4f |
| 2011-01-14 14:06:26 utc | jmettraux | ? |
| 2011-01-14 14:06:48 utc | jmettraux | the participant is not supposed to do long polls |
| 2011-01-14 14:07:27 utc | jmettraux | what you're showing me is participant registration followed by the worker attempting to watch for schedules |
| 2011-01-14 14:07:43 utc | belucid | hmmm |
| 2011-01-14 14:08:05 utc | belucid | I'm just running a regular ole daemon-kit ruote AMQP daemon |
| 2011-01-14 14:08:43 utc | belucid | what do I need to do to that to make it not watch for schedules? |
| 2011-01-14 14:08:50 utc | belucid | ohh |
| 2011-01-14 14:08:51 utc | belucid | hmm |
| 2011-01-14 14:08:53 utc | belucid | actually |
| 2011-01-14 14:08:53 utc | belucid | yes |
| 2011-01-14 14:08:55 utc | belucid | :-) |
| 2011-01-14 14:09:08 utc | belucid | that is my launcher I showed you |
| 2011-01-14 14:09:17 utc | belucid | it watches a raw rabbitmq queue |
| 2011-01-14 14:09:23 utc | belucid | and launches new workflows |
| 2011-01-14 14:09:36 utc | belucid | it also runs the worker |
| 2011-01-14 14:09:49 utc | jmettraux | the worker crashes |
| 2011-01-14 14:09:51 utc | belucid | my bad |
| 2011-01-14 14:09:52 utc | belucid | yes |
| 2011-01-14 14:11:36 utc | belucid | so |
| 2011-01-14 14:11:46 utc | belucid | from my couch output: |
| 2011-01-14 14:12:10 utc | belucid | https://gist.github.com/9ab035abe6a5f82fa6a6 |
| 2011-01-14 14:12:21 utc | belucid | it seems like the 2 long polls start up just fine |
| 2011-01-14 14:12:34 utc | belucid | but then the socket gets closed at some point |
| 2011-01-14 14:12:43 utc | jmettraux | what version of couch ? |
| 2011-01-14 14:12:55 utc | belucid | and that exception bubbles all the way up until it crashes the worker |
| 2011-01-14 14:12:58 utc | belucid | 1.0.1 |
| 2011-01-14 14:13:02 utc | jmettraux | ok |
| 2011-01-14 14:13:51 utc | jmettraux | could you please turn the log output level to debug for couch and try again ? |
| 2011-01-14 14:15:17 utc | belucid | yup |
| 2011-01-14 14:16:39 utc | jmettraux | ruby 1.9.2 p136 ? |
| 2011-01-14 14:18:31 utc | belucid | p0 |
| 2011-01-14 14:19:37 utc | jmettraux | ok, launching the test suite with it |
| 2011-01-14 14:24:53 utc | belucid | here's couch debug output: https://gist.github.com/a11c04d723137e57d16a |
| 2011-01-14 14:24:55 utc | jmettraux | all green, a hundred so far |
| 2011-01-14 14:26:42 utc | belucid | which tests are you running? ruote-couch's? |
| 2011-01-14 14:27:19 utc | jmettraux | ruote's functional tests with ruote-couch as the storage |
| 2011-01-14 14:27:40 utc | belucid | k... |
| 2011-01-14 14:28:32 utc | jmettraux | preparing something for you to run |
| 2011-01-14 14:28:37 utc | belucid | k |
| 2011-01-14 14:32:33 utc | jmettraux | belucid: could you please try that on your system https://gist.github.com/779672 ? |
| 2011-01-14 14:32:38 utc | belucid | yup |
| 2011-01-14 14:39:24 utc | belucid | while I'm trying that |
| 2011-01-14 14:39:28 utc | belucid | take a look at this: |
| 2011-01-14 14:39:30 utc | belucid | https://gist.github.com/187447b456c9ab5a5ec2 |
| 2011-01-14 14:39:34 utc | belucid | seems to address the problem |
| 2011-01-14 14:39:41 utc | belucid | but curious about your thoughts on it |
| 2011-01-14 14:40:59 utc | jmettraux | looks nice |
| 2011-01-14 14:41:13 utc | belucid | k |
| 2011-01-14 14:41:17 utc | jmettraux | how does it behave when couch is down ? |
| 2011-01-14 14:41:23 utc | belucid | good ? |
| 2011-01-14 14:41:26 utc | belucid | I'll try it |
| 2011-01-14 14:41:35 utc | jmettraux | does it become a machinegun ? |
| 2011-01-14 14:41:54 utc | belucid | probably... |
| 2011-01-14 14:42:06 utc | belucid | need to limit the retry attempts I think |
| 2011-01-14 14:42:16 utc | jmettraux | ok |
| 2011-01-14 14:42:21 utc | belucid | so... the test you gave me seemed to run fine |
| 2011-01-14 14:42:28 utc | jmettraux | great |
| 2011-01-14 14:42:43 utc | jmettraux | it's weird that your thing is failing |
| 2011-01-14 14:42:45 utc | belucid | https://gist.github.com/a63ef52f509d02f08bad |
| 2011-01-14 14:42:54 utc | jmettraux | running fine |
| 2011-01-14 14:43:51 utc | jmettraux | I don't understand the part where you're running a remote participant together with a worker |
| 2011-01-14 14:44:06 utc | jmettraux | ruote-amqp remote participant are eventmachine based |
| 2011-01-14 14:44:18 utc | jmettraux | maybe some conflict |
| 2011-01-14 14:44:32 utc | belucid | well, I'm not... my bad |
| 2011-01-14 14:44:36 utc | belucid | I described it wrong |
| 2011-01-14 14:44:36 utc | jmettraux | still a remote participant is not meant to run side by side with a worker |
| 2011-01-14 14:44:39 utc | jmettraux | ok |
| 2011-01-14 14:45:22 utc | belucid | it's a worker and a launcher |
| 2011-01-14 14:45:27 utc | belucid | not a remote participant |
| 2011-01-14 14:46:18 utc | belucid | I'll show you what it is: |
| 2011-01-14 14:46:42 utc | belucid | https://gist.github.com/789e7de48d072ad8f9b3 |
| 2011-01-14 14:47:26 utc | jmettraux | ok |
| 2011-01-14 14:47:33 utc | belucid | it's watching a Rabbit queue for incoming messages to create new work items for |
| 2011-01-14 14:47:40 utc | belucid | and it's running the receiver |
| 2011-01-14 14:48:17 utc | jmettraux | looks alright |
| 2011-01-14 14:48:51 utc | belucid | yeah... so, not sure why that long poll socket ends up closing |
| 2011-01-14 14:49:00 utc | belucid | but with a safer retry, I think I'll be in good shape |
| 2011-01-14 14:49:12 utc | jmettraux | yes, this retry is good |
| 2011-01-14 14:49:25 utc | jmettraux | especially if it seems to work :-) |
| 2011-01-14 14:49:28 utc | belucid | while I have you, any chance you can publish the ruote-amqp 2.1.11 gem to rubygems? |
| 2011-01-14 14:49:44 utc | belucid | only 2.1.5 is out there |
| 2011-01-14 14:49:50 utc | jmettraux | ah true |
| 2011-01-14 14:50:08 utc | belucid | causing me no end of pain with bundle install on my different development and staging and QA and production and blah blah |
| 2011-01-14 14:50:09 utc | jmettraux | I'm working on 2.1.12 for the whole menagerie |
| 2011-01-14 14:50:32 utc | belucid | I was going to have to fork it and publish it just to make my pain go away |
| 2011-01-14 14:50:40 utc | jmettraux | really ? with bundler you can point to any commit on github, even in production |
| 2011-01-14 14:50:53 utc | belucid | hmmmmm |
| 2011-01-14 14:50:57 utc | belucid | alright |
| 2011-01-14 14:51:04 utc | belucid | that's what I need to do I guess |
| 2011-01-14 14:51:06 utc | belucid | good to know |
| 2011-01-14 14:51:15 utc | belucid | this is my first Rails 3, bundler project |
| 2011-01-14 14:51:26 utc | jmettraux | https://gist.github.com/779672 |
| 2011-01-14 14:51:30 utc | belucid | didn't realize it was so cool like that |
| 2011-01-14 14:51:48 utc | jmettraux | yes, it's very clever |
| 2011-01-14 14:51:55 utc | belucid | were you meaning to gist me something different? |
| 2011-01-14 14:52:00 utc | belucid | that was the test code |
| 2011-01-14 14:52:09 utc | jmettraux | ah sorry |
| 2011-01-14 14:52:13 utc | belucid | no worries |
| 2011-01-14 14:52:15 utc | jmettraux | http://gembundler.com/git.html |
| 2011-01-14 14:52:31 utc | belucid | nice |
| 2011-01-14 14:52:33 utc | belucid | ok |
| 2011-01-14 14:52:38 utc | belucid | going with that then |
| 2011-01-14 14:52:48 utc | belucid | consider my publish 2.1.11 request satisfied! |
| 2011-01-14 14:52:50 utc | belucid | :-) |
| 2011-01-14 14:52:56 utc | jmettraux | it's deadly acurate |
| 2011-01-14 14:53:23 utc | belucid | thanks for all the help... if I robust up the retry, is that something you'd be willing to pull into ruote-couch? |
| 2011-01-14 14:55:42 utc | jmettraux | yes, I'll double-check it |
| 2011-01-14 14:55:47 utc | jmettraux | and merge it |
| 2011-01-14 14:56:05 utc | jmettraux | many thanks |
| 2011-01-14 14:56:15 utc | belucid | ok... I'll get it right when couch is down or goes down, then I'll issue a request to you |
| 2011-01-14 14:56:19 utc | belucid | no, many thanks to you |
| 2011-01-14 14:56:24 utc | belucid | this has been most helpful |
| 2011-01-14 14:56:54 utc | jmettraux | great |
| 2011-01-14 14:57:56 utc | belucid | you'll soon have bragging rights that ruote powers the hottest new startup on the East coast... the one that Google and Facebook are having a billion dollar bidding war over |
| 2011-01-14 14:58:02 utc | belucid | or... something like that :-) |
| 2011-01-14 14:58:02 utc | belucid | lol |
| 2011-01-14 14:58:23 utc | jmettraux | well, that's a lot of hard work for you before that ;-) |
| 2011-01-14 14:58:40 utc | jmettraux | and it's ruby, not erlang |
| 2011-01-14 15:00:31 utc | belucid | yeah... not really, but like I said last week, ruote really is the linchpin in our backend right now, so I'm much obliged to the great work you've done here |
| 2011-01-14 15:00:53 utc | belucid | If it weren't for ruote we'd be pulling in some Java monstrosity |
| 2011-01-14 15:00:54 utc | jmettraux | :-) please do your boest |
| 2011-01-14 15:00:56 utc | jmettraux | best |
| 2011-01-14 15:01:04 utc | belucid | and the peasants would be weeping |