I'm playing with the last version of DSE Enterprise. I'm interested in the graph features. I currently have one project running on Titan the open source graph database that inspired DSE Graph, and I'm trying to evaluate DSE Graph as a replacement database, since Titan is missing many administration and operation features.
My problem is the following:
I have a strange behavior while trying to execute graph queries on a datastax cluster using the nodejs driver. The query is working (I can add or delete vertices), but on the client side (nodejs driver) I get always a connection timeout error, after 5 to 7 seconds, like this:
{
"statusCode": 200,
"body": {
"info": {
"queriedHost": "xx.xx.xx.xx:9042",
"triedHosts": {
"xx.xx.xx.xx:9042": {
"message": "Connection timeout",
"info": "Cassandra Driver Error"
}
},
"achievedConsistency": 10
},
"length": 1,
"pageState": null
}
}
When I look at datastax studio, my queries are working though. I can see the newly added vertices...
Here is the code used to call dse graph:
'use strict';
const dse = require('dse-driver');
const dseGraph = require('dse-graph');
const client = new dse.Client({
contactPoints: ['xx.xx.xx.xx'] ,
protocolOptions: {port: 9042},
authProvider: new dse.auth.DsePlainTextAuthProvider("xxx","xxx"),
graphOptions: { name: 'test' }
});
module.exports.create = (event, context, callback) => {
let response = {
statusCode: 200
};
client.executeGraph("graph.addVertex(label,'user','email','c@b');").then(function(users) {
response.body=users;
client.shutdown();
callback(null, response);
}).catch(function(err) {
response.statusCode=400;
response.body=err;
client.shutdown();
callback(null, response);
});
};
May be the problem is in my cluster configuration?
Here is my topology:
- One cluster
- 3 datacenters
- 1 datacenter for the graph, with 2 nodes
- 1 datacenter for search, with 1 node
- 1 datacenter for analytics, with 1 node
All settings are defaults ones. I've installed the cluster through OpsCenter, and all my nodes are ec2 instances (m4.xlarge).
Do you have any idea why the queries are working, but I get this strange message in the success callback?
Regards,
Toufic Zayed