Re: [structr] Embedded Neo4J admin ?

190 views
Skip to first unread message

Axel Morgner

unread,
Oct 27, 2012, 4:59:42 AM10/27/12
to str...@googlegroups.com
Hi Seb,

at the moment, the only way to see structr's nodes and rels through the Neo4j webadmin is to duplicate the db directory and use it with a standalone Neo4j server (or simply stop structr and start Neo4j server pointing to the same db directory).

Although, there are three future options to use structr and Neo4j server at the same time:

a) Include Neo4j server as a structr module
b) Include structr as a Neo4j server plugin
c) Use the HA setup to replicate between two repos

All solutions require a certain amount of hacking, but all of them thould be doable. We'll add some of these options to our roadmap, as it is a often-requested feature.

Please note, that all structr modules are currently undergoing a serious refactoring, including a change to the data model of structr UI, so we need to wait for this being finished in order to go for the integration with Neo4j webadmin.

Cheers
Axel

Am 27.10.2012 00:59, schrieb Seb:
Hi,

I would like to see raw Neo4J graph created by stuctr. Does strctr-ui provide the Neo4J web admin ?
If not how could I embed it in order to view Neo4J nodes and relationships ?

Thanks



--

Axel Morgner · ax...@morgner.de · @amorgner

c/o Morgner UG · Hanauer Landstr. 291a · 60314 Frankfurt · Germany
phone: +49 151 40522060 · skype: axel.morgner

structr - Open Source CMS and Web Framework based on Neo4j: http://structr.org
structr Mailing List and Forum: https://groups.google.com/forum/#!forum/structr
Graph Database Usergroup "graphdb-frankfurt", sponsored by Neo4j: http://www.meetup.com/graphdb-frankfurt
Das Sport-Sharing-Netzwerk des Deutschen Olympischen Sportbundes (DOSB): https://splink.de


Seb

unread,
Oct 27, 2012, 8:55:12 AM10/27/12
to str...@googlegroups.com
Thanks.

If you have the time, I would be really interested to know more details about 0.6 changes (especially related to the data model), and what improvements it will make it possible for end users or developers.

Axel Morgner

unread,
Oct 27, 2012, 7:28:47 PM10/27/12
to str...@googlegroups.com
If you have the time, I would be really interested to know more details about 0.6 changes (especially related to the data model), and what improvements it will make it possible for end users or developers.

Sure.

Basically, we're doing a complete rework of the internal type mapping system in structr-core and structr-rest.

Type mapping is needed because there are different representations of a property, f.e. JSON types on the input side, Java types in the middleware, and database types for storage in Neo4j. For example, take a date property:

JSON: String with ISO 8601 formatting ("2012-10-27T15:41:45+0200")
Java: java.util.Date (Java Object)
Neo4j: long (1351345305)

or boolean as another example:

JSON: true/false/null, "true"/"false"/"", 0/1, "0"/"1", "on"/"off" ...
Java: java.lang.Boolean or boolean
Neo4j: boolean

The necessary converting is done automatically in the structr framework, but up to now, the property definitions in structr were just enums (or Strings), which are typeless. The type of the property was defined explicitly by registering a converter (f.e. a org.structr.core.converter.DateConverter to convert between the different representations of a date). But to be frank, that's awkward and not stringent as it could and should be.

After the rework (btw, you can see the ongoing work in the feature/typed_property_keys branch), there are typed properties in structr, which will give us f.e. the possibility of early type checking (in the REST resources), compile-time type-safety in Java, and implicit converters.


Some other changes are related to the data model of structr UI. We found that the current data model (as of 0.5.3) is incomplete. In detail, it has the flaw that it's impossible to express that a certain node (y) is grandchild of a node (a), but not grandchild of another node (b), if there's a parent node (p) between y and a,b in the hierarchy.

a   b                            <div id="a">
 \ /                               <p>
  p       always results in          y
  |                                </p>
  y                              </div>
                                 <div id="b">
                                   <p>
                                     y
                                   </p>
                                 </div>

The result

<div id="a">
  <p>
    y
  </p>
</div>
<div id="b">
  <p>
  </p>
</div>

(with "y" containted in the <p> within the "a" div, but not in the <p> within the "b" div, was not possible to represent in 0.5.3. The reason for that is that we currently store only the pageId and the local (means: relative to the the parent node) position index of a child node as relationship properties, so the information of (p) being child of (a) but not (b) gets lost on the way down to (y).

There's no final implementation of the modified data model yet, as we're experimenting with different approaches. But when it is finished, we hope to have a complete and flawless page data model, which would allow us to stabilize the UI and finally go forward to add features. If you are interested in details, I can share some slides I made to illustrate the problem.

Hope to have shed some light on this.

Best regards et à bientôt

Axel


Le samedi 27 octobre 2012 10:59:46 UTC+2, Axel Morgner a écrit :
Hi Seb,

at the moment, the only way to see structr's nodes and rels through the Neo4j webadmin is to duplicate the db directory and use it with a standalone Neo4j server (or simply stop structr and start Neo4j server pointing to the same db directory).

Although, there are three future options to use structr and Neo4j server at the same time:

a) Include Neo4j server as a structr module
b) Include structr as a Neo4j server plugin
c) Use the HA setup to replicate between two repos

All solutions require a certain amount of hacking, but all of them thould be doable. We'll add some of these options to our roadmap, as it is a often-requested feature.

Please note, that all structr modules are currently undergoing a serious refactoring, including a change to the data model of structr UI, so we need to wait for this being finished in order to go for the integration with Neo4j webadmin.

Cheers
Axel

Am 27.10.2012 00:59, schrieb Seb:
Hi,

I would like to see raw Neo4J graph created by stuctr. Does strctr-ui provide the Neo4J web admin ?
If not how could I embed it in order to view Neo4J nodes and relationships ?

Thanks



--

Axel Morgner · ax...@morgner.de · @amorgner

c/o Morgner UG · Hanauer Landstr. 291a · 60314 Frankfurt · Germany
phone: +49 151 40522060 · skype: axel.morgner

structr - Open Source CMS and Web Framework based on Neo4j: http://structr.org
structr Mailing List and Forum: https://groups.google.com/forum/#!forum/structr
Graph Database Usergroup "graphdb-frankfurt", sponsored by Neo4j: http://www.meetup.com/graphdb-frankfurt
Das Sport-Sharing-Netzwerk des Deutschen Olympischen Sportbundes (DOSB): https://splink.de


--
You received this message because you are subscribed to the Google Groups "structr" group.
To post to this group, send an email to str...@googlegroups.com.
To unsubscribe from this group, send email to structr+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msg/structr/-/C-4Zi54F2w8J.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Sébastien Deleuze

unread,
Oct 28, 2012, 5:19:40 AM10/28/12
to str...@googlegroups.com
Thanks for your feedback. I have began to play with feature/typed_property_keys branch.
I would be very interested by your slides.

Since Structr is template less, I would also like to understand how do you currently (or plan) to deal with rendering of dynamic data elements, for example rendering a list of users stored in Neo4J.
In classical CMS, I would write a component with a template containing a loop, put a user collection in this component instance context in order to render it, and attach it to a HTML DOM element.

I have played with the backoffice and understood how you do Neo4J nodes + relationaship mapping to HTML elements, but with non HTML node, how do you manage this in Structr ? Don't you have to use templates or views to specify how to render these data ?

Best regards,
Sébastien Deleuze

Axel Morgner

unread,
Oct 31, 2012, 8:31:30 AM10/31/12
to str...@googlegroups.com
We recently finished the refactoring, and feature/typed_property_keys was merged into develop.

Before we can release 0.6, we still need to fix some other things, esp. structr-ui.


Am 28.10.2012 10:19, schrieb Sébastien Deleuze:
Thanks for your feedback. I have began to play with feature/typed_property_keys branch.
I would be very interested by your slides.

Since Structr is template less, I would also like to understand how do you currently (or plan) to deal with rendering of dynamic data elements, for example rendering a list of users stored in Neo4J.

In classical CMS, I would write a component with a template containing a loop, put a user collection in this component instance context in order to render it, and attach it to a HTML DOM element.

I have played with the backoffice and understood how you do Neo4J nodes + relationaship mapping to HTML elements, but with non HTML node, how do you manage this in Structr ? Don't you have to use templates or views to specify how to render these data ?

This is accomplished by using dynamic components (View, RemoteView and Component classes).

For View and RemoteView, you can simply use a Cypher statement to be executed at runtime (View for queries to the local database, RemoteView connects to a remote Neo4j database). The rendering process then loops through the result list and applies the markup contained in the respective View node.

So if you like, you could call the inner markup of a View/RemoteView node a template. From the markup nodes, you can access the result list objects (f.e. the User nodes) with placeholder statements like ${data.name} (this would call user.getProperty("name") internally f.e.).

Another, more complex way to handle dynamic content in structr are Component nodes. They are kind of dynamic data objects, and their data fields are equal to the content of certain child elements (Content nodes) which are tagged with the data_key property, which equals the field name.

Please note that all this stuff is still pretty much experimental and subject to frequent future changes, and therefore, there's no official documentation available.

Cheers
Axel

Peter Neubauer

unread,
Oct 31, 2012, 10:01:50 AM10/31/12
to str...@googlegroups.com

Cool,
Are you going to do a screen cast?

/peter

Send from mobile device.

John Swain

unread,
Oct 3, 2014, 4:03:33 AM10/3/14
to str...@googlegroups.com
Axel,

any update on integration with Neo4j Server? This would be the killer feature for me.

At the moment I have a workaround by switching the db file between Structure & Neo4j Server, but that means I cannot use both at the same time.

js

Michael Hunger

unread,
Oct 3, 2014, 6:28:57 AM10/3/14
to str...@googlegroups.com
John,

are you interested in the UI functionality of Neo4j ? (Which could be replicated in Structr-Admin) 
or in the server aspect, i.e. installin Neo4j as a server? (Which is the same as structr server)

Just curious which part of Neo4j Server is important / relevant for you.

I agree in general that it would be a killer feature if Structr-Admin + Structr could be a power-tool on top of an existing Neo4j server installation, adding:
- security
- schema
- fast remote protocol
- multitenancy ?
- much more

The challenge there is that structr integrates pretty deeply with Neo4j embedded and also comes with its own http stack.

So this would have to be implemented by splitting structr in two.

#1 an neo4j-kernel extension that adds all the features directly to the database and (somehow) also adds the structr-remoting
#2 the structr-admin as advanced UI to talk to that extension via the websocket protocol

I think it should be possible the only drawback would be the http stack (websocket) used by structr conflicting with Neo4j servers jetty version.
Perhaps it would make sense to switch to something else (for high performance websockets) like netty so that there would be no conflict (at least for Neo4j community).
And the second interesting area would be lifecycle management of the server but there are enough hooks in neo4j that that should be possible.

Perhaps such a development could be co-sponsored by the structr users? That would be pretty awesome.

Cheers, Michael



--
You received this message because you are subscribed to the Google Groups "structr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to structr+u...@googlegroups.com.
To post to this group, send email to str...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/structr/8c031f10-4c98-48e8-8076-25a09ed066d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eric Schleicher

unread,
Oct 3, 2014, 6:46:57 PM10/3/14
to str...@googlegroups.com
slightly different question emerging for me on this thread.

I don't have a use need for a dedicated (non-embedded) version of Neo for structr, but i would very much like to be able to use a web tool to explore the whole graph database (not just the stuff exposed/represented through schema metadata) i can see that neo shell is exposed(able), but i'm not a cypher expert yet and i would love to be able to see the data like this (from the community web admin).  I find the bubble view quite helpful.  how can i do this with the data in structr's embedded neo?


I'll accept in advance this that is likely a very silly questions.  I just don't know how/what UI or application to query that data with.


Any tips appreciated

Reply all
Reply to author
Forward
0 new messages