On Tue, Jan 25, 2011 at 3:13 AM, Charles Oliver Nutter <head...@headius.com>wrote:
> On Tue, Jan 25, 2011 at 2:11 AM, Charles Oliver Nutter > <head...@headius.com> wrote: > > I did have to hack around the parser logic, since native extensions > > largely mean death for concurrency on JRuby (and by native I mean C > > extensions using MRI's API). Instead, I lifted code from Mongrel and > > Rack to use Mongrel's parser to populate a Rack environment, and > > managed to make the result function well enough to benchmark. > > I should clarify this... Mongrel has shipped a Java version of its > Ragel-based parser for many years. JCD and ChaosBazaar have no > native/C code whatsoever, and will run on any platform with a > reasonably current JVM. > > I'd be happy to roll my CT/CB parser hackage back into mainline if we > can find a clean way to isolate impl-specific backends. It would be > easier to maintain a single CT atop multiple GCD lookalike APIs than > to collaborate on largely-independent forks. I agree. I'll think more about this later this evening, but for now I wanted to quickly reply to mention Manfred Stienstra's beginning attempts at a net/http rewrite (https://github.com/Manfred/Net-http2) including a Ragel-based HTTP parser similar to that used by Mongrel. I had originally played with the idea of using this instead of hooking up the parser on my own, but in the end time-constraints won out. I should also mention that the particular way in which ControlTower incorporates the parser via an Obj-C class (instead of using the more vanilla Ruby C API) is partly a consequence of the state of MacRuby when ControlTower was written, but mostly a result of my own inexperience with the C API at the time. So, yes, I think a more unified interface with a fast, reentrant, standards-compliant HTTP parser would be a great thing for future server developers and probably even the Ruby community as a whole. - Josh
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel