Is it possible to use the default graph from neo4j? - neo4j

I'm using neo4j for a web-app I am creating. I have no problem getting data back from the REST API as I expect. However, I would prefer to not have to deal with lots of custom work in terms of graphing everything. I would love to just be able to embed/use the same graph that neo4j uses to show you query results at http://localhost:7474/browser/ on my page. I tried doing an iFrame to it but that had all sorts of problems.
Is this possible? I've been looking for an hour now trying to figure out how to do it or what libraries they use, but to no avail.

You can check out my demo project, which uses two visualizations (two branches) one which is very close to what Neo4j Server uses (all js client code talking to a Neo4j server):
demo:
http://jexp.github.io/cy2neo/
branch master:
https://github.com/jexp/cy2neo
branch neo3d:
https://github.com/jexp/cy2neo/tree/neod3

Related

Open a query and its visualization in Neo4J from browser

I have a host running neo4j engine, say: neo4jhost:7474
I would like certain users to be able see query results in a browser, from a pre-generated link. Thus, user could explore the graph interactively, without messing with the query syntax.
For example: let the query be
(n)-[r]->(m) where n.id=123 return n,r,m
I need a URL link that produces the above mentioned query, but displays the result in a browser, in neo4j graph visualization format.
Currently, Neo4j Browser does not have this feature.
However, you can use a graph visualization library to embed the graph visualization into your web application. Some examples of JavaScript graph visualization libraries:
D3.js
VivaGraphJS
Sigma
KeyLines
Alchemy.js
Alternatively, since Neo4j Browser is an Open-source tool you can checkout the project and modify it to achieve your goal.
As already mentioned, Neo4j browser does not have this functionality. However, you can have a look at the popoto.js. It might not be exactly what you are looking for, but it has dynamic natural language query tracker and Cypher Query generation functionalities.
I suggest to inspect and do some re-engineering on the functions to figure out more details. Maybe it gives new ideas as well.

Good example of how to document graph structure made in Neo4j or OrientDB

Is there any best practise or good example which shows how to document graph ontologies.
I assume you want to document your graph database structure.
I like the idea of neo4j graph gists. It is possible to generate such interactive graph gist using a regular github asciidoc gist which contains cypher code to describe your graph.
Example Neo4j Graph Gist
Github Gist Source
At some point it was also possible to host your own neo4j graph gist portal but I'm not sure whether this is still possible.

Erlang: query more than 1000 LDAP elements using "eldap" library

I am using ejabberd, a jabber daemon written in Erlang. It is connected to our Active Directory using its LDAP interface and Erlang's eldap library.
Everything works so far with a small limitation causing a big problem:
A normal LDAP query receives up to 1000 elements and then stops.
We have more than 1000 employees and therefore receiver only a part of the whole query
Using *nix' ldapsearch tool, I can use the option -E pr=1000/noprompt for receiving multiple pages (which finally get concatenated to a single one) without any limitation.
How could I use this function using Erlang's eldap library?
I already read through the source code, but don't seem to find anything obvious.
#erlang had some nice ideas about this:
emauton: It looks to me like you're out of luck. Paged results are supplied by an LDAP extension, described in http://www.rfc-editor.org/rfc/rfc2696.txt. If you look at ldapsearch, you can see this being added to the query at http://goo.gl/lemNOS
emauton: Reading through the eldap source, this extension doesn't make an appearance. The good news is that it shouldn't be too hard to add, I think, by messing about with the 'controls' part of the LDAPMessage.
emauton: You should be able to set up your request according to the RFC using the right controlType & contents (referencing the ldapsearch code) and use it to make a paginating version of eldap:search

Using the Neo4j Server Web Interface for visualization on a Public website

I'm looking at visualization options for a graph database project that I have coming up. Part of the job is to provide an interactive visualization of the data for public website visitors.
The standard Neo4j Server Web Interface does all I would need it to and more. I was wandering if I could simply embed it in a webpage or provide a public url (that could be accessed without a login) that general users could use to view the visualization without being able to edit it or add nodes/relationships? If you know of any examples of how this can be done, I would be very grateful.
Thanks!
The Neo4j browser is an Angular.js application using d3.js as visualization. The code is all open source an on https://github.com/neo4j/neo4j/tree/2.2/community/browser/lib/visualization so you can check it out there.
In general http://maxdemarzi.com is a good source for visualization blog posts as is http://neo4j.org/develop/visualization
Check out Neo4j GraphGists. A GraphGist allows you to embed a Neo4j database, Cypher queries, and visualize the results in a web page. Lots of examples listed on the GraphGist wiki.
Also take a look at Mashed Datatoes, a bar chart, pie chart like visualization software for Neo4j.
It uses Movie database for demo. Try selecting "Person" as start label.

Does neo4j have all the proper apis and support for all the mentioned drivers?

I used Node js for my webapp and I wanted to create a new user with unique email ID and hence that required me to look up the index table but then I realised that the Node Driver doesn't have the index() function as the one in Java( graphDb.index() ). Any work around for such an issue, like using REST or some Cypher connetor
Neo4j just so happens to have a wonderful REST API that should work for your application. The docs for the api are detailed here:
http://docs.neo4j.org/chunked/milestone/rest-api.html.
It even has an entire section devoted to indexing.

Resources