On Tue, May 31, 2011 at 12:46, Christian Johansen <[email protected]>wrote:

>
>
> On Tue, May 31, 2011 at 12:25, Rodrigo Rosenfeld Rosas <[email protected]
> > wrote:
>
>> Em 31-05-2011 04:38, Christian Johansen escreveu:
>>
>>  Hi,
>>>
>>> I've just pushed the completed version of Gitorious' new messaging API:
>>> https://gitorious.org/gitorious/mainline/commits/unified-messaging-apiWe 
>>> aim to get this merged to master in a week or so (we're currently running
>>> it in staging to avoid potential problems in production) - we also want to
>>> give you guys the opportunity to comment on this before we merge it in.
>>>
>>> What is this new API? Basically it's an intermediary between Gitorious
>>> and the concrete messaging queue implementation. It moves the previously
>>> obtrusive ActiveMessaging bindings out to an adapter, and makes room for
>>> more adapters, such as the new Sync, Test and Resque adapters.
>>>
>>> For developers, this change is interesting because simply by setting
>>> messaging_adapter: sync in your gitorious.yml, you can have everything
>>> processed without running a separate poller of any kind. The sync adapter
>>> might also work for low traffic setups where resource usage is an issue (and
>>> performance is not).
>>>
>>> For people running Gitorious, an upgrade should be painless. The default
>>> implementation (even if you don't update your configuration file) is the old
>>> Stomp adapter, and should work as expected.
>>>
>>> I've created a merge request for this changeset, and would love your
>>> comments, questions and review:
>>> https://gitorious.org/gitorious/mainline/merge_requests/156. Let me know
>>> what you think.
>>>
>>
>> I'll take a look at it and will give you my feedback. I'm specially
>> interested in what app/processors became.
>>
>> Thanks for your work!
>>
>
> Looking forward to your review. Some of the wiring stuff is a bit sneakier
> than I'd like, so if you have suggestions for improvement, that would be
> much appreciated. Also, a word of warning, the ActiveMessaging consumer is
> really strange, mostly due to ActiveMessaging's weird API :( Marius did a
> spike earlier today that uses EventMachine and Stomp directly to consume
> messages, I think we'll move to that very soon.
>
> The processors are pretty much the same, only slightly more explicit:
>
> class PushProcessor
>   include Gitorious::Messaging::Consumer
>   consumes "/queue/GitoriousPush"
>
>   # ...
> end
>
> We dropped the symbolic indirection for queues, which has little value, and
> ditched inheritance in favor of modules. This also brings some symmetry to
> the solution as publishers do the same thing:
>
> class SshKey < ActiveRecord::Base
>   include Gitorious::Messaging::Publisher
>
>    # ...
> end
>
> (Compared to ActiveMessaging, which includes stuff in ActiveRecord::Base).
>
> Christian
>

Oh, I forgot: the active messaging plugin is out the door :) It's now listed
in the Gemfile, under its own group, which means you don't even need to
install it if you won't be using Stomp.

-- 
MVH
Christian

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]

Reply via email to