Hello
I am not that familiar with ruby programming.
But I found that ruby objects have good block arguments, that means we can
write good FP styles with the higher functions as in other languages such
as scala?
For instance, for this job in Apache spark:
rdd.collect()
[('a', 3), ('b', 4), ('a', 2), ('c', 4)]
rdd.groupByKey().mapValues(len).sortBy(lambda x:
x[1],ascending=False).collect()
[('a', 2), ('b', 1), ('c', 1)]
I can do it pretty fine with ruby way:
irb(main):037:0> li
=> [["a", 3], ["b", 4], ["a", 2], ["c", 4]]
irb(main):038:0>
irb(main):039:0> li.group_by {|x| x[0]}.map{|x,y| [x,y.size]}.sort_by
{|_,x| -x}
=> [["a", 2], ["b", 1], ["c", 1]]
So, is ruby also suitable for bigdata and the streaming?
Just want to hear back from you.
Thanks
Adriel P