hugopl / sidekiq.cr

Simple, efficient job processing for Crystal
http://sidekiq.org
GNU Lesser General Public License v3.0
766 stars 74 forks source link

Easy to swap with Ruby version of sidekiq? #80

Closed polarathene closed 5 years ago

polarathene commented 5 years ago

I am aware of the README note:

The Ruby and Crystal versions of Sidekiq must remain data compatible in Redis. Both versions should be able to create and process jobs from each other. Their APIs are not and should not be identical but rather idiomatic to their respective languages.

I'm not experienced with Ruby but I am interested in a Ruby project(Discourse) where Sidekiq is used. I haven't gone over the codebase to look over how their using the API(or aware of what the API differences to look out for are).

From what I understand Sidekiq is run separate to the main Ruby project, so I was curious if that meant Sidekiq.cr might be potentially able to be a drop-in replacement in some cases?

polarathene commented 5 years ago

I got some clarification over here.

AFAIK, that explains I should only need to be concerned about the jobs directory in the Discourse project, which is independent to the main project code, I just need to port from the ruby code to crystal equivalent in this case, then it would work as a "drop-in" replacement.

So the answer is yes.... and no, in the sense that it's not like switching mysql for mariadb, but it's still technically an isolated service, such that I should only need to be concerned about converting the job related code.