Rubinius supports multithreading too, not only JRuby. However Rubinius 2 is still in beta and it is the only version supporting MRI 1.9 syntax. I tried ZeroMQ to distribute messages to avoid install other servers (RabbitMQ).<br>
<br><div class="gmail_quote">On 18 September 2012 00:30, Tim Cowlishaw <span dir="ltr"><<a href="mailto:tim@timcowlishaw.co.uk" target="_blank">tim@timcowlishaw.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 17 September 2012 22:38, Roland Swingler <<a href="mailto:roland.swingler@gmail.com">roland.swingler@gmail.com</a>> wrote:<br>
<br>
>> b) Throw it out to cloud-like infrastructures like Hadoop/MapReduce, but the problems needs direct SQL access and that can get messy<br>
><br>
> I've not tried it and I don't know whether you need SQL or "SQL-like"<br>
> but there are things like hive <a href="http://hive.apache.org/" target="_blank">http://hive.apache.org/</a> built on top of<br>
> hadoop that may be of some use?<br>
><br>
<br>
</div>If I recall correctly, Hive provides a SQL-like querying layer on top<br>
of information that's stored in a Hadoop (HDFS cluster), rather than<br>
providing integration with a SQL db. However, there's a DB input<br>
format [1] for hadoop that allows you to use the rows returned by a DB<br>
query as the input to a mapreduce job which might be helpful in this<br>
case. It depends a little on the complexity of the query - in my<br>
fairly limited experience, doing complex joins can get rather messy<br>
(although there are patterns for writing MR jobs that alleviate this -<br>
Nathan Marz's 'Big Data' book [2] which is in Manning EAP at the<br>
moment is in its infancy, but it looks like it's going to become a<br>
good reference for this sort of stuff when it's published, as is their<br>
Hadoop book [3])<br>
<br>
Of course, using Hadoop would mean embracing some Java-ish<br>
infrastructure to a greater or lesser extent (you could use MRI ruby<br>
to run your jobs with hadoop streaming, but hadoop itself is still a<br>
Java tool. Alternatively you can use JRuby to access the Java apis<br>
directly, and if you're going down this road then:<br>
<div class="im"><br>
> JRuby threads are Java threads, so you you get their benefits - i.e.<br>
> proper use of all cores, no global interpreter lock.<br>
<br>
</div>...which might give you the performance increase you need without the<br>
extra overhead of setting up and maintaining a hadoop cluster. If you<br>
go don this route but are keen to use some sort of higher-level<br>
concurrency primitive than threads, locks, mutexes etc then you might<br>
want to take a look at akka [4], an erlang-ish library for<br>
actor-based concurrency on the JVM. It's written and maintained by<br>
Typesafe, the scala guys, but is usable from any other JVM language<br>
too (and it looks like people have had some success using it with<br>
JRuby [5]), so it might prove fruitful if you decide that JRuby's the<br>
way you want to go.<br>
<br>
Hope this helps!<br>
<br>
Tim<br>
<br>
REFERENCES<br>
------------------<br>
<br>
[1] <a href="http://hadoop.apache.org/docs/mapreduce/current/api/org/apache/hadoop/mapreduce/lib/db/DBInputFormat.html" target="_blank">http://hadoop.apache.org/docs/mapreduce/current/api/org/apache/hadoop/mapreduce/lib/db/DBInputFormat.html</a><br>
[2] <a href="http://www.manning.com/marz/" target="_blank">http://www.manning.com/marz/</a><br>
[3] <a href="http://www.manning.com/lam/" target="_blank">http://www.manning.com/lam/</a><br>
[4] <a href="http://akka.io/" target="_blank">http://akka.io/</a><br>
[5] <a href="http://metaphysicaldeveloper.wordpress.com/2010/12/16/high-level-concurrency-with-jruby-and-akka-actors/" target="_blank">http://metaphysicaldeveloper.wordpress.com/2010/12/16/high-level-concurrency-with-jruby-and-akka-actors/</a><br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Riccardo Tacconi<br>Ruby on Rails and PHP development - System Administration<br><a href="http://virtuelogic.net/" target="_blank">VIRTUELOGIC LIMITED</a><br>
<br><a href="http://github.com/rtacconi" target="_blank">http://github.com/rtacconi</a><br><a href="http://riccardotacconi.blogspot.com" target="_blank">http://riccardotacconi.blogspot.com</a><br><a href="http://twitter.com/rtacconi" target="_blank">http://twitter.com/rtacconi</a><br>