Will JS plugin arrive in 1.7

37 views
Skip to first unread message

Johnny Weng Luu

unread,
Mar 18, 2012, 10:04:02 AM3/18/12
to ne...@googlegroups.com
Congrats for the release of 1.7.

I'm curious about if the JS plugin will be there in one of the 1.7 milestones.

Johnny

Peter Neubauer

unread,
Mar 18, 2012, 10:26:38 AM3/18/12
to ne...@googlegroups.com

James, Marko,
How stable is Gremlin Javascript? The problem is that there is a large perception that Gremlin IS pipes + groovy.. Deployment of different variations Imho might create confusion and docs duplication if it is not fully mainstream?

Johnny Weng Luu

unread,
Mar 18, 2012, 12:50:07 PM3/18/12
to ne...@googlegroups.com
I recall that you were saying that JavaScript is the way to go for the mainstream somewhere.

JS definitely feels more embraced for web development than Java so more people could use Neo4j.

Johnny

Peter Neubauer

unread,
Mar 18, 2012, 12:59:09 PM3/18/12
to ne...@googlegroups.com

Yes,
I will test and check the plugin next week. Also, the JS engine i think is much more stable than groovy.
Only thing is that most of examples, releases and existing installations are on groovy. Let's discuss this more during next week!

Marko Rodriguez

unread,
Mar 18, 2012, 1:27:08 PM3/18/12
to ne...@googlegroups.com
Hi,

Gremlin-JavaScript hasn't been built yet. If someone wants to provide a pull request, I'd be more than happy to give it a strong eye and merge it into Gremlin if its good.

Marko.

Peter Neubauer

unread,
Mar 18, 2012, 3:22:17 PM3/18/12
to ne...@googlegroups.com

Well,
James and I have been sketching on a Javascript plugin for the neo4j server, see
https://github.com/neo4j/javascript-plugin

There are some tests missing, but we are discussing if Javascript is a better base for hosted environments...

Peter Neubauer

unread,
Mar 19, 2012, 9:22:07 AM3/19/12
to ne...@googlegroups.com
Also,
note that the plugin IS working now, there are two issues that you or
James could look at, seem the ignored tests in JSPluginTest.

Basically, [1,2,3] gives back a rhino.NativeArray that is not in the
inheritance hierarchy of java.util.Array at all, some thing from
{"test":"test"} giving back a NativeObject instead of a java.utl.Map
instance ...

/peter

Johnny Weng Luu

unread,
Mar 20, 2012, 5:07:27 AM3/20/12
to ne...@googlegroups.com
Something I thought about today.

Most databases are very simple in the sense that they only allow you to do simple things with HTTP requests (CRUD).

That would be like browsers forcing you to create a DOM element with a HTTP request, and remove it with another. The logic is forced to be in the server, which of course is not the case today. We are all just scripting directly in the browser with JS instead of having the logic in the server with unnecessary HTTP requests back and forth.

In the database world however the logic is forced to be in server land mostly, except when using Neo4j. Using Neo4j we can send Java(Script) scripts to the database to script directly just like we are sending HTML scripts to the browser.

What I strongly believe in is using JS on server (node.js), JS in browser, JS on desktop/laptop/mobile/tablet (Blossom/Phonegap) and JS in database (Neo4j).

I just wanted to share this thought. JS in Neo4j would be such a game changer for web apps running everywhere replacing the less efficient HTTP CRUD.

Johnny

Peter Neubauer

unread,
Mar 20, 2012, 5:36:08 AM3/20/12
to ne...@googlegroups.com
Johnny,
actually, that is what we are thinking about. Having one scripting
language enabled (and locked down to a sensible level, so you can't do
System.exit etc) would be really nice and perfect as a way to write
extensions where Cypher is not enough. Would that be something you can
live with?

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

Neo4j 1.6 released                 - dzone.com/6S4K
The Neo4j Heroku Challenge   - http://neo4j-challenge.herokuapp.com/

Johnny Weng Luu

unread,
Mar 20, 2012, 9:47:00 AM3/20/12
to ne...@googlegroups.com
What "something" are you referring to in "would that be something you can live with?"

Having JS locked down?

If so, that would make sense since you shouldn't be able to access things outside your security scope.

Johnny

James Thornton

unread,
Mar 20, 2012, 10:41:33 AM3/20/12
to ne...@googlegroups.com

On Tuesday, March 20, 2012 3:36:08 AM UTC-6, Peter Neubauer wrote:
Johnny,
actually, that is what we are thinking about. Having one scripting
language enabled (and locked down to a sensible level, so you can't do
System.exit etc) would be really nice and perfect as a way to write
extensions where Cypher is not enough. Would that be something you can
live with?

Locked down? -- Are the Heroku instances running in a shared environment?

- James 

Rick Bullotta

unread,
Mar 20, 2012, 5:27:55 PM3/20/12
to ne...@googlegroups.com
Peter et al : We have a lot of experience with Rhino, particularly in areas like this (dealing with the Java <-> JS boundary).  Rhino is embedded in our ThingWorx product. 

Peter Neubauer

unread,
Mar 21, 2012, 3:48:32 AM3/21/12
to ne...@googlegroups.com
Great Rick - do you know the best maven packaging of Rhino in order to
pull in a later version than the one packaged with the JRE?

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

Neo4j 1.6 released                 - dzone.com/6S4K
The Neo4j Heroku Challenge   - http://neo4j-challenge.herokuapp.com/

Reply all
Reply to author
Forward
0 new messages