简体   繁体   English

结合使用Apache Mahout和Ruby on Rails

[英]Using Apache Mahout with Ruby on Rails

I have a ruby on rails application. 我在应用程序上有一个红宝石。 I have the idea of implementing recommendations in the application. 我有在应用程序中实施建议的想法。 I came to know about Apache Mahout through stackoverflow. 我通过stackoverflow了解了Apache Mahout Now, If I have to use Mahout, what are the stuff that I have to do. 现在,如果我必须使用Mahout,我需要做些什么。 Since it is a Java library, I am not clearly sure how to use it in an Ruby on Rails application. 由于它是Java库,因此我不确定如何在Ruby on Rails应用程序中使用它。 I have a couple of certifications in Java, so coding in Java is not an issue. 我有一些Java认证,因此Java编码不是问题。 I also have the idea of hosting the application in Heroku, would that be an issue? 我也有在Heroku中托管应用程序的想法,这会成为问题吗?

Thanks 谢谢

The recommender portion actually began life as a separate project which had nothing to do with Hadoop. 推荐器部分实际上是作为一个单独的项目开始的,该项目与Hadoop无关。 It is still alive an well in Mahout. 在Mahout,它仍然是一口井。 Look at everything under org.apache.mahout.cf.taste except what's in .hadoop . 查看org.apache.mahout.cf.taste下的所有内容,除了.hadoop This is the non-distributed, non-Hadoop code. 这是非分布式,非Hadoop代码。 You can create a Recommender using this code, and have the framework wrap it in a ready-to-deploy .war file which exposes the recommender as a web service, via JWS. 您可以使用此代码创建一个Recommender ,并使框架将其包装在可立即部署的.war文件中,该文件通过JWS将推荐程序公开为Web服务。

This is the key documentation: https://cwiki.apache.org/confluence/display/MAHOUT/Recommender+Documentation 这是关键文档: https : //cwiki.apache.org/confluence/display/MAHOUT/Recommender+Documentation

You might also be interested in the book Mahout in Action . 您可能也对Mahout in Action一书感兴趣。

Mahout runs on Hadoop (according to the documentation) and if you google out there, there are projects that have used a rails stack to communicate with a hadoop cluster. Mahout在Hadoop上运行(根据文档),如果在google上搜索,则有一些项目使用Rails堆栈与hadoop集群进行通信。 But the basic process would be to running you hadoop cluster on a set of ec2 instances or some other clustering infrastructure and then interface that with you app through a database adapter. 但是基本过程将是在一组ec2实例或某些其他群集基础结构上运行hadoop群集,然后通过数据库适配器将其与您的应用程序接口。 it looks like one that I have had some success with on other databases (oracle, mySQL, LDAP, jdbc) is datamapper and they are interested in developing a hadoop adapter: http://wiki.github.com/datamapper/dm-core/ruby-summer-of-code-ideas 看来我在其他数据库(Oracle,mySQL,LDAP,jdbc)上取得了一些成功的是datamapper,他们对开发hadoop适配器感兴趣: http : //wiki.github.com/datamapper/dm-core / ruby​​-summer-of-code-ideas

this is probably the most promising library i saw for your purposes though: http://mrflip.github.com/wukong/INSTALL.html 虽然这可能是我为您所见的最有前途的库: http : //mrflip.github.com/wukong/INSTALL.html

Go ahead with JRuby and implement the jar files provided with Mahout binary distribution. 继续使用JRuby并实现Mahout二进制分发提供的jar文件。 You can seamlessly integate it. 您可以无缝集成它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM