I am working on a recommendation engine. The user data is collected (Their friendship, locations, likes,education,...) and is already stored in mongodb. I need to recommend relevant products to these users. I am planning on using neo4j for the recommender engine for obvious reasons (ease of traversal between nodes, path information,..). The problem is that I have to first convert the mongodb data into neo4j nodes/relationships, process the data and send the results back to the mongodb database. The main problems is that we will end up maintaining two databases, something that the development team will not be happy. I have already looked into similar posts mongodb-neo4j and spring data but not sure what to make of them for this problem.
these are my questions
1- Is it worth it to add another DB just for the sake of a Recommendation engine(we are dealing with a large network), although neo4j is a perfect fit for such task.
2- I am using cypher for queries and don't know much about java, rest API and spring data. What kind of API should I use for mongodb-neo4j communications? My current solution is to use R and use it as the platform to connect to both mongodb and neo4j.
3- How about other graph databases, is there one that is ore fit to integrate with Mongo?
相关问题
- MongoDB can not create unique sparse index (duplic
- Spring Data MongoDB - lazy access to some fields
- Golang mongodb aggregation
- How to convert from Timestamp to Mongo ObjectID
- MongoDB Indexing: Multiple single-field vs single
相关文章
- mongodb有没有什么办法禁止读取数据的时候进行缓存
- mongodb-aggregate聚合查询分组后如何获得多字段
- mongodb error: how do I make sure that your journa
- How to track MongoDB requests from a console appli
- MongoError: cannot infer query fields to set, path
- Pymongo $in Query Not Working
- django.core.exceptions.ImproperlyConfigured: '
- How to represent an array with mixed types
https://github.com/tinkerpop/gremlin/wiki
Gremlin!
Specifically designed to work with Neo4j/graph databases. Also you can easily download GMongo and connect to Mongo as well.
Check out this article that describes how to interact with polyglot data in Gremlin:
http://thinkaurelius.com/2013/02/04/polyglot-persistence-and-query-with-gremlin/
Did you take a look at Reco4j? It uses neo4j as underlying graph database. They have implemented few algorithms as part of project. Here is link reco4j. The link is currently unavailable but I found the features good when I had visited the site.
For using MongoDB and Neo4j together there is now the Neo4j Doc Manager project which will automatically sync data from MongoDB to Neo4j, converting documents to a property graph structure.
There is another solution if we want to use R. The following R code, will get the data from mongodb
The result will be as following
The following R code will connect to Neo4j and create the graph. It is not efficient but it works
I found two ways to integrate mongodb and Neo4j. The first one was suggested by ryan1234 using Gremlin together with Gmongo. The steps are as following according to this excellent blog
1- Download Gmongo and Java mongo driver
2- copy the two jar files under neo4j/lib directory
3- This is an example. suppose we have this collection (called follows) in mongodb
from the Gremlin shell in Neo4j run the following commands.
and that is it we have created the equivalent graph in neo4j