karafka / rdkafka-ruby

Modern and performant Kafka client library for Ruby based on librdkafka
https://karafka.io
Other
354 stars 120 forks source link

Make rdkafka-ruby Ractor safe #511

Open mensfeld opened 1 month ago

larskanis commented 2 weeks ago

I added Ractor support to ffi-1.16 one year ago and now was just looking for projects which use this feature. Anyways there is a wiki page for FFI in conjunction with Ractors: https://github.com/ffi/ffi/wiki/Ractors Would be interested in some adoption.

mensfeld commented 2 weeks ago

Hey @larskanis thanks. I know this link. My main issue with ractors atm is their limited scope of operations. Any benchmarks that I did that would involve CPU intense work (like data deserialization) eats up more resources and is more expensive in ractors than without, not to mention with forks :(

larskanis commented 2 weeks ago

Yes that's the problem. Ractor was made to improve the performance but it has so many performance issues. Among many others.

Nevertheless it's an exciting technology and I wanted ffi as an important core gem to support it properly.

mensfeld commented 1 week ago

@larskanis I fully agree and that is one of the reasons why I created this card in the first place :)