ruote log_2010-02-10

2010-02-10 06:44:22 utc anb_ Hello everyone
2010-02-10 06:44:27 utc jmettraux Hello !
2010-02-10 06:45:10 utc tosch_le Hi!
2010-02-10 06:45:58 utc jmettraux tosch_le : I'll work a bit later tonight on engine#configure
2010-02-10 06:46:30 utc tosch_le Thanks. No need to hurry :-)
2010-02-10 07:08:48 utc tosch_le thinking about engine#configure, i suppose a truly working solution will be really hard. thought about a message to notify the other engines about the new config, but that will only work for engines with attached workers. worker-less engines will never process those messages, won't they?
2010-02-10 07:33:36 utc tosch_le ruote-on-rails has a (working) rails3 branch now
2010-02-10 07:33:55 utc jmettraux back from espresso
2010-02-10 07:36:53 utc jmettraux tosch_le : about configure, I was looking at http://github.com/jmettraux/ruote/blob/ruote2.1/lib/ruote/context.rb#L41-68
2010-02-10 07:37:41 utc jmettraux and thinking I'll probably write something that writes and read to the storage directly
2010-02-10 07:38:21 utc jmettraux except for "s_xxx" which are services and not configuration items
2010-02-10 07:38:37 utc jmettraux so that once you write, it's for everybody
2010-02-10 07:39:10 utc jmettraux I was kind of liking the actual way, were configuration only occurs at start time
2010-02-10 07:39:25 utc jmettraux but since a worker can be started at any time (later)
2010-02-10 07:39:33 utc jmettraux engine#configure is legitimate
2010-02-10 07:39:36 utc jmettraux .
2010-02-10 07:39:47 utc jmettraux congrats for the rails3 branch
2010-02-10 07:49:01 utc kennethkalmer afternoon/morning guys
2010-02-10 07:49:08 utc jmettraux morning !
2010-02-10 07:49:13 utc jmettraux coffee ?
2010-02-10 07:49:19 utc tosch_le hi kenneth!
2010-02-10 07:49:22 utc kennethkalmer dopio :)
2010-02-10 07:49:28 utc kennethkalmer erm, doppio :)
2010-02-10 07:49:35 utc jmettraux ACTION emits doppio to Kenneth
2010-02-10 07:49:46 utc kennethkalmer ACTION consumes
2010-02-10 07:49:46 utc jmettraux ACTION emits tea for Torsten
2010-02-10 07:50:05 utc tosch_le ACTION consumes
2010-02-10 07:50:11 utc tosch_le thanks :-)
2010-02-10 07:50:20 utc jmettraux you're welcome :)
2010-02-10 07:51:02 utc tosch_le snowflakes are gently falling down through the air outside...
2010-02-10 07:51:45 utc kennethkalmer nice
2010-02-10 07:52:51 utc tosch_le no, it isn't. it's cold, wet, slippery. i'm fed up with the winter here ;-)
2010-02-10 07:54:01 utc kennethkalmer well, I still have to experience the novelty of snow, so pardon my ignorance ;)
2010-02-10 07:57:48 utc tosch_le still in shit storm at work?
2010-02-10 08:00:35 utc kennethkalmer kinda winding down
2010-02-10 08:00:42 utc kennethkalmer the last few days was epic
2010-02-10 08:00:51 utc kennethkalmer too much happening all over the show
2010-02-10 08:01:00 utc kennethkalmer from billing, to infrastructure, to failovers failing
2010-02-10 08:01:18 utc kennethkalmer hoping today I can quickly chef for DNS nodes
2010-02-10 08:01:29 utc kennethkalmer and then carry on with /participants and /errors
2010-02-10 08:01:36 utc kennethkalmer as well as documentation updates for bundler
2010-02-10 08:02:44 utc tosch_le sounds great.
2010-02-10 08:03:07 utc tosch_le drop a line if i can help at any point.
2010-02-10 08:03:38 utc kennethkalmer definitely
2010-02-10 08:38:36 utc jmettraux kennethkalmer: do you see synergies between chef and ruote ?
2010-02-10 08:39:07 utc kennethkalmer truthfully, none really
2010-02-10 08:39:24 utc kennethkalmer it saddens me in fact
2010-02-10 08:39:32 utc kennethkalmer maybe with chef-solo there is potential
2010-02-10 08:39:51 utc kennethkalmer actaully, with chef-solo there is a lot of potential
2010-02-10 08:40:04 utc kennethkalmer but chef itself is not a 'fire and forget' scenario
2010-02-10 08:40:30 utc kennethkalmer hmmm
2010-02-10 08:40:47 utc jmettraux :)
2010-02-10 08:40:52 utc kennethkalmer another option is to have a participant that manipulates chef-server through the api
2010-02-10 08:40:59 utc kennethkalmer that could work
2010-02-10 08:43:58 utc jmettraux could recipes be business processes ?
2010-02-10 08:46:51 utc kennethkalmer nope
2010-02-10 08:46:59 utc kennethkalmer recipes describe the state of the machine
2010-02-10 08:47:10 utc jmettraux aaah
2010-02-10 08:47:13 utc kennethkalmer totally imdepotent
2010-02-10 08:47:15 utc kennethkalmer however
2010-02-10 08:47:41 utc kennethkalmer a participant could be used to apply recipes to a node
2010-02-10 08:47:52 utc kennethkalmer or update the attributes of a node
2010-02-10 08:48:04 utc jmettraux *)
2010-02-10 08:48:06 utc jmettraux :)[
2010-02-10 08:48:09 utc jmettraux aaargh
2010-02-10 08:48:10 utc kennethkalmer ;)
2010-02-10 08:48:12 utc jmettraux :) I Mean
2010-02-10 08:48:18 utc kennethkalmer speed wobbles
2010-02-10 08:48:58 utc kennethkalmer if i stumble across a synergy, i will pursue it
2010-02-10 08:50:32 utc jmettraux If you want/need it
2010-02-10 09:29:16 utc anb_ before I look further, any known problems with workitems list for a given process in latest ruote-kit ?
2010-02-10 09:29:59 utc jmettraux /workitems/:wfid ?
2010-02-10 09:30:06 utc anb_ yes
2010-02-10 09:30:36 utc anb_ was working, I pulled lastest git and know I'm getting an error at storage_participant
2010-02-10 09:30:41 utc anb_ *now
2010-02-10 09:30:54 utc anb_ but I probably messed something up
2010-02-10 09:30:58 utc jmettraux http://github.com/kennethkalmer/ruote-kit/commit/6422e9aaeeb7e114ff72f939630af84d8352f4c6
2010-02-10 09:31:10 utc jmettraux fresh commit by tosch_le
2010-02-10 09:32:03 utc jmettraux http://github.com/kennethkalmer/ruote-kit/blob/6422e9aaeeb7e114ff72f939630af84d8352f4c6/lib/ruote-kit/resources/workitems.rb#L25-33
2010-02-10 09:32:18 utc kennethkalmer your ruote version on 2.1.6 ?
2010-02-10 09:32:31 utc anb_ 2.1.5
2010-02-10 09:32:56 utc anb_ maybe I should pull your ruote, kenneth ? since I'm using it through ruote-kit mostly
2010-02-10 09:33:14 utc anb_ and thanks John, you're fast :)
2010-02-10 09:33:14 utc kennethkalmer 2.1.6, mine is a bit behind
2010-02-10 09:33:20 utc kennethkalmer i'm playing catchup
2010-02-10 09:33:36 utc anb_ oki
2010-02-10 09:33:59 utc jmettraux you're welcome
2010-02-10 09:34:37 utc tosch_le updating to ruote 2.1.6 should help. stumpled upon that yesterday
2010-02-10 09:35:19 utc anb_ yes, it is working now with 2.1.6
2010-02-10 09:41:55 utc jmettraux great !
2010-02-10 10:07:00 utc anb_ feature request : I would be interested in having participant.by_field available in the ruote-kit get "/_ruote/workitems. or maybe I can just fork ruote-kit right ?
2010-02-10 10:07:39 utc tosch_le right ;-)
2010-02-10 10:09:08 utc anb_ at the moment you can do /_ruote/workitems?participant=someparticipant ... would it be confusing to have /_ruote/workitems?anystring=anyvalue and it would search by_field anystring with value any value ?
2010-02-10 10:10:52 utc jmettraux sounds alright
2010-02-10 10:11:06 utc tosch_le what about /_ruote/workitems?field[foo]=bar ?
2010-02-10 10:11:23 utc tosch_le s/field/fields/
2010-02-10 10:11:37 utc tosch_le more verbose
2010-02-10 10:12:02 utc jmettraux participant= implies you shouldn't name a field 'participant'
2010-02-10 10:12:20 utc anb_ that's why I was afraid of it being a little confusing
2010-02-10 10:12:43 utc tosch_le ?fields[participant]=searchstring
2010-02-10 10:12:45 utc tosch_le would work ;-)
2010-02-10 10:12:51 utc jmettraux :)
2010-02-10 10:13:08 utc jmettraux but I love the simple ?fieldname=fieldvalue
2010-02-10 10:13:17 utc jmettraux (but it's only me)
2010-02-10 10:14:13 utc jmettraux ?f:xxx=yyy
2010-02-10 10:14:32 utc jmettraux is 1:1 with process definitions
2010-02-10 10:15:01 utc anb_ and should allow ?f:xxx=yyy&participant=someparticipant
2010-02-10 10:15:26 utc jmettraux checking if ":" is authorized
2010-02-10 10:16:34 utc anb_ I think it should be encoded
2010-02-10 10:16:44 utc jmettraux http://tools.ietf.org/html/rfc3986#section-2.2 yes
2010-02-10 10:17:04 utc tosch_le will ?f:foo=bar&f:gnu=gna&participant=moo,mee,maa work?
2010-02-10 10:17:28 utc jmettraux ?fields[fieldname]=fieldvalue looks good
2010-02-10 10:17:57 utc jmettraux sincerely I would go ?fieldname=fieldvalue, but it's your decision guys
2010-02-10 10:18:40 utc jmettraux Kenneth: wdyt ?
2010-02-10 10:19:14 utc anb_ tosh_le, yes I would like to "and" the criterion
2010-02-10 10:19:21 utc anb_ if possible
2010-02-10 10:19:31 utc anb_ but we shouldn't use the colon in the url
2010-02-10 10:19:47 utc anb_ brackets are fine I think
2010-02-10 10:20:08 utc kennethkalmer i also think brackets are fine for scoping
2010-02-10 10:20:18 utc jmettraux beware of web frameworks that use them for nested fields
2010-02-10 10:20:49 utc kennethkalmer participant=foo <- participant name, or participant field
2010-02-10 10:21:02 utc kennethkalmer if participant field, rk would be hardcoded to participant name
2010-02-10 10:21:14 utc kennethkalmer hence field[participant] might be more clear
2010-02-10 10:21:22 utc kennethkalmer just my 2c
2010-02-10 10:21:37 utc anb_ yes but what's the likelyhood of having a field named participant
2010-02-10 10:21:47 utc anb_ but who knows :)
2010-02-10 10:21:58 utc kennethkalmer we only have to worry about sinatra in the case of nested params
2010-02-10 10:22:06 utc jmettraux not rails ?
2010-02-10 10:22:07 utc tosch_le its not entirely unlikely.
2010-02-10 10:22:36 utc tosch_le (the field named 'participant', i mean)
2010-02-10 10:22:43 utc anb_ yup
2010-02-10 10:23:13 utc tosch_le just think about a user registration process or stuff like that. i could imagine naming a field 'participant' in there
2010-02-10 10:24:24 utc jmettraux ok
2010-02-10 10:24:58 utc anb_ I'll fork rk and go with ?fields[fieldname]=value
2010-02-10 10:25:03 utc anb_ thanks guys
2010-02-10 10:25:19 utc jmettraux ok
2010-02-10 10:25:27 utc jmettraux RK team OK ?
2010-02-10 10:25:29 utc tosch_le do we really have to worry about the brackets? sinatra will fill the params array for us in a convenient way IIRC:
2010-02-10 10:25:31 utc tosch_le params = {'fields' => {'foo' => 'bar', 'gnu' => 'gna'}, 'participant' => 'mee,moo,maa'}
2010-02-10 10:27:07 utc tosch_le looking forward to see the commit(s). unsure if you should fork my repository or wait for kenneth to answer my pull request?
2010-02-10 10:27:47 utc kennethkalmer it is git, i'll get the commits :)
2010-02-10 10:28:18 utc kennethkalmer jmettraux: because of rk being middleware, rails never gets access to /_ruote/*
2010-02-10 10:28:32 utc kennethkalmer and rails is a good rack citizen
2010-02-10 10:28:41 utc jmettraux excellent
2010-02-10 10:29:36 utc jmettraux have to relocate, tosch_le, I'm working hard on engine#configure (well rather on what lies under it)
2010-02-10 10:31:38 utc tosch_le kenneth: rails gets access to /_ruote/* -- example: /_ruote/xxx yields a rails routing error
2010-02-10 10:31:54 utc kennethkalmer only because sinatra 404's
2010-02-10 10:32:13 utc kennethkalmer if sinatra 200's it doesn't touch action_controller
2010-02-10 10:32:21 utc tosch_le true.
2010-02-10 10:32:26 utc tosch_le fortunately :-)
2010-02-10 10:32:39 utc kennethkalmer :)
2010-02-10 10:33:15 utc tosch_le ACTION wonders if there is a workaround for the annoying rspec bug
2010-02-10 11:09:19 utc tosch_le hmm. tracked the error down to line 69 in spec/spec_helper.rb. still 16 failures left -- when in specs, rk seems to miss the workitems. sleeping longer after launching the processes doesn't help
2010-02-10 11:34:35 utc tosch_le out for launch. ttyl.
2010-02-10 11:34:41 utc jmettraux ciao !
2010-02-10 12:17:11 utc anb_ do you think it would be hard to add support for inner fields in storage_participant.by_field ? for example storage_participant('myhash.myotherhash.mykey',value) ?
2010-02-10 12:17:46 utc jmettraux then it should work with all the storages (hash, fs, dm, couch)
2010-02-10 12:18:23 utc jmettraux it's super naive for now, since it goes like "if it's important, then there is a top-level field for it"
2010-02-10 12:18:35 utc jmettraux s/important/query-worth/
2010-02-10 12:19:32 utc anb_ yeah
2010-02-10 12:19:46 utc anb_ maybe it's not worth it
2010-02-10 12:20:33 utc jmettraux I understand the need though
2010-02-10 12:21:36 utc jmettraux also, it's OK to have too much at first and then filter on the "client-side"
2010-02-10 12:21:54 utc anb_ probably, yes
2010-02-10 12:22:13 utc jmettraux critics/suggestions/chocolate are welcome
2010-02-10 12:22:32 utc anb_ however I have a bunch of variables in the same container/hash that I set when starting the process and I copy to the workitems
2010-02-10 12:22:51 utc anb_ hehe you're missing our swiss chocolate
2010-02-10 12:23:01 utc jmettraux :]
2010-02-10 12:24:53 utc jmettraux 3.5 years only
2010-02-10 12:25:40 utc tosch_le ACTION is driven crazy by rspec
2010-02-10 12:26:15 utc jmettraux tosch_le: welcome back, I'm about to commit / push the configure changes
2010-02-10 12:26:42 utc tosch_le ACTION is back from launch (pancakes with blueberries, vanilla ice cream and apple sauce)
2010-02-10 12:26:54 utc jmettraux argh
2010-02-10 12:27:02 utc jmettraux sounds delicious !
2010-02-10 12:27:09 utc tosch_le so sorry ;-)
2010-02-10 12:27:14 utc jmettraux :)
2010-02-10 12:29:40 utc jmettraux tosch_le: http://github.com/jmettraux/ruote/commits/ruote2.1/
2010-02-10 12:30:39 utc jmettraux I moved most of the work from engine.rb to context.rb
2010-02-10 12:31:20 utc jmettraux muchas gracias
2010-02-10 12:32:04 utc tosch_le never mind, you did most of the work. thanks!
2010-02-10 12:34:06 utc jmettraux anb_ : of course, nothing prevents you from refining your persistence mecha so that it supports advanced queries
2010-02-10 12:35:33 utc jmettraux sometimes, there is the other way : a workitem references a resource (document, record, ...), you do a complex query on the resource store and once you have the ids, you look for the ruote workitems pointing to that resource
2010-02-10 12:36:14 utc jmettraux "is that resource currently being 'workflowed', if yes, which are the processes/workitems ?"
2010-02-10 12:37:28 utc anb_ sorry was afk
2010-02-10 12:37:47 utc jmettraux no worries, I was thinking out loud
2010-02-10 12:38:58 utc anb_ yes I could have a minimum of info about the resource being workflowed in the store and query somewhere else
2010-02-10 12:39:15 utc anb_ we'll see
2010-02-10 12:39:29 utc jmettraux tosch_le: tell me if/when you need a 2.1.7 release with the #configure
2010-02-10 12:39:50 utc anb_ I like the simplicity of having to query against rk only
2010-02-10 12:39:57 utc jmettraux ;)
2010-02-10 12:40:02 utc jmettraux ok
2010-02-10 12:40:26 utc jmettraux ACTION wanted to do a simple :) simple
2010-02-10 13:23:44 utc tosch_le ACTION dances like a hippogriff -- he has found a workaround for the annoying rspec bug
2010-02-10 13:24:02 utc jmettraux what is it ?
2010-02-10 13:26:08 utc tosch_le i just undef :context. rspec seems to bind its context method (its an alias for define) to Object. so object.respond_to?(:context) returns true in the storage participant yielding epic errors...
2010-02-10 13:26:54 utc jmettraux ok
2010-02-10 13:30:08 utc tosch_le http://github.com/tosch/ruote-kit/commit/24bbccc1d5334567bc32be40643d158030207251#L1R3
2010-02-10 13:30:43 utc jmettraux great
2010-02-10 13:31:16 utc tosch_le yeah, all tests green now.
2010-02-10 13:31:50 utc tosch_le have a look at http://github.com/tosch/ruote-kit/commit/24bbccc1d5334567bc32be40643d158030207251#L0R109 , too.
2010-02-10 13:32:22 utc tosch_le seems that caching the storage participant instance was a bad idea together with in memory storage
2010-02-10 13:32:48 utc tosch_le the workitem list was just empty in the tests
2010-02-10 13:33:11 utc jmettraux I wonder
2010-02-10 13:34:00 utc jmettraux the 'caching' should work just fine
2010-02-10 13:37:05 utc tosch_le it didn't. the engine itself could 'see' the workitems (ok, i could see them in @h of the attached storage instance), the worker could see them, but the storage participant instance couldn't.
2010-02-10 13:37:28 utc tosch_le shit, should have had a look on the storage instances' object ids
2010-02-10 13:37:39 utc jmettraux +1
2010-02-10 13:39:35 utc tosch_le (rdb:1) pp RuoteKit.storage_participant.context.storage.object_id
2010-02-10 13:39:37 utc tosch_le -612440538
2010-02-10 13:39:39 utc tosch_le (rdb:1) pp RuoteKit.engine.context.storage.object_id
2010-02-10 13:39:41 utc tosch_le -613077148
2010-02-10 13:39:46 utc tosch_le they are different
2010-02-10 13:41:16 utc jmettraux explains it
2010-02-10 13:42:38 utc tosch_le yeah, and i found the reason. the storage is purged after each spec example, but the storage participant instance refers to the old storage
2010-02-10 13:42:55 utc tosch_le got the cached version working now
2010-02-10 13:43:20 utc jmettraux excellent !
2010-02-10 13:44:16 utc tosch_le http://github.com/tosch/ruote-kit/commit/12aeef3cbec9abde138f3276ef01d2db91c896b0
2010-02-10 13:58:46 utc jmettraux excellent
2010-02-10 14:45:51 utc anb_ this inject ruby thing is powerful !
2010-02-10 14:46:10 utc jmettraux :)
2010-02-10 15:01:04 utc anb_ in Ruby , you can implement your own == for a given class, right ? because i'm trying to "uniq" a list of workitems
2010-02-10 15:01:54 utc jmettraux def == (other) should do it
2010-02-10 15:02:08 utc jmettraux there is also eql? and hash to watch for IIRC
2010-02-10 15:02:47 utc anb_ I meant equals, yes
2010-02-10 15:02:54 utc jmettraux if you need some more operators in the workitem class please tell me
2010-02-10 15:04:05 utc jmettraux you could base unicity on the "fei"
2010-02-10 15:04:16 utc jmettraux which implements == eql? and hash
2010-02-10 15:04:45 utc jmettraux lib/ruote/fei.rb
2010-02-10 15:05:07 utc anb_ maybe i'll try that, yes
2010-02-10 15:05:25 utc anb_ I just want to remove duplicates in a search for workitems
2010-02-10 15:05:31 utc anb_ by field / by participant
2010-02-10 15:07:39 utc jmettraux def == (o); return false unless o.class == self.class; o.fei == self.fei; end
2010-02-10 15:07:41 utc jmettraux should do it
2010-02-10 15:08:27 utc jmettraux ACTION adds that to the ruote TODO
2010-02-10 15:08:42 utc anb_ nice
2010-02-10 15:11:02 utc jmettraux tomorrow morning
2010-02-10 15:13:28 utc anb_ of course, no worries
2010-02-10 15:16:34 utc jmettraux anb_: is by_field/by_participant returning duplicates or are you aggregating ?
2010-02-10 15:21:02 utc anb_ jmettraux: i'm aggregating
2010-02-10 15:42:04 utc anb_ bye everyone
2010-02-10 15:42:10 utc jmettraux bye !
2010-02-10 15:49:33 utc tosch_le leaving, too. have a good night!
2010-02-10 15:49:44 utc jmettraux bye !