Does anyone knows how to force WEBrick to process more than one request at a time? I'm using some Ajax on my page for long running database-related tasks and I can clearly see the requests are being processed in a pipeline.
+1
A:
webrick only processes one request at a time, which is usually fine for development. If you want things to run in parallel have a look at mongrel_cluster or the awesome unicorn or passenger of course.
tliff
2010-06-15 14:19:59
Ok, all of those are for plain ruby. What should I use to make it work with JRuby? I have some database connectivity that's only available in Java (no direct activerecord support for Teradata :( ) so I'm kind of bound to JRuby.
Matthias Hryniszak
2010-06-16 07:46:35
I'd assume you would have to use some kind of application server like Tomcat or Glassfish.
tliff
2010-06-16 18:47:12
+1
A:
If you use JRuby, check out the GlassFish gem (stripped-down GlassFish server in gem form), the Trinidad gem (same thing using Tomcat), or various other options like warbler (produces .war files you can run directly or deploy to any app server). JRuby is the easiest way for sure to deploy a highly-concurrent application on Ruby, and makes the C Ruby options look rather primitive in comparison.
Charles Oliver Nutter
2010-06-16 21:25:42
Thanks! Running it on Tomcat rather than on WEBrick was exactly what I needed.
Matthias Hryniszak
2010-06-17 09:16:46