Export Graph

26 views
Skip to first unread message

Bob Larrick

unread,
Jan 22, 2015, 3:51:11 PM1/22/15
to clojure-...@googlegroups.com
Hi I'm trying to figure out how to export a graph built with titanium?

I've got a repo here https://github.com/deathbob/atlas that shows essentially what I have so far.  


But I don't know how to get at it.

I can require ogre.core in my namespace, but when I try the same with ogre.io i get
"FileNotFoundException Could not locate ogre/io__init.class or ogre/io.clj on classpath."

FileNotFoundException Could not locate clojurewerkz/ogre/io__init.class or clojurewerkz/ogre/io.clj on classpath.


What am I doing wrong, I feel like I'm missing something simple.  



Michael Klishin

unread,
Jan 22, 2015, 4:23:40 PM1/22/15
to clojure-...@googlegroups.com, Bob Larrick
On 23 January 2015 at 00:00:29, Bob Larrick (lar...@gmail.com) wrote:
> I can require ogre.core in my namespace, but when I try the same
> with ogre.io i get
> "FileNotFoundException Could not locate ogre/io__init.class
> or ogre/io.clj on classpath."
> or clojurewerkz.ogre.io
>
> FileNotFoundException Could not locate clojurewerkz/ogre/io__init.class
> or clojurewerkz/ogre/io.clj on classpath.
>
> What am I doing wrong, I feel like I'm missing something simple.

Are you sure that Ogre version you use has that namespace?

There are many changes going on in Ogre master, we haven't done
a release off of master ever since the work on TinkerPop 3 started.
--
@michaelklishin, github.com/michaelklishin

Bob Larrick

unread,
Jan 22, 2015, 4:47:19 PM1/22/15
to clojure-...@googlegroups.com, lar...@gmail.com
I don't have any idea at all what Ogre version is packaged inside titanium.
I don't know where ogre.core is coming from, or if ogre.io exists in that version, or how to find out what ogre is bundled with titanium. 

I am trying to export the graph, all these other things are incidental (altho possibly important). 


Let me start at the beginning, How do i export the nodes and edges of a graph built in titanium, as in the repo linked above?

- Bob

Michael Klishin

unread,
Jan 22, 2015, 4:53:47 PM1/22/15
to clojure-...@googlegroups.com, Bob Larrick
On 23 January 2015 at 00:47:22, Bob Larrick (lar...@gmail.com) wrote:
> I don't have any idea at all what Ogre version is packaged inside
> titanium.
> I don't know where ogre.core is coming from, or if ogre.io exists
> in that version, or how to find out what ogre is bundled with titanium.
>
> I am trying to export the graph, all these other things are incidental
> (altho possibly important).
>
>
> Let me start at the beginning, How do i export the nodes and edges
> of a graph built in titanium, as in the repo linked above?

You need to install both libraries from source. This is fairly straightforward:

lein install

in both Titanium and Ogre repos should do it. Then update your dependencies
to

 * "1.0.0-beta3-SNAPSHOT" for Titanium
 * "3.0.0.0-SNAPSHOT" for Ogre

Then clojurewerkz.ogre.io should be available.

We should begin releasing snapshots to Clojars soon.
--
@michaelklishin, github.com/michaelklishin

Bob Larrick

unread,
Jan 23, 2015, 11:38:06 AM1/23/15
to clojure-...@googlegroups.com, lar...@gmail.com
OK getting closer I think, using builds from source I now get
"CompilerException java.lang.ClassNotFoundException: com.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory, compiling:(clojurewerkz/ogre/graph.clj:1:1) "
when trying to require [clojurewerkz.ogre.io :as oio] .

[clojurewerkz.ogre.core :as oc] works fine.

Had to update java to 8 and remove clojurewerkz.titanium.types from the require list. 

Any ideas about the TinkerFactory issue?     

Michael Klishin

unread,
Jan 23, 2015, 11:40:18 AM1/23/15
to clojure-...@googlegroups.com, Bob Larrick
On 23 January 2015 at 19:38:06, Bob Larrick (lar...@gmail.com) wrote:
> OK getting closer I think, using builds from source I now get
> "CompilerException java.lang.ClassNotFoundException:
> com.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory,
> compiling:(clojurewerkz/ogre/graph.clj:1:1) "
> when trying to require [clojurewerkz.ogre.io :as oio] .
>
> [clojurewerkz.ogre.core :as oc] works fine.
>
> Had to update java to 8 and remove clojurewerkz.titanium.types
> from the require list.
>
> Any ideas about the TinkerFactory issue?

ogre.io may need updating because TinkerPop 3 changes pretty fast.
--
@michaelklishin, github.com/michaelklishin

Bob Larrick

unread,
Jan 23, 2015, 12:26:35 PM1/23/15
to clojure-...@googlegroups.com, lar...@gmail.com
OK I removed the import for TinkerFactory and TinkerGraph from ogre.graph and rebuild Ogre from source, and now the require in my project i successful.

But I guess some things in Titanium have changed, there doesn't seem to be a `transact!` method in titanium.graph anymore?  What is the equivalent now?

Also when trying to open a new graph "(tg/open (System/getProperty "java.io.tmpdir"))" i get 
"IllegalArgumentException Need to specify a readable configuration file, but was given: /var/folders/f3/gm70cz9550n2_dwnydn92nkh0000gn/T  com.google.common.base.Preconditions.checkArgument (Preconditions.java:120)"


Maybe I'm approaching this all wrong.  To back up even further, I have a dataset that it is convenient to model as a graph.  I was hoping to us Titanium to model and then query the data, with the ultimate goal of providing a web interface to explore and query the graph.  I'd like to visualize the graph in its entirety, for exploration, and also visualize the result of queries against it using either D3 or sigma.js.  

Maybe instead of chasing export, I should focus on writing a function that takes the result of a query and converts it to json, suitable for the js visualization to consume.

Do you think I would be better served by continuing to try and get export working, or should I go back to the stable version and write my own function to export?

Michael Klishin

unread,
Jan 23, 2015, 1:26:57 PM1/23/15
to clojure-...@googlegroups.com, Bob Larrick
On 23 January 2015 at 20:26:36, Bob Larrick (lar...@gmail.com) wrote:
> Also when trying to open a new graph "(tg/open (System/getProperty
> "java.io.tmpdir"))" i get
> "IllegalArgumentException Need to specify a readable configuration
> file, but was given: /var/folders/f3/gm70cz9550n2_dwnydn92nkh0000gn/T

The argument expected is a file path while java.io.tmpdir is a directory path.
--
@michaelklishin, github.com/michaelklishin

Michael Klishin

unread,
Jan 23, 2015, 1:27:09 PM1/23/15
to clojure-...@googlegroups.com, Bob Larrick
On 23 January 2015 at 20:26:36, Bob Larrick (lar...@gmail.com) wrote:
> Maybe instead of chasing export, I should focus on writing a
> function that takes the result of a query and converts it to json,
> suitable for the js visualization to consume.

This is a great idea.


> Do you think I would be better served by continuing to try and get
> export working, or should I go back to the stable version and write
> my own function to export?

Older versions are unlikely to get much attention.
--
@michaelklishin, github.com/michaelklishin

Stephen Mallette

unread,
Jan 26, 2015, 7:25:58 AM1/26/15
to clojure-...@googlegroups.com
I would suspect a lot of incompatibilities in trying to use the latest SNAPSHOT of Ogre in conjunction with any version of Titanium.  The main problem is that Titan does not yet fully support TinkerPop3 - you can see the work happening in this branch:




--
You received this message because you are subscribed to the Google Groups "Clojure Titanium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-titani...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages