Another Rails Neo4j.rb application and the need of a general neo4j database explorer ?

59 views
Skip to first unread message

Andreas Ronge

unread,
Dec 8, 2009, 3:28:40 PM12/8/09
to neo...@googlegroups.com
Hi

I have had a discussion with Oliver Bruening about creating a small
general neo4j database explorer.

He has developed a nice rails application
(http://github.com/obruening/neoviz) using the graphviz library, see
below how to install it.

I think it would be nice to have a command line graph viewer tool
Something like this:
$> graphview <neo_db_location>
and a window pops up with a view (maybe without a server first needed
to be installed, embedded HTML browser in java ???)

What would you like to see in such a tool ?


Installation of the Ruby On Rails Neo4j.rb application - neoviz
===============================================

sudo apt-get install graphviz

# build latest ruby-graphviz gem
git clone git://github.com/glejeune/Ruby-Graphviz.git
cd Ruby-Graphviz
jruby -S rake gem
jgem install --local pkg/ruby-graphviz-0.9.7 --no-rdoc --no-ri

# install treetop dependency
jruby -S gem install treetop

# install Ruby On Rails
jruby -S gem install -v=2.3.4 rails

cd ..
git clone git://github.com/obruening/neoviz.git
cd neoviz
jruby -S ./script/server

http://localhost:3000/people

There are a number of other nice HTML/javascript graph libraries one
can use like:
* http://www.ryandesign.com/canviz
* http://raphaeljs.com/
* http://www.caida.org/tools/visualization/walrus/

Craig Taverner

unread,
Dec 9, 2009, 3:26:46 AM12/9/09
to neo...@googlegroups.com
This sounds like a cool idea for a web based visualizer. But for a desktop visualizer, I use neoclipse and that works very well, also allowing editing of the database, nodes, relationships and properties.


--

You received this message because you are subscribed to the Google Groups "neo4jrb" group.
To post to this group, send email to neo...@googlegroups.com.
To unsubscribe from this group, send email to neo4jrb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/neo4jrb?hl=en.



Tobias Ivarsson

unread,
Dec 9, 2009, 5:46:53 AM12/9/09
to neo4jrb
Hi,

The grails system for visualizing graphs looks very cool indeed, and I
also like the idea of creating a command line tool for doing something
similar. And this is where I think I have something I could
contribute. I wrote a framework (in Java) for generating graphviz dot-
files from a Neo4j graph a while back. It was just written as a proof
of concept in awaiting for someone to need such a thing. This seems to
be a perfect use case.

The source code is available in the Neo4j laboratory:
https://svn.neo4j.org/laboratory/components/neo-graphviz/
and as I said it has not been touched in a while, but I think it could
be a good base for building a visualization tool. If combined with a
graph query/traversal language such as Gremlin (http://github.com/
tinkerpop/gremlin) I believe it would make quite a powerful, and
definitely useful tool.

Just wanted to throw the ideas out there, since I'd love to see
something like this, and if we could avoid duplicating parts of the
effort we could see such a thing much sooner :)

Cheers,

Tobias

Andreas Ronge

unread,
Dec 9, 2009, 7:02:31 AM12/9/09
to neo...@googlegroups.com
Hi

Thanks for the input !
Another idea is to build a tool around IRB that lets the user export
an Enumerable of nodes to a various format using Graphviz.
Example
irb(main):001:0> graphview some_node.traverse.outgoing(:contains,
:trips).filter { name == 'sweden' }
Btw, another topic(?): an export and import neo4j function would also
be cool with different formats like csv, excel, ...

That tool should support being started in both interactive and none
interactive mode.
If started in none interactive mode it takes command line arguments
for a traversals, like start node, traversal depth etc..
Example
$> graphview -node_id=1234 -depth=3 -types=friends
And then a browser windows opens (or a gif viewer...).

I think that tool could be a good complement to Neoclipse.
It should be quick to start and install.

The Gremlin query language looks interesting. One idea is to create
ruby DSL for some of its features (some of them are already supported
in neo4j.rb)

/Andreas

Craig Taverner

unread,
Dec 9, 2009, 11:41:33 AM12/9/09
to neo...@googlegroups.com
Wow, there seems to be a whole bunch of ideas discussed here. I have some comments too:
  • IRB console to neo4j. At the moment I have something a little like this with my AWEScript console, which is an IRB with require 'neo4j' at the top (and a bunch of other requires). Seems like we could whack a lot of crazy stuff in there to give the user a lot of interactive control of the database. Perhaps neo4j.rb could detect IRB and add a bunch of root methods for the user to type commands with. I'm doing that at the moment, but not with neo4j, only for access to my GIS.
  • Export/Import for known formats. I'm sad to say all my work here has been in pure Java, but then again that can be backed by a nicer ruby DSL. We are loading CSV and Excel into a neo4j based spreadsheet structure (cell nodes linked by column/row relationships, and indexed by, would you believe it, a Hilbert Curves based index! Thanks Nick). I think that a number of things might be useful as utilities in neo4j: xml->neo, csv->neo, excel->neo. The challenge is making them general. All our code is specific to our application and GUI.
By the way Andreas, we're trying a small extension to your node_traverser.rb that allows using a method like 'stop_on' to pass a block as a StopEvaluator (code almost identical to your ReturnableEvaluator class, but providing a stop evaluator). My developer and I brainstormed on this by pasting chunks of your code into a google wave session - very cool!
Reply all
Reply to author
Forward
0 new messages