Yehuda Katz
(ph) 718.877.1325

On Sat, Apr 28, 2012 at 7:31 PM, Mike Perham <[email protected]> wrote:

> Hi guys, I wanted to discuss the new Queueing API for those of us who
> are implementing an out-of-process version.  In my case, I write
> Sidekiq [1] and would like to support the new API once Rails 4 is
> released.  My issue is that because the API is object-oriented rather
> than message-oriented, implementation of out-of-process workers is
> difficult.
>
> The API is Queue#push(job) where job has a run method.  Ruby doesn't
> have a great solution for serializing a Ruby object across the wire.
> Marshal limits the API to Ruby solutions (which rules out RabbitMQ, et
> al),


Not particularly? It just requires a Ruby consumer on the other end, which
seems like an acceptable constraint. Queues with special serialization
requirements (because they cannot use a Ruby consumer) can add additional
constraints on serialization, and communicate those constraints to the
users of their API.


> JSON can't fully serialize Ruby objects (e.g. symbols) and YAML
> has a number of issues in practice that make it painful to use (e.g.
> see the monkeypatches DelayedJob has to use [2]).
>
> So I love the simplicity of the API but think it will lead to painful
> implementation issues.  What do you think about defining a simpler
> message format that can be fully serialized and deserialized via JSON
> / YAML / etc instead of using a Ruby object?
>
> mike
>
> [1] http://mperham.github.com/sidekiq/
> [2]
> https://github.com/collectiveidea/delayed_job/blob/master/lib/delayed/psych_ext.rb
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Core" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-core?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to