Hey guys,
I've been playing around with Pacer recently, it's a great library. Good to see people talking about using it with Titan. I managed to get Titan 0.4.2 to run in my ruby app in a reasonably stable manner after reading Mark's post about his experiences, here is an updated
pacer-titan gem that you can load up and use without too much trouble. I've put it up on rubygems too. It requires the latest bleeding-edge Pacer for the Blueprints 2.4.0 compatibility with Titan.
It's my first gem so it's a bit rough around the edges and I've had some issues, sorry about the wall of text:
I ran into the same problem Mark described with class loading when starting 'embedded' storage and index backends. I ended up not including any of the backend classes in the gem's pom, the user can load extra jars and dependencies for whatever backend they choose to use for now, this works well using jbundler. Cassandra thrift works fine if you keep titan-cassandra in the gem's jar, but Elasticsearch crashes so I've kept that out of the manifest too in favour of including it using jbundler.
Any ideas about improving class loading in a gem, and should I include all backend support jars anyway?
I used the monkey patches for enabling pacer indexing mentioned in an issue on github. Index lookups via Pacer are still a bit slower than using Titan's index query methods via its blueprints_graph then converting results to a Pacer route - by a factor of 10 on my testing (10 milliseconds instead of 1 millisecond mind you). Hitting an external index causes a full graph scan however.
I've added a couple helper methods to do index lookups using Titan's native GraphCentricQueryBuilder and convert to a Pacer route: g.query{ has('property', 'value').has('text', Text::CONTAINS, 'value') }.out...
Darrick do you think it's worth me trying to feed Titan's methods into your index route wrappers (which I'm still trying to figure out) or do you think it will start working once you fix the index registering issue with Pacer?
Cheers!
Ilya