this project is a study from avaible graph persistenses to build a recomendation with express
- Neo4j
- OrientDB
- Titan (to implement)
- build on jvm
- not have TTL resource
- not have resource to work with date
- cypher query language
- xml configs
- need define schema
- lightweight edges (optional)
Config
- open file $ORIENTDB_HOME/config/orientdb-server-config.xml and add this user for development purpouse
<users>
<user name="root" password="pwd" resources="*" />
</users>
-
open in browser http://localhost:2480
-
create a database recommend_test and also recommend_development type => graph local
-
create Vertices classes User and Product
> CREATE Class User extends V;
> CREATE Class Product extends V;
- create Edges classes Click, Buy and View
> CREATE Class Click extends E;
> CREATE Class Buy extends E;
> CREATE Class View extends E;
- Examples
create Vertice
> INSERT INTO User SET name = "test";
create Edge
> CREATE EDGE Buy FROM #10:3 TO #11:4
update
> UPDATE User SET name = "test" WHERE user_id = 1;
update with upsert
> UPDATE User SET user_id = 1 UPSERT WHERE user_id = 1;
download
$ wget http://s3.thinkaurelius.com/downloads/titan/titan-1.0.0-hadoop1.zip
install
$ cd /titan-1.0.0-hadoop1/bin
$ ./titan.sh start
up cassandra
$ ./bin/cassandra
up elasticsearch
$ ./bin/elasticsearch
run gremlin
$ ./gremlin.sh start
$ graph = TitanFactory.open('conf/titan-cassandra-es.properties')