samuel / oriontransfer.org wrote:
> I appreciate what you said about multi-thread multi-fiber
> execution using your proposed reactor design. I think it's
> good and it's probably better than libev. It's excellent that
> you have thought about how to solve these problems and I
> admire it. However, in my experience, libev is fast enough and
> n-m concurrency model is fast enough for Ruby. Until Ruby is
> several orders of magnitude faster, it won't make much
> difference, except perhaps a tiny bit of latency, but there
> are benefits to keeping a single request on a single thread or
> process - you can avoid having to deal with locking and other
> synchronisation primitives in some cases, e.g. caches. So,
> there are tangible benefits to using, say, m-process n-fibers
> vs n-fibers/m-threads model. Ruby has never really suited
> multi-threaded model unfortunately.

Just one correction; auto-Fiber does not migrate fibers or
migrate userspace(*) I/O operations across native threads at the
moment.  You might be confusing this with my other
non-Fiber-using server designs which do migrate I/O operations
across threads.

For auto-fiber, there's minimal locking requirements even if we
get rid of GVL.  It relies on locking already done by the
kernel; kqueue will require extra locking in the corner case
where read and write filters are both installed for an FD.

(*) Of course, Linux kernel soft IRQ handlers can migrate work
    across cores in the background.

> Just to be clear: I'm more interested in semantics than
> implementation. Get the semantics right and the correct
> implementation will follow. I see a lot of work done here on
> an implementation (which is awesome and it looks good), but
> I'm not completely clear that the semantics are really sound.

Anyways, it looks like matz is inclined to accept it; but ko1
wants some semantic tweaks with the API (but I'm not sure
what/how, exactly).

 https://docs.google.com/document/d/1z19pKt8jlpiEUR3RnWWBCfs3OR_hbiAZMwpQ6ZTllP0/pub

(I've only viewed it with w3m, no idea if I'm missing anything
 due to lack of JS)

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>