2010-03-02 07:43:10 utc |
jmettraux |
hi guys ! |
2010-03-02 07:44:22 utc |
tosch_le |
hi john. how do you do? |
2010-03-02 07:44:33 utc |
jmettraux |
doing fine, you ? |
2010-03-02 07:45:07 utc |
tosch_le |
fine, thanks. |
2010-03-02 11:41:25 utc |
kennethkalmer |
hi jmettraux! |
2010-03-02 11:51:11 utc |
jmettraux |
kennethkalmer: Hi ! |
2010-03-02 11:51:17 utc |
kennethkalmer |
doing well ? |
2010-03-02 11:51:39 utc |
jmettraux |
yes, and you ? |
2010-03-02 11:51:47 utc |
kennethkalmer |
recovering :) |
2010-03-02 11:51:54 utc |
jmettraux |
good :) |
2010-03-02 11:52:22 utc |
kennethkalmer |
gimme 10 minutes to finish lunch :) |
2010-03-02 11:52:38 utc |
jmettraux |
have to clean the dishes here |
2010-03-02 11:53:34 utc |
jmettraux |
wash |
2010-03-02 12:04:47 utc |
jmettraux |
notification participants ftw : http://github.com/fnando/post_commit |
2010-03-02 12:05:52 utc |
kennethkalmer |
coffee ? |
2010-03-02 12:06:02 utc |
jmettraux |
please ! |
2010-03-02 12:06:39 utc |
kennethkalmer |
ACTION emits cafe |
2010-03-02 12:06:50 utc |
jmettraux |
ACTION consumes |
2010-03-02 12:07:17 utc |
kennethkalmer |
how is the rk + rails 3 combo doing ? |
2010-03-02 12:07:58 utc |
jmettraux |
doing fine, but I'd like to clean rk run_* : http://groups.google.com/group/openwferu-users/browse_thread/thread/28514aa23eae1a82 |
2010-03-02 12:08:03 utc |
jmettraux |
hadn't had the time now |
2010-03-02 12:08:12 utc |
jmettraux |
maybe one of you two wants to take over that task |
2010-03-02 12:08:24 utc |
kennethkalmer |
checking the mail |
2010-03-02 12:08:53 utc |
kennethkalmer |
aah |
2010-03-02 12:09:07 utc |
kennethkalmer |
maybe it was due to my initial confusion of workers and the engine |
2010-03-02 12:09:11 utc |
kennethkalmer |
i'll clean it up |
2010-03-02 12:09:21 utc |
jmettraux |
:) |
2010-03-02 12:11:29 utc |
kennethkalmer |
wrapping up my initial cooking session, then onto getting rk into iiab |
2010-03-02 12:11:34 utc |
kennethkalmer |
so looking forward to it |
2010-03-02 12:11:41 utc |
jmettraux |
great |
2010-03-02 12:12:07 utc |
jmettraux |
I wired ruote-fluo in my r3 app today |
2010-03-02 12:12:16 utc |
jmettraux |
definitions are stored as couch docs |
2010-03-02 12:12:39 utc |
kennethkalmer |
awesome |
2010-03-02 12:12:55 utc |
jmettraux |
{ tree: [ xxx ], name: "test", revision: "x" } |
2010-03-02 12:13:05 utc |
kennethkalmer |
do we still need couch configurations in rk ? |
2010-03-02 12:14:23 utc |
jmettraux |
well, I'm using conf.set_storage(Ruote::Couch::CouchStorage, host, port, 'prefix' => 'my_app_#{Rails.env}') |
2010-03-02 12:14:33 utc |
jmettraux |
and c.run_worker = true |
2010-03-02 12:14:48 utc |
kennethkalmer |
i c |
2010-03-02 12:14:48 utc |
jmettraux |
then outside, a configure_catchall! |
2010-03-02 12:15:16 utc |
jmettraux |
it's strange to have the configure_catchall! outside of the conf |
2010-03-02 12:15:30 utc |
jmettraux |
and it's strange to have ! at the end of a conf method name |
2010-03-02 12:15:54 utc |
jmettraux |
well |
2010-03-02 12:15:55 utc |
kennethkalmer |
well, the ! is show it is dangerous |
2010-03-02 12:16:06 utc |
kennethkalmer |
dangerous being : don't register parts after this call |
2010-03-02 12:16:23 utc |
jmettraux |
ok |
2010-03-02 12:17:17 utc |
jmettraux |
configurations in rk became very thin |
2010-03-02 12:17:49 utc |
kennethkalmer |
i'm glad |
2010-03-02 12:17:53 utc |
kennethkalmer |
should be that way |
2010-03-02 12:18:10 utc |
jmettraux |
the three main advantages our 1) the singleton 2) run_worker 3) the catchall |
2010-03-02 12:20:47 utc |
jmettraux |
how do we register participants ? inside the conf block ? |
2010-03-02 12:21:13 utc |
jmettraux |
why is the configure_catchall!, despite its name, outside of the conf block ? |
2010-03-02 12:21:25 utc |
jmettraux |
no need for an answer now |
2010-03-02 12:23:06 utc |
kennethkalmer |
good questions |
2010-03-02 12:52:49 utc |
tosch_le |
ACTION is back from launch |
2010-03-02 12:53:02 utc |
jmettraux |
ACTION welcome back |
2010-03-02 12:53:13 utc |
jmettraux |
is the rocket flying well ;) |
2010-03-02 12:53:41 utc |
tosch_le |
configure_catchall! could be renamed to register_catchall!, would be more appropriate imho |
2010-03-02 12:53:50 utc |
jmettraux |
+1 |
2010-03-02 12:53:55 utc |
tosch_le |
oups. s/launch/lunch |
2010-03-02 12:54:08 utc |
kennethkalmer |
hey tosch_le |
2010-03-02 12:54:10 utc |
kennethkalmer |
+1 |
2010-03-02 13:02:42 utc |
tosch_le |
thinking about participant registration: |
2010-03-02 13:02:44 utc |
tosch_le |
atm, you'll have to use native Ruote methods to register your own participants (RuoteKit.engine.register_participant) iirc |
2010-03-02 13:02:46 utc |
tosch_le |
what about a helper function which gets a block like: |
2010-03-02 13:02:48 utc |
tosch_le |
RuoteKit.register do |
2010-03-02 13:02:50 utc |
tosch_le |
participant 'al', MyParticipant, :foo => bar |
2010-03-02 13:03:00 utc |
tosch_le |
participant 'bob', YourParticipant, :boo => baz |
2010-03-02 13:03:12 utc |
tosch_le |
end |
2010-03-02 13:03:19 utc |
jmettraux |
conf.register do ? |
2010-03-02 13:04:19 utc |
tosch_le |
or, with catchall and in conf: |
2010-03-02 13:04:21 utc |
tosch_le |
RuoteKit.configure do |conf| |
2010-03-02 13:04:23 utc |
tosch_le |
conf.bar |
2010-03-02 13:04:25 utc |
tosch_le |
conf.register :catchall => true do |
2010-03-02 13:04:27 utc |
tosch_le |
participant 'al', MyParticipant |
2010-03-02 13:04:29 utc |
tosch_le |
end |
2010-03-02 13:04:31 utc |
tosch_le |
end |
2010-03-02 13:05:07 utc |
jmettraux |
participant '.+', MyParticipant is a catchall |
2010-03-02 13:05:09 utc |
jmettraux |
not 'al' |
2010-03-02 13:06:10 utc |
tosch_le |
let me be more precise: |
2010-03-02 13:06:12 utc |
tosch_le |
conf.register :catchall => '.+' do |
2010-03-02 13:06:14 utc |
tosch_le |
participant 'al', AnyParticipantClass |
2010-03-02 13:06:16 utc |
tosch_le |
end |
2010-03-02 13:06:32 utc |
tosch_le |
the catchall will get registered after those in the block |
2010-03-02 13:06:54 utc |
tosch_le |
so that the catchall never catches items for other participants |
2010-03-02 13:07:01 utc |
jmettraux |
al would only catch /^al$/ and therefore not qualify as "catchall" |
2010-03-02 13:07:16 utc |
tosch_le |
al isn't the catchall, it's another participant |
2010-03-02 13:07:30 utc |
tosch_le |
the catchall isn't configured in the block |
2010-03-02 13:07:51 utc |
jmettraux |
I think there is no need for :catchall |
2010-03-02 13:08:26 utc |
tosch_le |
you mean somebody who needs it has to register a catchall by himself? |
2010-03-02 13:09:03 utc |
jmettraux |
participant catchall, MyParticipant |
2010-03-02 13:09:29 utc |
jmettraux |
we just have to bind catchall = '.+' for the binding |
2010-03-02 13:09:59 utc |
tosch_le |
but having it as option to the register method would ensure the catchall is never registered before other participants |
2010-03-02 13:10:30 utc |
jmettraux |
catchall implies '.+' |
2010-03-02 13:10:40 utc |
jmettraux |
else it's no catchall |
2010-03-02 13:11:48 utc |
jmettraux |
http://gist.github.com/319494 |
2010-03-02 13:11:49 utc |
tosch_le |
and what about: "i have those participants which shall get their rightful workitems, and all items not fitting to those participants shall go to the catchall one"? |
2010-03-02 13:12:10 utc |
jmettraux |
that's the concept |
2010-03-02 13:12:42 utc |
jmettraux |
register :catchall => true { participant 'NAME', x } |
2010-03-02 13:12:49 utc |
jmettraux |
is misleading |
2010-03-02 13:12:52 utc |
tosch_le |
yeah, but what if the stupid users does |
2010-03-02 13:12:54 utc |
tosch_le |
register catchall, ... |
2010-03-02 13:12:56 utc |
tosch_le |
register 'alpha', ... |
2010-03-02 13:12:58 utc |
tosch_le |
'alpha' will never get a workitem |
2010-03-02 13:13:03 utc |
jmettraux |
+1 |
2010-03-02 13:13:10 utc |
jmettraux |
it's perfect |
2010-03-02 13:14:01 utc |
jmettraux |
order matters |
2010-03-02 13:14:05 utc |
tosch_le |
http://gist.github.com/319496 |
2010-03-02 13:14:26 utc |
jmettraux |
ok for me |
2010-03-02 13:14:42 utc |
tosch_le |
in that way we could ensure order doesn't matter |
2010-03-02 13:14:46 utc |
tosch_le |
;-) |
2010-03-02 13:14:50 utc |
jmettraux |
well |
2010-03-02 13:15:05 utc |
jmettraux |
order still matters for other participants |
2010-03-02 13:15:21 utc |
tosch_le |
yes, and that's just fine |
2010-03-02 13:15:21 utc |
jmettraux |
that's why I think it's bad to introduce 1 exception |
2010-03-02 13:15:29 utc |
tosch_le |
ok |
2010-03-02 13:15:38 utc |
jmettraux |
it works like that but... |
2010-03-02 13:15:45 utc |
jmettraux |
vs it works like that and there is no but |
2010-03-02 13:15:51 utc |
tosch_le |
+1 |
2010-03-02 13:16:08 utc |
tosch_le |
but there should be a word of warning in the docs |
2010-03-02 13:16:25 utc |
tosch_le |
(there is already iirc) |
2010-03-02 13:16:27 utc |
jmettraux |
and in the example configuration |
2010-03-02 13:18:42 utc |
jmettraux |
those kind of "the catchall participant ate all my cookies" issues are detected at test time |
2010-03-02 13:19:07 utc |
tosch_le |
lol |
2010-03-02 13:19:14 utc |
jmettraux |
:) |
2010-03-02 13:20:32 utc |
tosch_le |
so we will need a register method in RuoteKit::Configuration and some magic to bind 'participant' in the blocks given to RuoteKit.engine.register_participant |
2010-03-02 13:21:07 utc |
jmettraux |
yes |
2010-03-02 13:32:27 utc |
jmettraux |
well, all this work to wrap engine.register_participant |
2010-03-02 13:32:31 utc |
jmettraux |
ok |
2010-03-02 13:32:39 utc |
jmettraux |
bed |
2010-03-02 13:32:43 utc |
jmettraux |
good evening ! |
2010-03-02 13:33:44 utc |
tosch_le |
bye! |
2010-03-02 13:33:54 utc |
jmettraux |
bye ! |