Live data from Hacker News

Fibur gives you full concurrency during your I/O calls in Ruby 1.9

gist.github.com

11–20 of 24 posts

Re: Fibur gives you full concurrency during your I/O calls in Ruby 1.9

#13
post #3

Would this be useful for environments where extreme performance is necessary, such as Fibonacci API servers?

Only if you're reading Fibonacci numbers from an I/O. Fibur only allows concurrency while doing I/O operations.

Not true!, it will keep the response time interquartile range small, providing a consistent user experience!

Re: Fibur gives you full concurrency during your I/O calls in Ruby 1.9

#19
post #3

Would this be useful for environments where extreme performance is necessary, such as Fibonacci API servers?

Only if you're reading Fibonacci numbers from an I/O. Fibur only allows concurrency while doing I/O operations.

We can use the technique first described here https://github.com/glenjamin/node-fib by using Fibur.pass.

  def fib(n)
    Fibur.pass
    return n if (0..1).include? n
    fib(n-1) + fib(n-2) if n > 1
  end
Now, if you wrap this in Fibur.new, you will get parallel operation!

Re: Fibur gives you full concurrency during your I/O calls in Ruby 1.9

#20
post #19

Earlier quoted context omitted.

Only if you're reading Fibonacci numbers from an I/O. Fibur only allows concurrency while doing I/O operations.

We can use the technique first described here https://github.com/glenjamin/node-fib by using Fibur.pass. def fib(n) Fibur.pass return n if (0..1).include? n fib(n-1) + fib(n-2) if n > 1 end Now, if you wrap this in Fibur.new, you will get parallel operation!

Bro, you get parallel operation anyway, that Fibur.pass just added scheduler overhead.

The whole point of Fibur is you don't need to use #pass!!!

Post reply on HN