▲ | taf2 6 days ago | |||||||||||||||||||||||||
Excited to announce Curb 1.2.0 with support for Fiber aware IO scheduling. It also builds way faster now by using multiple CPU's to configure itself in parallel. A new saner default when using Curl.head to not wait for a body since many http servers when sending a HEAD request will still respond with a Content-Length setting CURLOPT_NOBODY=1 is a much better default. Here's an example using making requests with async: require 'curl' require 'async' Async { |task|
}You can still use Curl::Multi but now if your code is already in a http server you don't have to do anything to get the benefit of the overlapping IO | ||||||||||||||||||||||||||
▲ | sdwolfz 5 days ago | parent [-] | |||||||||||||||||||||||||
Congratulations on your release! Just a few questions: 1. I've never felt the need to use anything else apart from ruby's Net::HTTP, while I see every project I've worked on in the past add in stuff like faraday or httparty for doing JSON REST calls. Apart for the convenience aspect of it in terms of lines of code, is there any advantage for me to use your gem in such cases? (for example performance?) 2. I'm confused as to why you would need to do something special for fibre aware scheduling. Is it the case that ruby considers anything traversing into C world as "CPU bound" even when it sits idle and you need to instruct it otherwise? 3. How does it behave with ractors? I mean does it work called inside a ractor or when I'm initialising a "client" object in the main body, then trying to pass it to many ractors for them to use it in parallel. Prior to ruby 3.4 I've had issues even trying to use `pp` inside a ractor so I'm not expecting miracles, just curious how things are progressing in that area. | ||||||||||||||||||||||||||
|