News for hackers. Stuff that matters.
Re:Proposal of a new concurrency model for Ruby 3 [pdf] by masterleep on Thursday September 08, 2016 @02:31AM (#12450728)
How would you use this to parallelize Rails requests? I guess you would need a pool of guilds, each with its own set of controllers, etc.

Since the requests would not be in the "main" guild, it might be painful to call into gems.

Re:Proposal of a new concurrency model for Ruby 3 [pdf] by artellectual on Thursday September 08, 2016 @02:41AM (#12450767)
I guess you could boot up a pool of guilds in your process or better yet get generated on demand as requests are coming in, to process the request, and kill the guild off when the process is done since the request object shouldn't be shared.

It all really depends on how much overhead there is to create and destroy guilds. If it's easy then ideally you could start 100s of guilds or 1000s should your hardware allow it.

I see guilds as a subprocess with its own isolated resources.

Re:Proposal of a new concurrency model for Ruby 3 [pdf] by pmontra on Thursday September 08, 2016 @05:53AM (#12451586)
Ideally guilds could be equivalent to lightweight processes at application level (not OS), much like in Erlang. Then they could be scheduled to run concurrently using OS threads (multiple guilds per thread) and take advantage of multiple cores. That's part of BEAM, the Erlang VM. I think it's going to take a while.
Re:Proposal of a new concurrency model for Ruby 3 [pdf] by _ko1 on Thursday September 08, 2016 @05:41PM (#12457598)
Similar to Erlang process, but more heavy weight (because it creates OS thread per Guild).
Re:Proposal of a new concurrency model for Ruby 3 [pdf] by _ko1 on Thursday September 08, 2016 @06:11PM (#12457837)
More correctly, making a OS thread per a Ruby thread, and creating a Guild makes 1 Ruby thread.