Re: [Neo4j] BatchInserterIndex and ValueContext[]

2011-08-26 Thread Peter Neubauer
Ben,
that is faulty behavior, since the Batchinseter should insert the same data
as in normal operations. Could you provide a test and maybe fix it (fork on
GIThub)? Would be awesome! Otherwise, raise an issue in
https://github.com/neo4j/community so we can get to it ASAP!

Cheers,

/peter neubauer

GTalk:  neubauer.peter
Skype   peter.neubauer
Phone   +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter  http://twitter.com/peterneubauer

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


On Sat, Aug 27, 2011 at 3:12 AM, Benjamin Gehrels <
neo4j-mailingl...@gehrels.info> wrote:

> Hi folks,
>
> i've just - after a lot of searching - recognized, that the
> LuceneBatchInserterIndex handles ValueContext[] a little bit different
> than the normal one:
>
> When calling add(),  the LuceneIndex converts its Parameter to an
> Object[], and checks for each element if it is an ValueContext.
>
> The BatchInserterIndex checks the input parameter for beeing a
> ValueContext first, than converts it to an Object[] and indexing it
> Element by element.
>
> This results in a ValueContext[]{numeric(123L), numeric(456L)} being
> indexed as (123L,456L) when using the normal LuceneIndex, but
> ("123","456") when using the BatchInserterIndex.
>
> Is this intended behaviour?
>
> Best regards,
> Benjamin
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] BatchInserterIndex and ValueContext[]

2011-08-26 Thread Benjamin Gehrels
Hi folks,

i've just - after a lot of searching - recognized, that the 
LuceneBatchInserterIndex handles ValueContext[] a little bit different 
than the normal one:

When calling add(),  the LuceneIndex converts its Parameter to an 
Object[], and checks for each element if it is an ValueContext.

The BatchInserterIndex checks the input parameter for beeing a 
ValueContext first, than converts it to an Object[] and indexing it 
Element by element.

This results in a ValueContext[]{numeric(123L), numeric(456L)} being 
indexed as (123L,456L) when using the normal LuceneIndex, but 
("123","456") when using the BatchInserterIndex.

Is this intended behaviour?

Best regards,
Benjamin
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Server couldn't start after java.lang.OutOfMemoryError

2011-08-26 Thread Nuo Yan
Hey Adriano,

Thanks very much for your reply. I will try with MaxPermSize.

It's on my local machine, we are evaluating Neo4j and do not have it on
production yet. I'm accessing the server through the REST APIs, the app is
separate from Neo. I will see if I can do some profiling on Neo when I run
my tests.

Thanks,
Nuo



On Fri, Aug 26, 2011 at 3:53 PM, Adriano Henrique de Almeida <
adrianoalmei...@gmail.com> wrote:

> Hey Nuo,
>
> wrapper.java.maxmemory and Xmx won't help, since it is a PermGenSpace
> problem, and they only deal with HeapSpace. Did you try with:
> -XX:*MaxPermSize
> **?*
>
> Anyway, something very wrong is happening, since you have few nodes.
>
> It is happening only on production, or development also? If it is happening
> on development, try to isolate the situation where you're stucking the
> permgen. Run you app with VisualVM, for instance, or any other profiler.
> Aren't you dealing with classloaders on your app?
>
> Cheers
>
> Adriano Almeida
>
>
>
> 2011/8/26 Jim Webber 
>
> > Hi Nuo,
> >
> > if you're using Neo4j server then you can edit the value in
> > conf/neo-wrapper.conf
> >
> > wrapper.java.maxmemory=1024
> >
> > Jim
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> >
>
>
>
> --
> Adriano Almeida
> Caelum | Ensino e Inovação
> www.caelum.com.br
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Events Coming Up in September

2011-08-26 Thread Adriano Henrique de Almeida
Hi Allison, just adding,

There will be Jim Webber's talk at QCon São Paulo, in my track, (
http://www.qconsp.com/schedule/sabado), which will be on Saturday, September
10, and the workshop, 1 day before. (which I'll attend).

;)

Cheers,

Adriano Almeida

2011/8/26 Allison Sparrow 

> ***
> Hi Everyone,
>
> We have a bunch of great events coming up in September. Check it out below.
>
> We are adding more events on the regular, so be sure to check back at
> http://plancast.com/neo4j for updates throughout the month. If you have
> any
> questions regarding participation, feel free to email me at
> alli...@neotechnology.com.
>
>
> *WEBINAR: Getting Started with Neo4j*
> Thursday, 1 September @10:00 PDT
>
> Neo4j is the world's leading graph database, storing data in the nodes
> and relationships of a graph. The most generic of data structures, a
> graph elegantly represents any kind of data, preserving the natural
> structure of the domain.
>
> This webinar is designed to help developers achieve a fast start with
> Neo4j.. There are no pre-requisites. Join this webinar to learn:
>
> * basic graph concepts
> * modeling data in a graph
> * querying a graph
>
> Register:  https://www1.gotomeeting.com/register/491756720
>
> System Requirements
>
> PC-based attendees
> Required: Windows® 7, Vista, XP or 2003 Server
> Macintosh®-based attendees
> Required: Mac OS® X 10.5 or newer
>
>
> *LONDON Keynote: Ian Robinson presents @Progressive .NET Tutorials*
> Wednesday, 7 September @ 09:30 - 13:20 GMT
>
> This hands-on tutorial will introduce you to building RESTful web services
> using the new Microsoft Web APIs (http://wcf.codeplex.com). Over the
> course
> of several exercises, we'll develop a simple Fighting Fantasy service for
> machines to play when they're not busy running your business applications.
> The tutorial's mixture of theory and practice will cover:
> - Resource design and development
> - Test-driven server- and client-side development
> - The Atom Syndication Format
> - Caching
> - Hypermedia
>
>
> http://skillsmatter.com/podcast/open-source-dot-net/restful-web-service-development-in-dot-net
>
> *BAY AREA Meetup: Spring Data & Neo4j*
> Wednesday, 7 September @ 19:00 PDT
>
> Join us for an introduction to Spring Data, with a special emphasis on
> Spring Data Neo4j. We'll get you started with this exciting new technology,
> then take a deeper dive into how you can make the magic happen with Neo4j.
>
> www.meetup.com/graphdb/events/30126321/
>
> *WEBINAR: Getting Started with Spring Data Graph*
> Thursday, 8 September @ 10:00-11:00 PDT
>
> The Spring Data project makes it easier to build Spring-powered
> applications
> that use new data access technologies such as non-relational NOSQL
> databases, cloud based data services, and graph databases.
>
> This webinar is designed for enterprise developers who are working with
> Spring and need to understand if they can benefit from a graph database.
> The
> session will introduce the different types of data management offered in
> Spring Data, including graph databases, and will show how easy it is to get
> started with the Spring Data Graph project.
>
> https://www1.gotomeeting.com/register/622766136
>
> *KARLSKRONA (SWEDEN) Conference Talk: How Graph Databases Can Make You a
> Superstar @Devcon 2011 *
> Thursday, 15 September
>
>  Andres will be
> presenting
> about graph databases generally, and Neo4j specifically.
>
> telecomcity.org/hem/devcon11.aspx
>
> *SEATTLE Meetup: Neo4j in the Real World
> *Thursday, 15 September @ 19:00 PDT
>
> An evening learning about real world use cases for a graph database, citing
> a mix of actual and abstracted commercial deployments. We'll consider
> modeling a real domain, performance tuning, and deploying a local or
> geographically distributed cluster.
>
> www.meetup.com/graphdb-seattle/events/27968441/?rv=ea1.2
>
> *DENVER Conference Talk: Geoprocessing with Neo4j Spatial and OSM @FOSS4G *
> Friday, 16 September @ 14:00 MST
>
> Presentation by Craig Taverner, Amanzi. What better way to perform
> geoprocessing than on a graph! And what better dataset to play with than
> Open Street Map!
>
> 2011.foss4g.org/sessions/geoprocessing-neo4j-spatial-and-osm
>
> *ST. LOUIS Conference Talk: An Introduction to Doctor Who (and Neo4j)
> @Strange Loop 2011
> *Monday, 19 September
>
> Doctor Who is the world’s longest running science-fiction TV series.
> Battling daleks, cybermen and sontarans, and always accompanied by his
> trusted human companions, the last Timelord has saved earth from
> destruction
> more times than you’ve cursed Maven.
>
> Neo4j is the world’s leading open source graph database. Designed to
> interrogate densely connected data with lightning speed, it lets you
> traverse millions of nodes in a fraction of the time it takes to run a
> multi-join SQL query.
>
> When these two meet, the result is an entertaining introduction to the

Re: [Neo4j] Server couldn't start after java.lang.OutOfMemoryError

2011-08-26 Thread Adriano Henrique de Almeida
Hey Nuo,

wrapper.java.maxmemory and Xmx won't help, since it is a PermGenSpace
problem, and they only deal with HeapSpace. Did you try with: -XX:*MaxPermSize
**?*

Anyway, something very wrong is happening, since you have few nodes.

It is happening only on production, or development also? If it is happening
on development, try to isolate the situation where you're stucking the
permgen. Run you app with VisualVM, for instance, or any other profiler.
Aren't you dealing with classloaders on your app?

Cheers

Adriano Almeida



2011/8/26 Jim Webber 

> Hi Nuo,
>
> if you're using Neo4j server then you can edit the value in
> conf/neo-wrapper.conf
>
> wrapper.java.maxmemory=1024
>
> Jim
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Adriano Almeida
Caelum | Ensino e Inovação
www.caelum.com.br
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Executing arbitrary code through REST (was: Specifying "best first" order of traverse over REST API)

2011-08-26 Thread Jacopo Farina
Thanks a lot for the answer.
Cheers!
Jacopo Farina

2011/8/26 Javier de la Rosa 

> On Fri, Aug 26, 2011 at 13:12, Matt Luongo  wrote:
> > I think Javier is working on adding a "returns=" style parameter in
> > the most recent source so that
> > the client can figure out what type to cast the data into-
>
> Exactly, I have to fix some issues yet. Actually it would be great if
> there had some mechanism to set the type of returned values by an
> extension. But, in the mean time, the "returns" param is the only we
> can have.
>
>
>
> --
> Javier de la Rosa
> http://versae.es
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Neo4j Events Coming Up in September

2011-08-26 Thread Allison Sparrow
***
Hi Everyone,

We have a bunch of great events coming up in September. Check it out below.

We are adding more events on the regular, so be sure to check back at
http://plancast.com/neo4j for updates throughout the month. If you have any
questions regarding participation, feel free to email me at
alli...@neotechnology.com.


*WEBINAR: Getting Started with Neo4j*
Thursday, 1 September @10:00 PDT

Neo4j is the world's leading graph database, storing data in the nodes
and relationships of a graph. The most generic of data structures, a
graph elegantly represents any kind of data, preserving the natural
structure of the domain.

This webinar is designed to help developers achieve a fast start with
Neo4j.. There are no pre-requisites. Join this webinar to learn:

* basic graph concepts
* modeling data in a graph
* querying a graph

Register:  https://www1.gotomeeting.com/register/491756720

System Requirements

PC-based attendees
Required: Windows® 7, Vista, XP or 2003 Server
Macintosh®-based attendees
Required: Mac OS® X 10.5 or newer


*LONDON Keynote: Ian Robinson presents @Progressive .NET Tutorials*
Wednesday, 7 September @ 09:30 - 13:20 GMT

This hands-on tutorial will introduce you to building RESTful web services
using the new Microsoft Web APIs (http://wcf.codeplex.com). Over the course
of several exercises, we'll develop a simple Fighting Fantasy service for
machines to play when they're not busy running your business applications.
The tutorial's mixture of theory and practice will cover:
- Resource design and development
- Test-driven server- and client-side development
- The Atom Syndication Format
- Caching
- Hypermedia

http://skillsmatter.com/podcast/open-source-dot-net/restful-web-service-development-in-dot-net

*BAY AREA Meetup: Spring Data & Neo4j*
Wednesday, 7 September @ 19:00 PDT

Join us for an introduction to Spring Data, with a special emphasis on
Spring Data Neo4j. We'll get you started with this exciting new technology,
then take a deeper dive into how you can make the magic happen with Neo4j.

www.meetup.com/graphdb/events/30126321/

*WEBINAR: Getting Started with Spring Data Graph*
Thursday, 8 September @ 10:00-11:00 PDT

The Spring Data project makes it easier to build Spring-powered applications
that use new data access technologies such as non-relational NOSQL
databases, cloud based data services, and graph databases.

This webinar is designed for enterprise developers who are working with
Spring and need to understand if they can benefit from a graph database. The
session will introduce the different types of data management offered in
Spring Data, including graph databases, and will show how easy it is to get
started with the Spring Data Graph project.

https://www1.gotomeeting.com/register/622766136

*KARLSKRONA (SWEDEN) Conference Talk: How Graph Databases Can Make You a
Superstar @Devcon 2011 *
Thursday, 15 September

 Andres will be presenting
about graph databases generally, and Neo4j specifically.

telecomcity.org/hem/devcon11.aspx

*SEATTLE Meetup: Neo4j in the Real World
*Thursday, 15 September @ 19:00 PDT

An evening learning about real world use cases for a graph database, citing
a mix of actual and abstracted commercial deployments. We'll consider
modeling a real domain, performance tuning, and deploying a local or
geographically distributed cluster.

www.meetup.com/graphdb-seattle/events/27968441/?rv=ea1.2

*DENVER Conference Talk: Geoprocessing with Neo4j Spatial and OSM @FOSS4G *
Friday, 16 September @ 14:00 MST

Presentation by Craig Taverner, Amanzi. What better way to perform
geoprocessing than on a graph! And what better dataset to play with than
Open Street Map!

2011.foss4g.org/sessions/geoprocessing-neo4j-spatial-and-osm

*ST. LOUIS Conference Talk: An Introduction to Doctor Who (and Neo4j)
@Strange Loop 2011
*Monday, 19 September

Doctor Who is the world’s longest running science-fiction TV series.
Battling daleks, cybermen and sontarans, and always accompanied by his
trusted human companions, the last Timelord has saved earth from destruction
more times than you’ve cursed Maven.

Neo4j is the world’s leading open source graph database. Designed to
interrogate densely connected data with lightning speed, it lets you
traverse millions of nodes in a fraction of the time it takes to run a
multi-join SQL query.

When these two meet, the result is an entertaining introduction to the
complex history of a complex hero, and a rapid survey of the elegant APIs of
a delightfully simple graph database. With a data store packed full of geeky
Doctor Who facts, we’ll have you answering questions of the Doctor Who
universe like a die-hard fan.

https://thestrangeloop.com/sessions/an-introduction-to-doctor-who-and-neo4j
*
*
*LINZ (AUSTRIA) Conference Talk: Spring Data Graph Presentation @eJUG in
Austria *
Thursday, 29 September

Michael Hunger 

Re: [Neo4j] Server couldn't start after java.lang.OutOfMemoryError

2011-08-26 Thread Jim Webber
Hi Nuo,

if you're using Neo4j server then you can edit the value in 
conf/neo-wrapper.conf 

wrapper.java.maxmemory=1024

Jim
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Custom Neo4j Web Interfaces

2011-08-26 Thread Peter Neubauer
Michael,
the whole project is open source, you can build, fork and modify it from
https://github.com/neo4j/community .

The webadmin is part of the server project in
https://github.com/neo4j/community/tree/master/server

Let us know if you have questions, fork away!

Cheers,

/peter neubauer

GTalk:  neubauer.peter
Skype   peter.neubauer
Phone   +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter  http://twitter.com/peterneubauer

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


On Fri, Aug 26, 2011 at 10:11 PM, lordmj  wrote:

> Hello, I was wondering if there were any custom Neo4j web interfaces?
> Particularly ones which the source code can be modified.
>
> I thought for sure I had found one, but now I can't track it down.
>
> What is the default webadmin panel written in and can the source be
> modified?
>
> --
> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/Custom-Neo4j-Web-Interfaces-tp3287886p3287886.html
> Sent from the Neo4j Community Discussions mailing list archive at
> Nabble.com.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Custom Neo4j Web Interfaces

2011-08-26 Thread lordmj
Hello, I was wondering if there were any custom Neo4j web interfaces? 
Particularly ones which the source code can be modified.

I thought for sure I had found one, but now I can't track it down.

What is the default webadmin panel written in and can the source be
modified?

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Custom-Neo4j-Web-Interfaces-tp3287886p3287886.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Executing arbitrary code through REST (was: Specifying "best first" order of traverse over REST API)

2011-08-26 Thread Javier de la Rosa
On Fri, Aug 26, 2011 at 13:12, Matt Luongo  wrote:
> I think Javier is working on adding a "returns=" style parameter in
> the most recent source so that
> the client can figure out what type to cast the data into-

Exactly, I have to fix some issues yet. Actually it would be great if
there had some mechanism to set the type of returned values by an
extension. But, in the mean time, the "returns" param is the only we
can have.



-- 
Javier de la Rosa
http://versae.es
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Executing arbitrary code through REST (was: Specifying "best first" order of traverse over REST API)

2011-08-26 Thread Matt Luongo
Looks like the best-order stuff is being covered just fine in the other
thread, nevermind :)

--
Matt Luongo
Co-Founder, Scholr.ly



On Fri, Aug 26, 2011 at 1:20 PM, Matt Luongo  wrote:

> Peter,
>
> The arbitrary Groovy is great, but if I understand correctly, there still
> isn't a straightforward way to do a best-first traversal *with* paging- is
> there? It seems like that would require being able to introduce some sort of
> server-side state through the GremlinPlugin (for pages). Maybe the solution
> would be to re-run the traversal each time, and then return different
> slices, but that's a pretty painful tradeoff.
>
> --
> Matt Luongo
> Co-Founder, Scholr.ly
>
>
>
> On Fri, Aug 26, 2011 at 1:12 PM, Matt Luongo  wrote:
>
>> You can run the script through the Python neo4jrestclient by using the
>> extension support.
>>
>> Try
>> import neo4jrestclient.client as client
>> gdb = client.GraphDatabase('http://localhost:7474/db/data')
>> gdb.extensions.GremlinPlugin.execute_script(script="...")
>>
>> I think Javier is working on adding a "returns=" style parameter in
>> the most recent source so that
>> the client can figure out what type to cast the data into-
>>
>> import neo4jrestclient.constants as constants
>> gdb.extensions.GremlinPlugin.execute_script(script="...",
>> returns=constants.NODE)
>>
>> But I haven't gotten this working quite yet.
>>
>> --
>> Matt Luongo
>> Co-Founder, Scholr.ly
>>
>>
>>
>> On Fri, Aug 26, 2011 at 12:11 PM, Boris Kizelshteyn wrote:
>>
>>> I didn't have luck running it through neo4jrest, but the following
>>> function
>>> does the trick for me:
>>>
>>> script = "g.v(0)"
>>>
>>> def RunGremlinScript(script):
>>>
>>>content=[]
>>>
>>>jout=[]
>>>
>>>out={}
>>>
>>>try:
>>>
>>>h = Http()
>>>
>>>response, content = h.request(GRAPHSERVER +
>>> "ext/GremlinPlugin/graphdb/execute_script",\
>>>"POST",\
>>>json.dumps(dict(script=script)), \
>>>headers={'Accept':'application/json',
>>> 'Content-type': 'application/json'})
>>>
>>>
>>>jcontent = json.loads(content)
>>>
>>>for x in jcontent:
>>>
>>>if isinstance(x, dict):
>>>
>>>for arr in x['data']:
>>>
>>>for e in range(len(arr)):
>>>
>>>out[str(x['columns'][e])] = arr[e]
>>>
>>>jout.append(dict(out))
>>>
>>>else:
>>>
>>>return jcontent
>>>
>>>except:
>>>
>>>print "Unexpected error running gremlin: ", sys.exc_info()[0]
>>>
>>>print str(traceback.print_exc())
>>>
>>>print jcontent
>>>
>>>return [{}]
>>>
>>>return jout
>>>
>>> On Fri, Aug 26, 2011 at 12:01 PM, Jacopo Farina <
>>> jacopo1.far...@gmail.com>wrote:
>>>
>>> > Nice!
>>> > is there a way to run it easily from python with neo4jrestclient,
>>> avoiding
>>> > creating an http request manually ? In general, I wasn't able to
>>> understand
>>> > how to run a Gremlin script, or just a query, in python through the
>>> > restclient library.
>>> > Probably is a very simple business, but I started using it in Python
>>> just
>>> > yesterday.
>>> >
>>> > Cheers,
>>> > Jacopo
>>> >
>>> > 2011/8/25 Peter Neubauer 
>>> >
>>> > > Guys,
>>> > > with the custom sorting in Lucene and this thread coming up all the
>>> time,
>>> > I
>>> > > took the time to document the execution of arbitrary Groovy and thus,
>>> > Java
>>> > > calls through REST. In the example below, there are calls to Neo4j
>>> APIs,
>>> > > Gremlin stuff and custom sorting using Lucene classes, and return of
>>> a
>>> > > Neo4j
>>> > > search hit object.
>>> > >
>>> > > You can do all this in a Neo4j Server plugin, but if you need to,
>>> this is
>>> > > an
>>> > > example on how to do it with only REST.
>>> > >
>>> > >
>>> > >
>>> >
>>> http://docs.neo4j.org/chunked/snapshot/gremlin-plugin.html#rest-api-send-an-arbitrary-groovy-script---lucene-sorting
>>> > >
>>> > > Hope that helps for future reference!
>>> > >
>>> > > Cheers,
>>> > >
>>> > > /peter neubauer
>>> > >
>>> > > GTalk:  neubauer.peter
>>> > > Skype   peter.neubauer
>>> > > Phone   +46 704 106975
>>> > > LinkedIn   http://www.linkedin.com/in/neubauer
>>> > > Twitter  http://twitter.com/peterneubauer
>>> > >
>>> > > http://www.neo4j.org   - Your high performance graph
>>> > database.
>>> > > http://startupbootcamp.org/- Öresund - Innovation happens HERE.
>>> > > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing
>>> party.
>>> > >
>>> > >
>>> > > On Thu, Aug 25, 2011 at 1:00 AM, Matt Luongo  wrote:
>>> > >
>>> > > > +1, we could really use that. Client-side sorting sucks.
>>> > > >
>>> > > > --
>>> > > > Matt Luongo
>>> > > > Co-Founder, Scholr.ly
>>> > > >
>>> > > >
>>> > > >
>>> > > > On Wed, Aug 24, 2011 at 4:43 PM, Aseem Kishore <
>>> > aseem.kish...@gmail.com
>>> > > > >wrote:
>>> > > >
>>> > > > > I've just 

Re: [Neo4j] Executing arbitrary code through REST (was: Specifying "best first" order of traverse over REST API)

2011-08-26 Thread Matt Luongo
Peter,

The arbitrary Groovy is great, but if I understand correctly, there still
isn't a straightforward way to do a best-first traversal *with* paging- is
there? It seems like that would require being able to introduce some sort of
server-side state through the GremlinPlugin (for pages). Maybe the solution
would be to re-run the traversal each time, and then return different
slices, but that's a pretty painful tradeoff.

--
Matt Luongo
Co-Founder, Scholr.ly



On Fri, Aug 26, 2011 at 1:12 PM, Matt Luongo  wrote:

> You can run the script through the Python neo4jrestclient by using the
> extension support.
>
> Try
> import neo4jrestclient.client as client
> gdb = client.GraphDatabase('http://localhost:7474/db/data')
> gdb.extensions.GremlinPlugin.execute_script(script="...")
>
> I think Javier is working on adding a "returns=" style parameter in
> the most recent source so that
> the client can figure out what type to cast the data into-
>
> import neo4jrestclient.constants as constants
> gdb.extensions.GremlinPlugin.execute_script(script="...",
> returns=constants.NODE)
>
> But I haven't gotten this working quite yet.
>
> --
> Matt Luongo
> Co-Founder, Scholr.ly
>
>
>
> On Fri, Aug 26, 2011 at 12:11 PM, Boris Kizelshteyn wrote:
>
>> I didn't have luck running it through neo4jrest, but the following
>> function
>> does the trick for me:
>>
>> script = "g.v(0)"
>>
>> def RunGremlinScript(script):
>>
>>content=[]
>>
>>jout=[]
>>
>>out={}
>>
>>try:
>>
>>h = Http()
>>
>>response, content = h.request(GRAPHSERVER +
>> "ext/GremlinPlugin/graphdb/execute_script",\
>>"POST",\
>>json.dumps(dict(script=script)), \
>>headers={'Accept':'application/json',
>> 'Content-type': 'application/json'})
>>
>>
>>jcontent = json.loads(content)
>>
>>for x in jcontent:
>>
>>if isinstance(x, dict):
>>
>>for arr in x['data']:
>>
>>for e in range(len(arr)):
>>
>>out[str(x['columns'][e])] = arr[e]
>>
>>jout.append(dict(out))
>>
>>else:
>>
>>return jcontent
>>
>>except:
>>
>>print "Unexpected error running gremlin: ", sys.exc_info()[0]
>>
>>print str(traceback.print_exc())
>>
>>print jcontent
>>
>>return [{}]
>>
>>return jout
>>
>> On Fri, Aug 26, 2011 at 12:01 PM, Jacopo Farina > >wrote:
>>
>> > Nice!
>> > is there a way to run it easily from python with neo4jrestclient,
>> avoiding
>> > creating an http request manually ? In general, I wasn't able to
>> understand
>> > how to run a Gremlin script, or just a query, in python through the
>> > restclient library.
>> > Probably is a very simple business, but I started using it in Python
>> just
>> > yesterday.
>> >
>> > Cheers,
>> > Jacopo
>> >
>> > 2011/8/25 Peter Neubauer 
>> >
>> > > Guys,
>> > > with the custom sorting in Lucene and this thread coming up all the
>> time,
>> > I
>> > > took the time to document the execution of arbitrary Groovy and thus,
>> > Java
>> > > calls through REST. In the example below, there are calls to Neo4j
>> APIs,
>> > > Gremlin stuff and custom sorting using Lucene classes, and return of a
>> > > Neo4j
>> > > search hit object.
>> > >
>> > > You can do all this in a Neo4j Server plugin, but if you need to, this
>> is
>> > > an
>> > > example on how to do it with only REST.
>> > >
>> > >
>> > >
>> >
>> http://docs.neo4j.org/chunked/snapshot/gremlin-plugin.html#rest-api-send-an-arbitrary-groovy-script---lucene-sorting
>> > >
>> > > Hope that helps for future reference!
>> > >
>> > > Cheers,
>> > >
>> > > /peter neubauer
>> > >
>> > > GTalk:  neubauer.peter
>> > > Skype   peter.neubauer
>> > > Phone   +46 704 106975
>> > > LinkedIn   http://www.linkedin.com/in/neubauer
>> > > Twitter  http://twitter.com/peterneubauer
>> > >
>> > > http://www.neo4j.org   - Your high performance graph
>> > database.
>> > > http://startupbootcamp.org/- Öresund - Innovation happens HERE.
>> > > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing
>> party.
>> > >
>> > >
>> > > On Thu, Aug 25, 2011 at 1:00 AM, Matt Luongo  wrote:
>> > >
>> > > > +1, we could really use that. Client-side sorting sucks.
>> > > >
>> > > > --
>> > > > Matt Luongo
>> > > > Co-Founder, Scholr.ly
>> > > >
>> > > >
>> > > >
>> > > > On Wed, Aug 24, 2011 at 4:43 PM, Aseem Kishore <
>> > aseem.kish...@gmail.com
>> > > > >wrote:
>> > > >
>> > > > > I've just spent a bunch of time reading into how one can control
>> the
>> > > > > ordering of a traverse beyond simple "breadth first" or "depth
>> > first".
>> > > > More
>> > > > > precisely, even when breadth first, how one can control *which*
>> > > neighbors
>> > > > > are traversed first.
>> > > > >
>> > > > > (It matters less in which order they're traversed vs. which order
>> > > they're
>> > > > > ret

Re: [Neo4j] Executing arbitrary code through REST (was: Specifying "best first" order of traverse over REST API)

2011-08-26 Thread Matt Luongo
You can run the script through the Python neo4jrestclient by using the
extension support.

Try
import neo4jrestclient.client as client
gdb = client.GraphDatabase('http://localhost:7474/db/data')
gdb.extensions.GremlinPlugin.execute_script(script="...")

I think Javier is working on adding a "returns=" style parameter in
the most recent source so that
the client can figure out what type to cast the data into-

import neo4jrestclient.constants as constants
gdb.extensions.GremlinPlugin.execute_script(script="...",
returns=constants.NODE)

But I haven't gotten this working quite yet.

--
Matt Luongo
Co-Founder, Scholr.ly



On Fri, Aug 26, 2011 at 12:11 PM, Boris Kizelshteyn wrote:

> I didn't have luck running it through neo4jrest, but the following function
> does the trick for me:
>
> script = "g.v(0)"
>
> def RunGremlinScript(script):
>
>content=[]
>
>jout=[]
>
>out={}
>
>try:
>
>h = Http()
>
>response, content = h.request(GRAPHSERVER +
> "ext/GremlinPlugin/graphdb/execute_script",\
>"POST",\
>json.dumps(dict(script=script)), \
>headers={'Accept':'application/json',
> 'Content-type': 'application/json'})
>
>
>jcontent = json.loads(content)
>
>for x in jcontent:
>
>if isinstance(x, dict):
>
>for arr in x['data']:
>
>for e in range(len(arr)):
>
>out[str(x['columns'][e])] = arr[e]
>
>jout.append(dict(out))
>
>else:
>
>return jcontent
>
>except:
>
>print "Unexpected error running gremlin: ", sys.exc_info()[0]
>
>print str(traceback.print_exc())
>
>print jcontent
>
>return [{}]
>
>return jout
>
> On Fri, Aug 26, 2011 at 12:01 PM, Jacopo Farina  >wrote:
>
> > Nice!
> > is there a way to run it easily from python with neo4jrestclient,
> avoiding
> > creating an http request manually ? In general, I wasn't able to
> understand
> > how to run a Gremlin script, or just a query, in python through the
> > restclient library.
> > Probably is a very simple business, but I started using it in Python just
> > yesterday.
> >
> > Cheers,
> > Jacopo
> >
> > 2011/8/25 Peter Neubauer 
> >
> > > Guys,
> > > with the custom sorting in Lucene and this thread coming up all the
> time,
> > I
> > > took the time to document the execution of arbitrary Groovy and thus,
> > Java
> > > calls through REST. In the example below, there are calls to Neo4j
> APIs,
> > > Gremlin stuff and custom sorting using Lucene classes, and return of a
> > > Neo4j
> > > search hit object.
> > >
> > > You can do all this in a Neo4j Server plugin, but if you need to, this
> is
> > > an
> > > example on how to do it with only REST.
> > >
> > >
> > >
> >
> http://docs.neo4j.org/chunked/snapshot/gremlin-plugin.html#rest-api-send-an-arbitrary-groovy-script---lucene-sorting
> > >
> > > Hope that helps for future reference!
> > >
> > > Cheers,
> > >
> > > /peter neubauer
> > >
> > > GTalk:  neubauer.peter
> > > Skype   peter.neubauer
> > > Phone   +46 704 106975
> > > LinkedIn   http://www.linkedin.com/in/neubauer
> > > Twitter  http://twitter.com/peterneubauer
> > >
> > > http://www.neo4j.org   - Your high performance graph
> > database.
> > > http://startupbootcamp.org/- Öresund - Innovation happens HERE.
> > > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing
> party.
> > >
> > >
> > > On Thu, Aug 25, 2011 at 1:00 AM, Matt Luongo  wrote:
> > >
> > > > +1, we could really use that. Client-side sorting sucks.
> > > >
> > > > --
> > > > Matt Luongo
> > > > Co-Founder, Scholr.ly
> > > >
> > > >
> > > >
> > > > On Wed, Aug 24, 2011 at 4:43 PM, Aseem Kishore <
> > aseem.kish...@gmail.com
> > > > >wrote:
> > > >
> > > > > I've just spent a bunch of time reading into how one can control
> the
> > > > > ordering of a traverse beyond simple "breadth first" or "depth
> > first".
> > > > More
> > > > > precisely, even when breadth first, how one can control *which*
> > > neighbors
> > > > > are traversed first.
> > > > >
> > > > > (It matters less in which order they're traversed vs. which order
> > > they're
> > > > > returned if you're returning all results, since you can just sort
> on
> > > the
> > > > > client. But it matters a lot if you want to use the paged
> traverser,
> > > > since
> > > > > you're then only returning the first results.)
> > > > >
> > > > > I've learned that this is doable from Java by writing your own
> > > > > BranchSelector implementation:
> > > > >
> > > > > http://components.neo4j.org/neo4j/1.4.1/apidocs/
> > > > >
> > > > > I've found the built-in implementations, e.g. the pre-order
> > > breadth-first
> > > > > and depth-first:
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> https://github.com/neo4j/community/blob/master/kernel/src/main/java/org/neo4j/kernel/PreorderBreadthFirstSelec

Re: [Neo4j] Server couldn't start after java.lang.OutOfMemoryError

2011-08-26 Thread Nuo Yan
I later changed -Xmx to 1024m in the neo4j start script (./bin/neo4j line
109):

JAVA_OPTS="-server ${wrapper_java_additional} -Xmx1024m"

I only have a few thousands nodes so I thought 1G should be enough (when my
tests run, new nodes are being created frequently, but total number of nodes
is certainly below 10k when it went out of memory).

Increasing memory this way didn't help. Did I do it right?


On Fri, Aug 26, 2011 at 2:18 AM, Mattias Persson
wrote:

> Tried with more memory?
>
> 2011/8/26 Nuo Yan 
>
> > Hey Jim,
> >
> > It happened again and I'm pretty sure there was no other server process
> > running.
> >
> > Also this time when it crashed I saw this line in the console log (not
> > seeing this previously):
> >
> >  Could not load hsdis-.jnilib; library not loadable; PrintAssembly is
> > disabled
> >
> > When I tried to restart, data/graph.db/message.log shows a lot of lines
> > like
> > the following and fail with the error message in my last email:
> >
> > Thu Aug 25 15:18:15 PDT 2011: Injected one phase commit, txId=11611
> > Thu Aug 25 15:18:15 PDT 2011: Injected one phase commit, txId=11612
> > Thu Aug 25 15:18:15 PDT 2011: Injected one phase commit, txId=11613
> >
> >
> > On Tue, Aug 23, 2011 at 6:23 PM, Jim Webber 
> wrote:
> >
> > > Hi Nuo,
> > >
> > > > process [26266]... waiting for server to be
> > > >
> > >
> >
> ready.
> > > > BAD.
> > > > another server-process is running with []
> > >
> > > Just to check before we dig deeper, are you certain you don't have
> > another
> > > server process running?
> > >
> > > Jim
> > > ___
> > > Neo4j mailing list
> > > User@lists.neo4j.org
> > > https://lists.neo4j.org/mailman/listinfo/user
> > >
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> >
>
>
>
> --
> Mattias Persson, [matt...@neotechnology.com]
> Hacker, Neo Technology
> www.neotechnology.com
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] bug in neo4j-community-1.4.1-unix.tar.gz neo4j script ?

2011-08-26 Thread Francesco Ruffino
Thank you Chris!

I'm playing with the neo4j-shell.
I'm using the one I have found in the tar.gz

I have tried to run this command:
[myclient]$ ./neo4j-community-1.4.1/bin/neo4j-shell -host myserver -port 1337

but nothing happens: the shell remains hanging...

I have checked on the server-side
[myserver] netstat -an | grep 1337

I can see the port in LISTEN and then in ESTABLISHED:
tcp0  0 :::1337 :::*
 LISTEN
tcp0  0 :::10.226.222.155:1337
:::10.48.14.57:58329ESTABLISHED
 but nothing happens on the client side...

If I use the neo4j-shell directly on the server it works perfectly.

what is wrong?

thank you,
franz




2011/8/26 Chris Gioran :
> Hi,
>
> this is a known issue. Please follow the documentation and run from
> the installation root (/home/ec2-user/neo4j-community-1.4.1/ in your
> example) as
>
> bin/neo4j 
>
> cheers,
> CG
>
> On Fri, Aug 26, 2011 at 1:41 PM, Francesco Ruffino  
> wrote:
>> [ec2-user@xxx bin]$ pwd
>> /home/ec2-user/neo4j-community-1.4.1/bin
>>
>> [ec2-user@ bin]$ sudo ./neo4j start
>> Starting Neo4j Server...Error: missing Neo4j Library, expected at
>> /home/ec2-user/lib
>>
>>
>> doesn't resolve correctly the "$NEO4J_HOME" variable
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Executing arbitrary code through REST (was: Specifying "best first" order of traverse over REST API)

2011-08-26 Thread Boris Kizelshteyn
I didn't have luck running it through neo4jrest, but the following function
does the trick for me:

script = "g.v(0)"

def RunGremlinScript(script):

content=[]

jout=[]

out={}

try:

h = Http()

response, content = h.request(GRAPHSERVER +
"ext/GremlinPlugin/graphdb/execute_script",\
"POST",\
json.dumps(dict(script=script)), \
headers={'Accept':'application/json',
'Content-type': 'application/json'})


jcontent = json.loads(content)

for x in jcontent:

if isinstance(x, dict):

for arr in x['data']:

for e in range(len(arr)):

out[str(x['columns'][e])] = arr[e]

jout.append(dict(out))

else:

return jcontent

except:

print "Unexpected error running gremlin: ", sys.exc_info()[0]

print str(traceback.print_exc())

print jcontent

return [{}]

return jout

On Fri, Aug 26, 2011 at 12:01 PM, Jacopo Farina wrote:

> Nice!
> is there a way to run it easily from python with neo4jrestclient, avoiding
> creating an http request manually ? In general, I wasn't able to understand
> how to run a Gremlin script, or just a query, in python through the
> restclient library.
> Probably is a very simple business, but I started using it in Python just
> yesterday.
>
> Cheers,
> Jacopo
>
> 2011/8/25 Peter Neubauer 
>
> > Guys,
> > with the custom sorting in Lucene and this thread coming up all the time,
> I
> > took the time to document the execution of arbitrary Groovy and thus,
> Java
> > calls through REST. In the example below, there are calls to Neo4j APIs,
> > Gremlin stuff and custom sorting using Lucene classes, and return of a
> > Neo4j
> > search hit object.
> >
> > You can do all this in a Neo4j Server plugin, but if you need to, this is
> > an
> > example on how to do it with only REST.
> >
> >
> >
> http://docs.neo4j.org/chunked/snapshot/gremlin-plugin.html#rest-api-send-an-arbitrary-groovy-script---lucene-sorting
> >
> > Hope that helps for future reference!
> >
> > Cheers,
> >
> > /peter neubauer
> >
> > GTalk:  neubauer.peter
> > Skype   peter.neubauer
> > Phone   +46 704 106975
> > LinkedIn   http://www.linkedin.com/in/neubauer
> > Twitter  http://twitter.com/peterneubauer
> >
> > http://www.neo4j.org   - Your high performance graph
> database.
> > http://startupbootcamp.org/- Öresund - Innovation happens HERE.
> > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
> >
> >
> > On Thu, Aug 25, 2011 at 1:00 AM, Matt Luongo  wrote:
> >
> > > +1, we could really use that. Client-side sorting sucks.
> > >
> > > --
> > > Matt Luongo
> > > Co-Founder, Scholr.ly
> > >
> > >
> > >
> > > On Wed, Aug 24, 2011 at 4:43 PM, Aseem Kishore <
> aseem.kish...@gmail.com
> > > >wrote:
> > >
> > > > I've just spent a bunch of time reading into how one can control the
> > > > ordering of a traverse beyond simple "breadth first" or "depth
> first".
> > > More
> > > > precisely, even when breadth first, how one can control *which*
> > neighbors
> > > > are traversed first.
> > > >
> > > > (It matters less in which order they're traversed vs. which order
> > they're
> > > > returned if you're returning all results, since you can just sort on
> > the
> > > > client. But it matters a lot if you want to use the paged traverser,
> > > since
> > > > you're then only returning the first results.)
> > > >
> > > > I've learned that this is doable from Java by writing your own
> > > > BranchSelector implementation:
> > > >
> > > > http://components.neo4j.org/neo4j/1.4.1/apidocs/
> > > >
> > > > I've found the built-in implementations, e.g. the pre-order
> > breadth-first
> > > > and depth-first:
> > > >
> > > >
> > > >
> > >
> >
> https://github.com/neo4j/community/blob/master/kernel/src/main/java/org/neo4j/kernel/PreorderBreadthFirstSelector.java
> > > >
> > > >
> > > >
> > >
> >
> https://github.com/neo4j/community/blob/master/kernel/src/main/java/org/neo4j/kernel/PreorderDepthFirstSelector.java
> > > >
> > > > To achieve a custom "best first", Igor Dovgiy for example shared that
> > he
> > > > modeled his implementation of the breadth-first selector, except just
> > > using
> > > > a PriorityQueue instead of a regular Queue.
> > > >
> > > > My question is: is there any way to specify this sort of thing over
> the
> > > > REST
> > > > API instead of having to write a plugin? If not, does that sound like
> a
> > > > reasonable feature request?
> > > >
> > > > I really just want something simple: nodes ordered by some
> "timestamp"
> > > > property. It's killing us that we can't do this today. We might just
> > have
> > > > to
> > > > look into writing this as a plugin...
> > > >
> > > > Thanks!
> > > >
> > > > Aseem
> > > > ___
> > > > Neo4j mailing list
> >

Re: [Neo4j] Executing arbitrary code through REST (was: Specifying "best first" order of traverse over REST API)

2011-08-26 Thread Jacopo Farina
Nice!
is there a way to run it easily from python with neo4jrestclient, avoiding
creating an http request manually ? In general, I wasn't able to understand
how to run a Gremlin script, or just a query, in python through the
restclient library.
Probably is a very simple business, but I started using it in Python just
yesterday.

Cheers,
Jacopo

2011/8/25 Peter Neubauer 

> Guys,
> with the custom sorting in Lucene and this thread coming up all the time, I
> took the time to document the execution of arbitrary Groovy and thus, Java
> calls through REST. In the example below, there are calls to Neo4j APIs,
> Gremlin stuff and custom sorting using Lucene classes, and return of a
> Neo4j
> search hit object.
>
> You can do all this in a Neo4j Server plugin, but if you need to, this is
> an
> example on how to do it with only REST.
>
>
> http://docs.neo4j.org/chunked/snapshot/gremlin-plugin.html#rest-api-send-an-arbitrary-groovy-script---lucene-sorting
>
> Hope that helps for future reference!
>
> Cheers,
>
> /peter neubauer
>
> GTalk:  neubauer.peter
> Skype   peter.neubauer
> Phone   +46 704 106975
> LinkedIn   http://www.linkedin.com/in/neubauer
> Twitter  http://twitter.com/peterneubauer
>
> http://www.neo4j.org   - Your high performance graph database.
> http://startupbootcamp.org/- Öresund - Innovation happens HERE.
> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>
>
> On Thu, Aug 25, 2011 at 1:00 AM, Matt Luongo  wrote:
>
> > +1, we could really use that. Client-side sorting sucks.
> >
> > --
> > Matt Luongo
> > Co-Founder, Scholr.ly
> >
> >
> >
> > On Wed, Aug 24, 2011 at 4:43 PM, Aseem Kishore  > >wrote:
> >
> > > I've just spent a bunch of time reading into how one can control the
> > > ordering of a traverse beyond simple "breadth first" or "depth first".
> > More
> > > precisely, even when breadth first, how one can control *which*
> neighbors
> > > are traversed first.
> > >
> > > (It matters less in which order they're traversed vs. which order
> they're
> > > returned if you're returning all results, since you can just sort on
> the
> > > client. But it matters a lot if you want to use the paged traverser,
> > since
> > > you're then only returning the first results.)
> > >
> > > I've learned that this is doable from Java by writing your own
> > > BranchSelector implementation:
> > >
> > > http://components.neo4j.org/neo4j/1.4.1/apidocs/
> > >
> > > I've found the built-in implementations, e.g. the pre-order
> breadth-first
> > > and depth-first:
> > >
> > >
> > >
> >
> https://github.com/neo4j/community/blob/master/kernel/src/main/java/org/neo4j/kernel/PreorderBreadthFirstSelector.java
> > >
> > >
> > >
> >
> https://github.com/neo4j/community/blob/master/kernel/src/main/java/org/neo4j/kernel/PreorderDepthFirstSelector.java
> > >
> > > To achieve a custom "best first", Igor Dovgiy for example shared that
> he
> > > modeled his implementation of the breadth-first selector, except just
> > using
> > > a PriorityQueue instead of a regular Queue.
> > >
> > > My question is: is there any way to specify this sort of thing over the
> > > REST
> > > API instead of having to write a plugin? If not, does that sound like a
> > > reasonable feature request?
> > >
> > > I really just want something simple: nodes ordered by some "timestamp"
> > > property. It's killing us that we can't do this today. We might just
> have
> > > to
> > > look into writing this as a plugin...
> > >
> > > Thanks!
> > >
> > > Aseem
> > > ___
> > > Neo4j mailing list
> > > User@lists.neo4j.org
> > > https://lists.neo4j.org/mailman/listinfo/user
> > >
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> >
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Websocket Server instead of REST for Neo4J for access a DB

2011-08-26 Thread Rick Bullotta
We're doing some similar things using XMPP pub-sub and BOSH...

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Thomas Fritz
Sent: Friday, August 26, 2011 10:49 AM
To: Neo4j user discussions
Subject: Re: [Neo4j] Websocket Server instead of REST for Neo4J for access a DB

If you like partial results take a look at this paper:
http://research.microsoft.com/apps/pubs/default.aspx?id=131524 and
this cast: http://channel9.msdn.com/Events/MIX/MIX11/RES04

It uses rabin fingerprinting to detect changed chunks and only
transfers these changed chunks (like rsync does). In this case the
connecting side - the client - would also need some logic baked in
because the client, after connecting to the server, has to sent the
hashes of already retrieved chunks. So the server side can compute and
sent just those chunks which has updated. Maybe it makes sense for
some really big datasets.

Kind regards and cheers from Vienna




---
Thomas FRITZ
web http://fritzthomas.com
twitter http://twitter.com/thomasf



2011/8/26 Peter Neubauer :
> I like that!
>
> Now some beer. Free. Friday.
>
> Cheers,
>
> /peter neubauer
>
> GTalk:      neubauer.peter
> Skype       peter.neubauer
> Phone       +46 704 106975
> LinkedIn   http://www.linkedin.com/in/neubauer
> Twitter      http://twitter.com/peterneubauer
>
> http://www.neo4j.org               - Your high performance graph database.
> http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>
>
> On Fri, Aug 26, 2011 at 4:22 PM, Rick Bullotta
> wrote:
>
>> Let's hope that one day soon all of these issues will be "non-issues"!
>>
>> Having cool technology always "coming soon" reminds me of this sign:
>> http://www.rareirishstuff.com/media/13/a20792b12af7736b49978d_m.JPG
>>
>> -Original Message-
>> From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
>> On Behalf Of Thomas Fritz
>> Sent: Friday, August 26, 2011 10:17 AM
>> To: Neo4j user discussions
>> Subject: Re: [Neo4j] Websocket Server instead of REST for Neo4J for access
>> a DB
>>
>> Hi.
>>
>> Thanks for your fast reply.
>>
>>
>>
>>
>>
>> 2011/8/26 Rick Bullotta :
>> > A few potential challenges and reasons to wait on this:
>> >
>> > - the Websocket API is still in a state of change
>> thats true. But i think, since the latest security issues are solved
>> now with the latest protocol version, hopefully there are no breaking
>> changes anymore
>>
>> > - the existing REST API is synchronous request/response, so there's not a
>> lot of benefit to switching to websockets without a lot of rework
>> I think thats a real challenge. Since locking and concurrent writes
>> come into play - Except you would allow only one websocket connection
>>
>> > - The real benefit will be when you Javascript and other web clients can
>> use a pure binary protocol (not possible today)
>> I pretty sure it is in the latest protocol definition. But i think no
>> Browser at this time of writing has implemented the binary parts.
>>
>> regards
>>
>> Tom
>>
>> >
>> > Rick
>> >
>> > -Original Message-
>> > From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
>> On Behalf Of Thomas Fritz
>> > Sent: Friday, August 26, 2011 9:52 AM
>> > To: Neo4j user discussions
>> > Subject: [Neo4j] Websocket Server instead of REST for Neo4J for access a
>> DB
>> >
>> > Hi all!
>> >
>> > Have anyone thought, or is it possible to implement a Websocket
>> > Endpoint in Neo4J Server so one can use this instead of the RESTful
>> > API. Which would be more performant and scalable than the RESTful HTTP
>> > API. It is possible to use such a Websocket through Java, Node and any
>> > other Server Side Language and even JavaScript on the client side.
>> >
>> > What do you think?
>> >
>> > Kind regards
>> >
>> >
>> >
>> > ---
>> > Thomas FRITZ
>> > web http://fritzthomas.com
>> > twitter http://twitter.com/thomasf
>> > ___
>> > Neo4j mailing list
>> > User@lists.neo4j.org
>> > https://lists.neo4j.org/mailman/listinfo/user
>> > ___
>> > Neo4j mailing list
>> > User@lists.neo4j.org
>> > https://lists.neo4j.org/mailman/listinfo/user
>> >
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.n

Re: [Neo4j] Websocket Server instead of REST for Neo4J for access a DB

2011-08-26 Thread Thomas Fritz
If you like partial results take a look at this paper:
http://research.microsoft.com/apps/pubs/default.aspx?id=131524 and
this cast: http://channel9.msdn.com/Events/MIX/MIX11/RES04

It uses rabin fingerprinting to detect changed chunks and only
transfers these changed chunks (like rsync does). In this case the
connecting side - the client - would also need some logic baked in
because the client, after connecting to the server, has to sent the
hashes of already retrieved chunks. So the server side can compute and
sent just those chunks which has updated. Maybe it makes sense for
some really big datasets.

Kind regards and cheers from Vienna




---
Thomas FRITZ
web http://fritzthomas.com
twitter http://twitter.com/thomasf



2011/8/26 Peter Neubauer :
> I like that!
>
> Now some beer. Free. Friday.
>
> Cheers,
>
> /peter neubauer
>
> GTalk:      neubauer.peter
> Skype       peter.neubauer
> Phone       +46 704 106975
> LinkedIn   http://www.linkedin.com/in/neubauer
> Twitter      http://twitter.com/peterneubauer
>
> http://www.neo4j.org               - Your high performance graph database.
> http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>
>
> On Fri, Aug 26, 2011 at 4:22 PM, Rick Bullotta
> wrote:
>
>> Let's hope that one day soon all of these issues will be "non-issues"!
>>
>> Having cool technology always "coming soon" reminds me of this sign:
>> http://www.rareirishstuff.com/media/13/a20792b12af7736b49978d_m.JPG
>>
>> -Original Message-
>> From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
>> On Behalf Of Thomas Fritz
>> Sent: Friday, August 26, 2011 10:17 AM
>> To: Neo4j user discussions
>> Subject: Re: [Neo4j] Websocket Server instead of REST for Neo4J for access
>> a DB
>>
>> Hi.
>>
>> Thanks for your fast reply.
>>
>>
>>
>>
>>
>> 2011/8/26 Rick Bullotta :
>> > A few potential challenges and reasons to wait on this:
>> >
>> > - the Websocket API is still in a state of change
>> thats true. But i think, since the latest security issues are solved
>> now with the latest protocol version, hopefully there are no breaking
>> changes anymore
>>
>> > - the existing REST API is synchronous request/response, so there's not a
>> lot of benefit to switching to websockets without a lot of rework
>> I think thats a real challenge. Since locking and concurrent writes
>> come into play - Except you would allow only one websocket connection
>>
>> > - The real benefit will be when you Javascript and other web clients can
>> use a pure binary protocol (not possible today)
>> I pretty sure it is in the latest protocol definition. But i think no
>> Browser at this time of writing has implemented the binary parts.
>>
>> regards
>>
>> Tom
>>
>> >
>> > Rick
>> >
>> > -Original Message-
>> > From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
>> On Behalf Of Thomas Fritz
>> > Sent: Friday, August 26, 2011 9:52 AM
>> > To: Neo4j user discussions
>> > Subject: [Neo4j] Websocket Server instead of REST for Neo4J for access a
>> DB
>> >
>> > Hi all!
>> >
>> > Have anyone thought, or is it possible to implement a Websocket
>> > Endpoint in Neo4J Server so one can use this instead of the RESTful
>> > API. Which would be more performant and scalable than the RESTful HTTP
>> > API. It is possible to use such a Websocket through Java, Node and any
>> > other Server Side Language and even JavaScript on the client side.
>> >
>> > What do you think?
>> >
>> > Kind regards
>> >
>> >
>> >
>> > ---
>> > Thomas FRITZ
>> > web http://fritzthomas.com
>> > twitter http://twitter.com/thomasf
>> > ___
>> > Neo4j mailing list
>> > User@lists.neo4j.org
>> > https://lists.neo4j.org/mailman/listinfo/user
>> > ___
>> > Neo4j mailing list
>> > User@lists.neo4j.org
>> > https://lists.neo4j.org/mailman/listinfo/user
>> >
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Websocket Server instead of REST for Neo4J for access a DB

2011-08-26 Thread Peter Neubauer
I like that!

Now some beer. Free. Friday.

Cheers,

/peter neubauer

GTalk:  neubauer.peter
Skype   peter.neubauer
Phone   +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter  http://twitter.com/peterneubauer

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


On Fri, Aug 26, 2011 at 4:22 PM, Rick Bullotta
wrote:

> Let's hope that one day soon all of these issues will be "non-issues"!
>
> Having cool technology always "coming soon" reminds me of this sign:
> http://www.rareirishstuff.com/media/13/a20792b12af7736b49978d_m.JPG
>
> -Original Message-
> From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
> On Behalf Of Thomas Fritz
> Sent: Friday, August 26, 2011 10:17 AM
> To: Neo4j user discussions
> Subject: Re: [Neo4j] Websocket Server instead of REST for Neo4J for access
> a DB
>
> Hi.
>
> Thanks for your fast reply.
>
>
>
>
>
> 2011/8/26 Rick Bullotta :
> > A few potential challenges and reasons to wait on this:
> >
> > - the Websocket API is still in a state of change
> thats true. But i think, since the latest security issues are solved
> now with the latest protocol version, hopefully there are no breaking
> changes anymore
>
> > - the existing REST API is synchronous request/response, so there's not a
> lot of benefit to switching to websockets without a lot of rework
> I think thats a real challenge. Since locking and concurrent writes
> come into play - Except you would allow only one websocket connection
>
> > - The real benefit will be when you Javascript and other web clients can
> use a pure binary protocol (not possible today)
> I pretty sure it is in the latest protocol definition. But i think no
> Browser at this time of writing has implemented the binary parts.
>
> regards
>
> Tom
>
> >
> > Rick
> >
> > -Original Message-
> > From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
> On Behalf Of Thomas Fritz
> > Sent: Friday, August 26, 2011 9:52 AM
> > To: Neo4j user discussions
> > Subject: [Neo4j] Websocket Server instead of REST for Neo4J for access a
> DB
> >
> > Hi all!
> >
> > Have anyone thought, or is it possible to implement a Websocket
> > Endpoint in Neo4J Server so one can use this instead of the RESTful
> > API. Which would be more performant and scalable than the RESTful HTTP
> > API. It is possible to use such a Websocket through Java, Node and any
> > other Server Side Language and even JavaScript on the client side.
> >
> > What do you think?
> >
> > Kind regards
> >
> >
> >
> > ---
> > Thomas FRITZ
> > web http://fritzthomas.com
> > twitter http://twitter.com/thomasf
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> >
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Websocket Server instead of REST for Neo4J for access a DB

2011-08-26 Thread Rick Bullotta
Let's hope that one day soon all of these issues will be "non-issues"!

Having cool technology always "coming soon" reminds me of this sign:  
http://www.rareirishstuff.com/media/13/a20792b12af7736b49978d_m.JPG

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Thomas Fritz
Sent: Friday, August 26, 2011 10:17 AM
To: Neo4j user discussions
Subject: Re: [Neo4j] Websocket Server instead of REST for Neo4J for access a DB

Hi.

Thanks for your fast reply.





2011/8/26 Rick Bullotta :
> A few potential challenges and reasons to wait on this:
>
> - the Websocket API is still in a state of change
thats true. But i think, since the latest security issues are solved
now with the latest protocol version, hopefully there are no breaking
changes anymore

> - the existing REST API is synchronous request/response, so there's not a lot 
> of benefit to switching to websockets without a lot of rework
I think thats a real challenge. Since locking and concurrent writes
come into play - Except you would allow only one websocket connection

> - The real benefit will be when you Javascript and other web clients can use 
> a pure binary protocol (not possible today)
I pretty sure it is in the latest protocol definition. But i think no
Browser at this time of writing has implemented the binary parts.

regards

Tom

>
> Rick
>
> -Original Message-
> From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
> Behalf Of Thomas Fritz
> Sent: Friday, August 26, 2011 9:52 AM
> To: Neo4j user discussions
> Subject: [Neo4j] Websocket Server instead of REST for Neo4J for access a DB
>
> Hi all!
>
> Have anyone thought, or is it possible to implement a Websocket
> Endpoint in Neo4J Server so one can use this instead of the RESTful
> API. Which would be more performant and scalable than the RESTful HTTP
> API. It is possible to use such a Websocket through Java, Node and any
> other Server Side Language and even JavaScript on the client side.
>
> What do you think?
>
> Kind regards
>
>
>
> ---
> Thomas FRITZ
> web http://fritzthomas.com
> twitter http://twitter.com/thomasf
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Websocket Server instead of REST for Neo4J for access a DB

2011-08-26 Thread Rick Bullotta
Yes, that should be possible, as should some level of "statefulness" or 
interactivity. I think it would need a new API, correct? It would be a 
fundamentally different approach than the atomic nature of the existing REST 
API.

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Peter Neubauer
Sent: Friday, August 26, 2011 10:16 AM
To: Neo4j user discussions
Subject: Re: [Neo4j] Websocket Server instead of REST for Neo4J for access a DB

Mmh,
what would be the main points of rework? Is there a way to stream partial
results over websockets, so we can iterate into the web?

Cheers,

/peter neubauer

GTalk:  neubauer.peter
Skype   peter.neubauer
Phone   +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter  http://twitter.com/peterneubauer

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


On Fri, Aug 26, 2011 at 4:00 PM, Rick Bullotta
wrote:

> A few potential challenges and reasons to wait on this:
>
> - the Websocket API is still in a state of change
> - the existing REST API is synchronous request/response, so there's not a
> lot of benefit to switching to websockets without a lot of rework
> - The real benefit will be when you Javascript and other web clients can
> use a pure binary protocol (not possible today)
>
> Rick
>
> -Original Message-
> From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
> On Behalf Of Thomas Fritz
> Sent: Friday, August 26, 2011 9:52 AM
> To: Neo4j user discussions
> Subject: [Neo4j] Websocket Server instead of REST for Neo4J for access a DB
>
> Hi all!
>
> Have anyone thought, or is it possible to implement a Websocket
> Endpoint in Neo4J Server so one can use this instead of the RESTful
> API. Which would be more performant and scalable than the RESTful HTTP
> API. It is possible to use such a Websocket through Java, Node and any
> other Server Side Language and even JavaScript on the client side.
>
> What do you think?
>
> Kind regards
>
>
>
> ---
> Thomas FRITZ
> web http://fritzthomas.com
> twitter http://twitter.com/thomasf
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Websocket Server instead of REST for Neo4J for access a DB

2011-08-26 Thread Thomas Fritz
Hi.

Thanks for your fast reply.





2011/8/26 Rick Bullotta :
> A few potential challenges and reasons to wait on this:
>
> - the Websocket API is still in a state of change
thats true. But i think, since the latest security issues are solved
now with the latest protocol version, hopefully there are no breaking
changes anymore

> - the existing REST API is synchronous request/response, so there's not a lot 
> of benefit to switching to websockets without a lot of rework
I think thats a real challenge. Since locking and concurrent writes
come into play - Except you would allow only one websocket connection

> - The real benefit will be when you Javascript and other web clients can use 
> a pure binary protocol (not possible today)
I pretty sure it is in the latest protocol definition. But i think no
Browser at this time of writing has implemented the binary parts.

regards

Tom

>
> Rick
>
> -Original Message-
> From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
> Behalf Of Thomas Fritz
> Sent: Friday, August 26, 2011 9:52 AM
> To: Neo4j user discussions
> Subject: [Neo4j] Websocket Server instead of REST for Neo4J for access a DB
>
> Hi all!
>
> Have anyone thought, or is it possible to implement a Websocket
> Endpoint in Neo4J Server so one can use this instead of the RESTful
> API. Which would be more performant and scalable than the RESTful HTTP
> API. It is possible to use such a Websocket through Java, Node and any
> other Server Side Language and even JavaScript on the client side.
>
> What do you think?
>
> Kind regards
>
>
>
> ---
> Thomas FRITZ
> web http://fritzthomas.com
> twitter http://twitter.com/thomasf
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Websocket Server instead of REST for Neo4J for access a DB

2011-08-26 Thread Peter Neubauer
Mmh,
what would be the main points of rework? Is there a way to stream partial
results over websockets, so we can iterate into the web?

Cheers,

/peter neubauer

GTalk:  neubauer.peter
Skype   peter.neubauer
Phone   +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter  http://twitter.com/peterneubauer

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


On Fri, Aug 26, 2011 at 4:00 PM, Rick Bullotta
wrote:

> A few potential challenges and reasons to wait on this:
>
> - the Websocket API is still in a state of change
> - the existing REST API is synchronous request/response, so there's not a
> lot of benefit to switching to websockets without a lot of rework
> - The real benefit will be when you Javascript and other web clients can
> use a pure binary protocol (not possible today)
>
> Rick
>
> -Original Message-
> From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
> On Behalf Of Thomas Fritz
> Sent: Friday, August 26, 2011 9:52 AM
> To: Neo4j user discussions
> Subject: [Neo4j] Websocket Server instead of REST for Neo4J for access a DB
>
> Hi all!
>
> Have anyone thought, or is it possible to implement a Websocket
> Endpoint in Neo4J Server so one can use this instead of the RESTful
> API. Which would be more performant and scalable than the RESTful HTTP
> API. It is possible to use such a Websocket through Java, Node and any
> other Server Side Language and even JavaScript on the client side.
>
> What do you think?
>
> Kind regards
>
>
>
> ---
> Thomas FRITZ
> web http://fritzthomas.com
> twitter http://twitter.com/thomasf
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Websocket Server instead of REST for Neo4J for access a DB

2011-08-26 Thread Rick Bullotta
A few potential challenges and reasons to wait on this:

- the Websocket API is still in a state of change
- the existing REST API is synchronous request/response, so there's not a lot 
of benefit to switching to websockets without a lot of rework
- The real benefit will be when you Javascript and other web clients can use a 
pure binary protocol (not possible today)

Rick

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Thomas Fritz
Sent: Friday, August 26, 2011 9:52 AM
To: Neo4j user discussions
Subject: [Neo4j] Websocket Server instead of REST for Neo4J for access a DB

Hi all!

Have anyone thought, or is it possible to implement a Websocket
Endpoint in Neo4J Server so one can use this instead of the RESTful
API. Which would be more performant and scalable than the RESTful HTTP
API. It is possible to use such a Websocket through Java, Node and any
other Server Side Language and even JavaScript on the client side.

What do you think?

Kind regards



---
Thomas FRITZ
web http://fritzthomas.com
twitter http://twitter.com/thomasf
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Websocket Server instead of REST for Neo4J for access a DB

2011-08-26 Thread Thomas Fritz
Hi all!

Have anyone thought, or is it possible to implement a Websocket
Endpoint in Neo4J Server so one can use this instead of the RESTful
API. Which would be more performant and scalable than the RESTful HTTP
API. It is possible to use such a Websocket through Java, Node and any
other Server Side Language and even JavaScript on the client side.

What do you think?

Kind regards



---
Thomas FRITZ
web http://fritzthomas.com
twitter http://twitter.com/thomasf
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Specifying "best first" order of traverse over REST API

2011-08-26 Thread Jim Webber
Hi Aseem,

> how to return a meaningful subset of traverse results instead of all
> results. Having a paged traverser doesn't help at all if you can neither
> specify the order nor know what the default ordering is based on (I asked a
> while back and was told it's unspecified). (And again, by "order" here I
> mean beyond just "breadth first".)

To be fair you wouldn't get this by default in Java either. You traverse from a 
starting node and the order of nodes/rels you get back is largely determined by 
the graph structure.

If you really want to precisely determine the ordering of return elements, then 
you'd have to write very strict imperative code against the core API.

But there have been some interesting threads/issues flagged around providing 
depth information with returned results in the last couple of days. I'm gonna 
throw those in the community dev backlog.

Jim
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4jPHP batch insert benchmarks

2011-08-26 Thread jadell
Jim,

Fair enough.  For now, I'll just know not to try and make batches that big
:-) My own use case is for the transaction safety rather than trying to
create thousands of entities at once, so it doesn't effect me that much.  I
just wanted to have something more concrete to tell other users who might
try.

Thanks to all for helping me investigate!

-- Josh

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4jPHP-batch-insert-benchmarks-tp3282984p3286721.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Specifying "best first" order of traverse over REST API

2011-08-26 Thread Peter Neubauer
Cool!
The challenge is to provide an API that works regardless of the underlying
index implementation used - or of course the different indexes could add
their own REST endpoints that ARE specific, and we provide explicit plugins
for e.g. Lucene or Redis ...

Cheers,

/peter neubauer

GTalk:  neubauer.peter
Skype   peter.neubauer
Phone   +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter  http://twitter.com/peterneubauer

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


On Thu, Aug 25, 2011 at 8:14 PM, Aseem Kishore wrote:

> Okay! Will think about this and get back to you soon.
>
> Peter, I gotta say -- your open-mindedness and willingness to help
> developers like me is awesome and much appreciated. Customer satisfaction,
> etc. =)
>
> Cheers,
> Aseem
>
> On Thu, Aug 25, 2011 at 11:12 AM, Peter Neubauer <
> peter.neuba...@neotechnology.com> wrote:
>
> > Aseem,
> > If you can provide a nice suggestion on how exactly it would look, maybe
> I
> > can implement it if the others agree?
> >
> > /peter
> >
> > Sent from my phone.
> > On Aug 25, 2011 7:19 PM, "Aseem Kishore" 
> wrote:
> > > Thanks Peter, we'll look into Gremlin. =)
> > >
> > > But I'll push back a bit and say it would still ask for a feature like
> > this
> > > to be a first-class feature of the REST API. If my app is e.g. in
> Python,
> > > it's not super API-friendly for me to have to write Java-ish code to
> > achieve
> > > what I want.
> > >
> > > I'd get it if what I was asking for was an uncommon edge case request.
> > But
> > > for quite a while, this has been the one biggest pain point of Neo4j
> for
> > us:
> > > how to return a meaningful subset of traverse results instead of all
> > > results. Having a paged traverser doesn't help at all if you can
> neither
> > > specify the order nor know what the default ordering is based on (I
> asked
> > a
> > > while back and was told it's unspecified). (And again, by "order" here
> I
> > > mean beyond just "breadth first".)
> > >
> > > I'm all for simple, minimalistic and elegant APIs. I'm also all for
> being
> > > scenario-driven, and solving problems rather than building arbitrary
> > > features. So perhaps one solution here would be to introduce a new
> > built-in
> > > "best first" order that's just like Djikstra's shortest-path API: you
> > just
> > > specify a "cost" property (or function) for nodes and/or relationships.
> > This
> > > would definitely solve our problem, and, I suspect, most people's
> > problems
> > > in this regard. It wouldn't be a bulky feature that doesn't fit in (it
> > would
> > > compliment Djikstra's very nicely), and it wouldn't require writing a
> > > complex Gremlin script to achieve this (I would think) common
> > requirement.
> > >
> > > I'll get off the soapbox now. ;) Thanks for your consideration!
> > >
> > > Aseem
> > >
> > > On Thu, Aug 25, 2011 at 9:01 AM, Peter Neubauer <
> > > peter.neuba...@neotechnology.com> wrote:
> > >
> > >> See the other mail for a pointer :)
> > >>
> > >> Cheers,
> > >>
> > >> /peter neubauer
> > >>
> > >> GTalk: neubauer.peter
> > >> Skype peter.neubauer
> > >> Phone +46 704 106975
> > >> LinkedIn http://www.linkedin.com/in/neubauer
> > >> Twitter http://twitter.com/peterneubauer
> > >>
> > >> http://www.neo4j.org - Your high performance graph database.
> > >> http://startupbootcamp.org/ - Öresund - Innovation happens HERE.
> > >> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing
> party.
> > >>
> > >>
> > >> On Thu, Aug 25, 2011 at 1:00 AM, Matt Luongo  wrote:
> > >>
> > >> > +1, we could really use that. Client-side sorting sucks.
> > >> >
> > >> > --
> > >> > Matt Luongo
> > >> > Co-Founder, Scholr.ly
> > >> >
> > >> >
> > >> >
> > >> > On Wed, Aug 24, 2011 at 4:43 PM, Aseem Kishore <
> > aseem.kish...@gmail.com
> > >> > >wrote:
> > >> >
> > >> > > I've just spent a bunch of time reading into how one can control
> the
> > >> > > ordering of a traverse beyond simple "breadth first" or "depth
> > first".
> > >> > More
> > >> > > precisely, even when breadth first, how one can control *which*
> > >> neighbors
> > >> > > are traversed first.
> > >> > >
> > >> > > (It matters less in which order they're traversed vs. which order
> > >> they're
> > >> > > returned if you're returning all results, since you can just sort
> on
> > >> the
> > >> > > client. But it matters a lot if you want to use the paged
> traverser,
> > >> > since
> > >> > > you're then only returning the first results.)
> > >> > >
> > >> > > I've learned that this is doable from Java by writing your own
> > >> > > BranchSelector implementation:
> > >> > >
> > >> > > http://components.neo4j.org/neo4j/1.4.1/apidocs/
> > >> > >
> > >> > > I've found the built-in implementations, e.g. the pre-order
> > >> breadth-first
> > >> > > and depth-first:
> >

Re: [Neo4j] Wishlist: subgraphs over REST API

2011-08-26 Thread Peter Neubauer
No problem Aseem!

Now, a very straightforward serialization would be
http://graphml.graphdrawing.org/primer/graphml-primer.html. Would that be
viable? It is XML, so might not mix well.

A Gremlin script like

writer = new GraphMLWriter(g)

out = new java.io.ByteArrayOutputStream()

writer.outputGraph(out)

result = out.toString()
Should do the job in the REST API. However, I think a more native way would
be good to look at, too.


Otherwise, there is a format that Tinkerpop is introducing that is more
JSON-friendly,
https://github.com/tinkerpop/blueprints/wiki/JSON-Reader-and-Writer-Librarythat
you easily could emit in the same way once it has stabilized and
released.

Cheers,

/peter neubauer

GTalk:  neubauer.peter
Skype   peter.neubauer
Phone   +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter  http://twitter.com/peterneubauer

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


On Thu, Aug 25, 2011 at 10:56 PM, Aseem Kishore wrote:

> Sorry if I'm inundating the list w/ too many emails. =D
>
> I've been loving Cypher -- way more user-friendly and powerful than the
> REST
> API's traverse method -- but I'm finding even Cypher isn't optimized for
> queries where I really want to fetch a *subgraph*, not tabular data.
>
> I can give plenty of scenarios if that helps (I've even drawn diagrams!),
> but the theme in my queries is repeatedly that I need to understand the
> relationships between nodes in our graph, which means I want subgraphs.
>
> I understand that the traverse method in the REST API gives you the option
> of returning nodes, relationships, or paths. I'd like to propose a new
> return type: subgraph (or graph).
>
> Here's what I'm envisioning: the JSON contains an adjacency matrix of nodes
> and relationships -- referenced entirely by URLs -- and an additional map
> from URL to data (properties) for each referenced node and relationship.
>
> Here's an example format: https://gist.github.com/1171908
>
> I'd *love* to be able to query and fetch subgraphs from the graph like
> this.
> That would be so awesome. I'd love thoughts and feedback.
>
> Cheers,
> Aseem
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Cypher: node IDs

2011-08-26 Thread Andres Taylor
Do you have a stack trace to share?

Andrés

On Fri, Aug 26, 2011 at 10:55 AM, Aseem Kishore wrote:

> I spoke too soon -- this doesn't seem to scale very far with many UUIDs
> being looked up together. Here's a query looking up 76 things that returns
> a
> 500 error -- due to a stack overflow exception.
>
>
> *START*node=(node_auto_index,'uuid_indexed:(f93d416a-40ae-4b5a-87d7-53b6bc4b54ab
> OR
> ceaad2cf-1afb-4cdd-b98a-8706dc4c471a OR
> 7bb157dd-ff76-49d3-9b01-0c506909400c
> OR 18b06833-b763-419c-b0ba-78e43dd0898d OR
> fdbaf139-053c-4886-8855-47efc4802f60 OR
> 8de5a2fb-5a42-4386-9b5a-8d5cbbb3a491
> OR a9a54c63-6fb4-489e-bf55-ebca2ef8e2c3 OR
> 17c2c15e-f116-4092-afbe-336674f7b3ed OR
> 0c241168-8b41-4fc5-b86c-db7dfe4bfc3d
> OR 352de030-1414-4469-af34-46a968d44409 OR
> d48769af-0f7a-401d-8e8e-0383d687e87c OR
> 923bbc53-9012-435f-ac09-a71fd9b27b21
> OR 879011a1-e26d-4fd1-ae78-c2d8d1f2ec7d OR
> 5f0100d5-7be7-48a0-bcd2-4ff706162b3a OR
> e5cd6233-24c6-4977-8c49-5d13cb386684
> OR fb331814-5d8e-44c1-bbca-e9a38cd5b1b7 OR
> 3fe36ba3-feb2-4e9a-9a83-bd8c42c59960 OR
> 33f35e99-107f-43cc-9fd8-0e09ec28490a
> OR c10623a4-082b-455d-aa87-5467a97108d6 OR
> a2a5cbd6-4cce-4dcb-ba6c-8f4c3fda8349 OR
> 8a1e21d8-e407-4795-a841-ca891b53eb77
> OR c3181928-9f7c-4b90-a658-c19c2513c42c OR
> ebb867cd-3e40-40ad-8dbd-8e7cd64ef057 OR
> 62ae80c2-2f61-4318-ae0c-d352c75295b6
> OR 103b1113-6afa-48d6-a158-8988d3813589 OR
> 853fca76-dbfa-4e89-b0db-c059a153101d OR
> 7a514103-66b9-4dee-9da0-4a02eec1b516
> OR f88ab591-6989-4908-8856-83efd8a79df1 OR
> f4b2aae8-ab7c-4e93-b0db-2dfc7230cc11 OR
> 074324dc-5194-46b7-a1bc-34f41b719bd0
> OR 1d82f823-c76d-4f60-aeed-01f1896fa19f OR
> 273ea5d5-7ba3-4df1-af1f-e9e12490dc40 OR
> 6f06879e-a03e-4239-ab1c-6f2301831319
> OR 96b77c3a-da52-424a-8a0d-90eaa4563b5f OR
> f413419c-2269-4dcf-b249-49b5828feadf OR
> 0e159ace-32e3-48bc-90f9-735528979726
> OR 885e6466-d5be-45a6-907c-ff6945a7a147 OR
> ddbf1468-4714-4001-a695-36d84debfe0e OR
> df280b6c-f06b-4b06-9581-56434db22d02
> OR ddaec953-5194-43c6-b2da-7e168c8c6189 OR
> f792a366-2654-4702-a095-f546d65005ec OR
> f45179f5-a4e0-4f0c-bdb0-30f37f7986c5
> OR deb11e05-6920-461f-a198-b943caac97e8 OR
> bca6d42c-df7f-4ccb-bc7a-054223a1c456 OR
> 65925c96-19c0-47bf-8ae1-30d39918ba0a
> OR 3909bb89-e361-49fa-950e-d24dc0f4b598 OR
> d000239e-0e43-4fe2-884a-4baf3a088795 OR
> fc5481af-6537-4bd7-b717-83c609a50995
> OR f897b591-ae71-47c8-8d7f-2088dfb64746 OR
> fd46e90f-da43-46be-a53f-1f6d301b039d OR
> 7bda73ad-a80b-4b47-933f-6bf0f3de47f4
> OR a2a29161-cda2-4aec-85b8-53ef494a945e OR
> 8290618b-c6eb-4902-9068-616f0df84040 OR
> 75b56851-d53a-4069-8d90-cc9a94186579
> OR d344990d-96da-43f4-8680-a61b38692841 OR
> 35898e0b-44e1-4023-855d-a56eb4e07d45 OR
> 2081ace8-94df-4841-94e7-08e4ea583f2c
> OR 18d77916-e240-4760-9b7f-9c9ad2687860 OR
> 5a0d07f9-6635-4544-9f89-7770e2746d37 OR
> edd3fdee-1545-48e2-8c3b-e8dccfc6d69a
> OR ff88eade-ffd1-4d98-9170-c43ebef04554 OR
> bc823ddd-3fd5-448c-926a-414b8742d2bc OR
> e5cd635e-33be-43bd-bb6f-e9cde367b7ef
> OR b2f7414d-a751-424a-9786-f6acbb1eae7a OR
> 50a7ef92-e19d-4bf9-a767-15bc8c9b3481 OR
> fd64a857-41ac-41bc-8967-5b123042a921
> OR 9b0c1dad-e7da-4a94-8a06-41eed34c739c OR
> 953f6857-30a4-44a2-aa97-b23371a3d3af OR
> 62d983d9-8790-4105-8370-ac1e2ff76857
> OR 4ac9c5de-09e7-4b43-8841-fd4df3ccc472 OR
> b0cfd10c-ae9c-4efc-96d9-0884c50fc835 OR
> 68195e2a-a387-4ea9-98a0-c45ba9ffd342
> OR 0962c97e-d4e0-4e91-a917-63b3b9148095 OR
> 0993-3479-4785-b381-44259eeb5bd4 OR
> cab20da4-54d2-4212-ad2f-cd413246c557
> OR 6730e381-000a-4753-bfd7-3482e8e27bd6)')
> *RETURN* node
>
> I guess we'll try a batch API request?
>
> Aseem
>
> On Fri, Aug 26, 2011 at 12:31 AM, Aseem Kishore  >wrote:
>
> > Hey, FWIW, we ended up needing this for actual queries in our app, not
> just
> > the console, so we ended up adding a UUID property to every node in our
> > graph, just so we can efficiently query collections of node pairs (where
> > nodes may be duplicated many times across pairs). We (auto-)index this
> UUID
> > property so we can then do a second lookup for the nodes' data.
> >
> > If Cypher supported IDs or URLs natively, that would have made this a bit
> > more convenient. =)
> >
> > Aseem
> >
> >
> > On Wed, Aug 24, 2011 at 6:41 PM, Aseem Kishore  >wrote:
> >
> >> I was asking really only for the console. I don't see myself needing to
> >> use the ID programmatically -- except it might be a minor optimization
> to be
> >> able to get only node URLs if I already have node data, and I just want
> to
> >> compare the output of this query with the nodes I already have.
> >>
> >> For the console, the only thing is that nodes w/ many properties (and
> >> possibly long values, e.g. descriptions) totally litter the console,
> making
> >> output impossible to read or make sense of. Shortening the results to
> just
> >> IDs (along with selected properties) would be convenient in some cases.
> In
> >> many cases, just the properties aren't identifying enough.
> >>
> >> Hope this helps, and thanks f

Re: [Neo4j] bug in neo4j-community-1.4.1-unix.tar.gz neo4j script ?

2011-08-26 Thread Chris Gioran
Hi,

this is a known issue. Please follow the documentation and run from
the installation root (/home/ec2-user/neo4j-community-1.4.1/ in your
example) as

bin/neo4j 

cheers,
CG

On Fri, Aug 26, 2011 at 1:41 PM, Francesco Ruffino  wrote:
> [ec2-user@xxx bin]$ pwd
> /home/ec2-user/neo4j-community-1.4.1/bin
>
> [ec2-user@ bin]$ sudo ./neo4j start
> Starting Neo4j Server...Error: missing Neo4j Library, expected at
> /home/ec2-user/lib
>
>
> doesn't resolve correctly the "$NEO4J_HOME" variable
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] bug in neo4j-community-1.4.1-unix.tar.gz neo4j script ?

2011-08-26 Thread Francesco Ruffino
[ec2-user@xxx bin]$ pwd
/home/ec2-user/neo4j-community-1.4.1/bin

[ec2-user@ bin]$ sudo ./neo4j start
Starting Neo4j Server...Error: missing Neo4j Library, expected at
/home/ec2-user/lib


doesn't resolve correctly the "$NEO4J_HOME" variable
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4jPHP batch insert benchmarks

2011-08-26 Thread Jim Webber
Hey Josh,

I wonder whether we have a memory leak in that code, or whether Jackson has.

I'll drop this into the community backlog for further investigation.

Jim


___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] which shortestpath algo is used in the algofactory shortestpath?

2011-08-26 Thread Mattias Persson
Peter, it's not using Dijkstra... it's using
https://github.com/neo4j/community/blob/master/graph-algo/src/main/java/org/neo4j/graphalgo/impl/path/ShortestPath.javawhich
is basically a double-sided breadth-first algo.

2011/8/20 Peter Neubauer 

> Boris,
> The algo id using a double sided Dijkstra variant, taking possible cost
> functions and supernodes into account.
>
> /peter
>
> Sent from my phone.
> On Aug 20, 2011 5:33 AM, "Boris Kizelshteyn"  wrote:
> > I need to document my usage of it, so it would be great if I knew :)
> >
> > Thanks!
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] HA consistency

2011-08-26 Thread Mattias Persson
2011/8/19 Tuure Laurinolli 

>
> On Aug 19, 2011, at 07:57 , David Rader wrote:
>
> > It looks like the HA implementation is for eventual consistency, tunable
> by how often a slave polls the master for updates from other nodes.
> >
> > With a load balanced cluster, is the best practice to simply use sticky
> sessions on clients to ensure that immediate reads of updated data are
> served by the same node that wrote the update and are therefore consistent?
> Any other recommended approaches?
>
> If your goal is HA, there are two other approaches:
>
> 1) Always read from master
>
> and
>
> 2) Always take read lock on things you read
>
> Always reading from master works because writes are synchronously
> replicated to master, and taking a read lock works because taking a read
> lock always synchronizes with master (although it of course also disallows
> related writes for the duration of your transaction). These solutions affect
> write performance (reading from master consumes master capacity, and taking
> read locks prevents other transactions from completing). Read performance is
> certainly affected as well compared to sticky sessions, and is likely to be
> considerably lower because of the synchronization requirements, and load on
> master.
>
> Consistency guarantees would be as follows:
>
> - Reading from arbitrary slaves guarantees very little
> - Sticky sessions guarantee read-everything-up-until-your-previous-write
> - Reading from master guarantees consistency re: communications over side
> channels (if another node, after committing, tells you that he wrote
> something, you can see that write, or possibly some newer write)
> - Taking read locks guarantees
> read-everything-up-until-your-previous-lock-request and also repeatable
> reads
>

Taking read locks on everything is a bit overkill and will probably only be
necessary in certain scenarios. Pulling updates and then do a read request
will make that read request view a snapshot of the latest or near-latest
graph.

>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Server couldn't start after java.lang.OutOfMemoryError

2011-08-26 Thread Mattias Persson
Tried with more memory?

2011/8/26 Nuo Yan 

> Hey Jim,
>
> It happened again and I'm pretty sure there was no other server process
> running.
>
> Also this time when it crashed I saw this line in the console log (not
> seeing this previously):
>
>  Could not load hsdis-.jnilib; library not loadable; PrintAssembly is
> disabled
>
> When I tried to restart, data/graph.db/message.log shows a lot of lines
> like
> the following and fail with the error message in my last email:
>
> Thu Aug 25 15:18:15 PDT 2011: Injected one phase commit, txId=11611
> Thu Aug 25 15:18:15 PDT 2011: Injected one phase commit, txId=11612
> Thu Aug 25 15:18:15 PDT 2011: Injected one phase commit, txId=11613
>
>
> On Tue, Aug 23, 2011 at 6:23 PM, Jim Webber  wrote:
>
> > Hi Nuo,
> >
> > > process [26266]... waiting for server to be
> > >
> >
> ready.
> > > BAD.
> > > another server-process is running with []
> >
> > Just to check before we dig deeper, are you certain you don't have
> another
> > server process running?
> >
> > Jim
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> >
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Cypher: node IDs

2011-08-26 Thread Aseem Kishore
I spoke too soon -- this doesn't seem to scale very far with many UUIDs
being looked up together. Here's a query looking up 76 things that returns a
500 error -- due to a stack overflow exception.

*START*node=(node_auto_index,'uuid_indexed:(f93d416a-40ae-4b5a-87d7-53b6bc4b54ab
OR
ceaad2cf-1afb-4cdd-b98a-8706dc4c471a OR 7bb157dd-ff76-49d3-9b01-0c506909400c
OR 18b06833-b763-419c-b0ba-78e43dd0898d OR
fdbaf139-053c-4886-8855-47efc4802f60 OR 8de5a2fb-5a42-4386-9b5a-8d5cbbb3a491
OR a9a54c63-6fb4-489e-bf55-ebca2ef8e2c3 OR
17c2c15e-f116-4092-afbe-336674f7b3ed OR 0c241168-8b41-4fc5-b86c-db7dfe4bfc3d
OR 352de030-1414-4469-af34-46a968d44409 OR
d48769af-0f7a-401d-8e8e-0383d687e87c OR 923bbc53-9012-435f-ac09-a71fd9b27b21
OR 879011a1-e26d-4fd1-ae78-c2d8d1f2ec7d OR
5f0100d5-7be7-48a0-bcd2-4ff706162b3a OR e5cd6233-24c6-4977-8c49-5d13cb386684
OR fb331814-5d8e-44c1-bbca-e9a38cd5b1b7 OR
3fe36ba3-feb2-4e9a-9a83-bd8c42c59960 OR 33f35e99-107f-43cc-9fd8-0e09ec28490a
OR c10623a4-082b-455d-aa87-5467a97108d6 OR
a2a5cbd6-4cce-4dcb-ba6c-8f4c3fda8349 OR 8a1e21d8-e407-4795-a841-ca891b53eb77
OR c3181928-9f7c-4b90-a658-c19c2513c42c OR
ebb867cd-3e40-40ad-8dbd-8e7cd64ef057 OR 62ae80c2-2f61-4318-ae0c-d352c75295b6
OR 103b1113-6afa-48d6-a158-8988d3813589 OR
853fca76-dbfa-4e89-b0db-c059a153101d OR 7a514103-66b9-4dee-9da0-4a02eec1b516
OR f88ab591-6989-4908-8856-83efd8a79df1 OR
f4b2aae8-ab7c-4e93-b0db-2dfc7230cc11 OR 074324dc-5194-46b7-a1bc-34f41b719bd0
OR 1d82f823-c76d-4f60-aeed-01f1896fa19f OR
273ea5d5-7ba3-4df1-af1f-e9e12490dc40 OR 6f06879e-a03e-4239-ab1c-6f2301831319
OR 96b77c3a-da52-424a-8a0d-90eaa4563b5f OR
f413419c-2269-4dcf-b249-49b5828feadf OR 0e159ace-32e3-48bc-90f9-735528979726
OR 885e6466-d5be-45a6-907c-ff6945a7a147 OR
ddbf1468-4714-4001-a695-36d84debfe0e OR df280b6c-f06b-4b06-9581-56434db22d02
OR ddaec953-5194-43c6-b2da-7e168c8c6189 OR
f792a366-2654-4702-a095-f546d65005ec OR f45179f5-a4e0-4f0c-bdb0-30f37f7986c5
OR deb11e05-6920-461f-a198-b943caac97e8 OR
bca6d42c-df7f-4ccb-bc7a-054223a1c456 OR 65925c96-19c0-47bf-8ae1-30d39918ba0a
OR 3909bb89-e361-49fa-950e-d24dc0f4b598 OR
d000239e-0e43-4fe2-884a-4baf3a088795 OR fc5481af-6537-4bd7-b717-83c609a50995
OR f897b591-ae71-47c8-8d7f-2088dfb64746 OR
fd46e90f-da43-46be-a53f-1f6d301b039d OR 7bda73ad-a80b-4b47-933f-6bf0f3de47f4
OR a2a29161-cda2-4aec-85b8-53ef494a945e OR
8290618b-c6eb-4902-9068-616f0df84040 OR 75b56851-d53a-4069-8d90-cc9a94186579
OR d344990d-96da-43f4-8680-a61b38692841 OR
35898e0b-44e1-4023-855d-a56eb4e07d45 OR 2081ace8-94df-4841-94e7-08e4ea583f2c
OR 18d77916-e240-4760-9b7f-9c9ad2687860 OR
5a0d07f9-6635-4544-9f89-7770e2746d37 OR edd3fdee-1545-48e2-8c3b-e8dccfc6d69a
OR ff88eade-ffd1-4d98-9170-c43ebef04554 OR
bc823ddd-3fd5-448c-926a-414b8742d2bc OR e5cd635e-33be-43bd-bb6f-e9cde367b7ef
OR b2f7414d-a751-424a-9786-f6acbb1eae7a OR
50a7ef92-e19d-4bf9-a767-15bc8c9b3481 OR fd64a857-41ac-41bc-8967-5b123042a921
OR 9b0c1dad-e7da-4a94-8a06-41eed34c739c OR
953f6857-30a4-44a2-aa97-b23371a3d3af OR 62d983d9-8790-4105-8370-ac1e2ff76857
OR 4ac9c5de-09e7-4b43-8841-fd4df3ccc472 OR
b0cfd10c-ae9c-4efc-96d9-0884c50fc835 OR 68195e2a-a387-4ea9-98a0-c45ba9ffd342
OR 0962c97e-d4e0-4e91-a917-63b3b9148095 OR
0993-3479-4785-b381-44259eeb5bd4 OR cab20da4-54d2-4212-ad2f-cd413246c557
OR 6730e381-000a-4753-bfd7-3482e8e27bd6)')
*RETURN* node

I guess we'll try a batch API request?

Aseem

On Fri, Aug 26, 2011 at 12:31 AM, Aseem Kishore wrote:

> Hey, FWIW, we ended up needing this for actual queries in our app, not just
> the console, so we ended up adding a UUID property to every node in our
> graph, just so we can efficiently query collections of node pairs (where
> nodes may be duplicated many times across pairs). We (auto-)index this UUID
> property so we can then do a second lookup for the nodes' data.
>
> If Cypher supported IDs or URLs natively, that would have made this a bit
> more convenient. =)
>
> Aseem
>
>
> On Wed, Aug 24, 2011 at 6:41 PM, Aseem Kishore wrote:
>
>> I was asking really only for the console. I don't see myself needing to
>> use the ID programmatically -- except it might be a minor optimization to be
>> able to get only node URLs if I already have node data, and I just want to
>> compare the output of this query with the nodes I already have.
>>
>> For the console, the only thing is that nodes w/ many properties (and
>> possibly long values, e.g. descriptions) totally litter the console, making
>> output impossible to read or make sense of. Shortening the results to just
>> IDs (along with selected properties) would be convenient in some cases. In
>> many cases, just the properties aren't identifying enough.
>>
>> Hope this helps, and thanks for the consideration!
>>
>> Aseem
>>
>>
>> On Wed, Aug 24, 2011 at 5:58 PM, Andres Taylor <
>> andres.tay...@neotechnology.com> wrote:
>>
>>> Hi Aseem,
>>>
>>> For various reasons, we've (so far) decided against allowing the id to be
>>> something you can output. Could you tell me a bit more about why you
>>> would
>>> like to return just the id?

Re: [Neo4j] Cypher: how would you query first- and second-degree friends?

2011-08-26 Thread Aseem Kishore
I've run into another scenario which I think is related to this feature
request.

Take the IMDB example: the graph has movie nodes, and each movie has one or
more genres/categories. You could express this as a property on each node,
or you could have formal genre nodes that movies are connected to.

Either way, the scenario is this: we want to show an "overview" page that
shows the most popular movies for each category. E.g. it shows the top 5
comedy movies, the top 5 action movies, drama, horror, and so on.

We can't figure out how to do this in one Cypher query. We can ORDER BY and
LIMIT, but that's for the whole set, where we want to do this per category.

The closest we've come up with is to return all movie+category pairs -- both
as just UUIDs to be efficient (see other thread where I've asked for
first-class ID support) -- along with the stats for each movie, and then we
sort on the client, then we load the movie data for the top 5 per category.

This isn't a bad result, but it feels a bit hacky/manual. Would love if
Cypher supported this kind of thing directly. It's almost like grouping
results and being able to order/limit within groups. But it's also just
another first-degree / second-degree scenario.

Food for thought. =) Thanks for the consideration!

Aseem

On Thu, Aug 25, 2011 at 2:00 PM, Aseem Kishore wrote:

> Thanks Andrés!
>
> Couple of random extensions to the thoughts above:
>
> - To be consistent, perhaps for "optional matches", the results could
> always include a row where that optional match was ignored. That way,
> "Elizabeth, " wouldn't be an inconsistency; *every* first-degree
> friend would have an "[friend], " row.
>
> - And perhaps *that* row could be the one that has the full node data, and
> every subsequent row for the second optional match would just reference the
> URL/ID of the first-degree node.
>
> After chewing on this a lot more, though, I've realized that what I really
> want in this scenario is not tabular data, but a real subgraph. Hence my
> email just now. =)
>
> Aseem
>
>
> On Thu, Aug 25, 2011 at 1:34 PM, Andres Taylor <
> andres.tay...@neotechnology.com> wrote:
>
>> Good and valid requests, Aseem.
>>
>> Consider them heard. We'll see how soon we can get it to you.
>>
>> Andrés
>>
>> On Thu, Aug 25, 2011 at 12:57 PM, Aseem Kishore > >wrote:
>>
>> > Man, I am loving Cypher. Thanks so much guys for introducing it. I'm a
>> bit
>> > stuck on one query, though, and I wanted to ask for help. I think the
>> > reasons I'm stuck are related to the two feature requests I made
>> yesterday
>> > (optional matches, and returning IDs).
>> >
>> > I want to fetch first- and second-degree friends in one query, in a way
>> > that
>> > preserves the first-degree friend(s) for each second-degree friends.
>> Assume
>> > an asymmetrical friendship model, like Twitter's following, because that
>> > makes things a bit easier.
>> >
>> > Here's a simple transitive example:
>> >
>> > - Alice follows Bob and Carol.
>> > - Bob follows Carol and Dave.
>> > - Carol follows Dave and Alice.
>> >
>> >
>> > I want to fetch Alice's first-degree friends (Bob and Carol) and each of
>> > their first-degree friends ((Carol and Dave) for Bob, and (Dave and
>> Alice)
>> > for Carol). This example is easy enough:
>> >
>> > START zero=(Alice)
>> > MATCH (zero) -[:FOLLOWS]-> (first) -[:FOLLOWS]-> (second)
>> > RETURN first, second
>> >
>> >
>> > I expect to get back results like:
>> >
>> > - Bob, Carol
>> > - Bob, Dave
>> > - Carol, Dave
>> > - Carol, Alice
>> >
>> >
>> > This is great because I can get Alice's first-degree friends by
>> > unique()'ing
>> > the first column, for each person, I know their second-degree friends
>> via
>> > the second column.
>> >
>> > But this doesn't work if any of my first-degree friends don't follow
>> > anyone.
>> > For that, it would be great if I could specify that the second part of
>> that
>> > match was "optional", and I'd get back a row like this in that case:
>> >
>> > - Elizabeth, 
>> >
>> > If I'm returning nodes, it also duplicates a ton of info: each
>> first-degree
>> > friend's info is returned in full for each of their friends. Maybe
>> there's
>> > no way around that, but this is also where I would find it convenient to
>> be
>> > able to return IDs somehow for all but one of the results.
>> >
>> > Just thinking out loud here, but I'd greatly appreciate any feedback or
>> > ideas for this scenario. Thanks much!
>> >
>> > Aseem
>> > ___
>> > Neo4j mailing list
>> > User@lists.neo4j.org
>> > https://lists.neo4j.org/mailman/listinfo/user
>> >
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
>
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Cypher: node IDs

2011-08-26 Thread Aseem Kishore
Hey, FWIW, we ended up needing this for actual queries in our app, not just
the console, so we ended up adding a UUID property to every node in our
graph, just so we can efficiently query collections of node pairs (where
nodes may be duplicated many times across pairs). We (auto-)index this UUID
property so we can then do a second lookup for the nodes' data.

If Cypher supported IDs or URLs natively, that would have made this a bit
more convenient. =)

Aseem

On Wed, Aug 24, 2011 at 6:41 PM, Aseem Kishore wrote:

> I was asking really only for the console. I don't see myself needing to use
> the ID programmatically -- except it might be a minor optimization to be
> able to get only node URLs if I already have node data, and I just want to
> compare the output of this query with the nodes I already have.
>
> For the console, the only thing is that nodes w/ many properties (and
> possibly long values, e.g. descriptions) totally litter the console, making
> output impossible to read or make sense of. Shortening the results to just
> IDs (along with selected properties) would be convenient in some cases. In
> many cases, just the properties aren't identifying enough.
>
> Hope this helps, and thanks for the consideration!
>
> Aseem
>
>
> On Wed, Aug 24, 2011 at 5:58 PM, Andres Taylor <
> andres.tay...@neotechnology.com> wrote:
>
>> Hi Aseem,
>>
>> For various reasons, we've (so far) decided against allowing the id to be
>> something you can output. Could you tell me a bit more about why you would
>> like to return just the id?
>>
>> It's not hard to do, but it would make future parts of Cypher harder to
>> do.
>> If there are valid use cases we've missed, we'll reconsider.
>>
>> Regards,
>>
>> Andrés
>>
>> On Wed, Aug 24, 2011 at 5:39 PM, Aseem Kishore > >wrote:
>>
>> > Hey guys,
>> >
>> > Is there any way I can have Cypher return/print node IDs? If I specify
>> for
>> > it to return a node, it returns/prints all data about that node, which
>> can
>> > be excessive. But the problem is, the node's ID isn't a property on that
>> > node. I've tried both node~ID and node~SELF, like rel~TYPE, but neither
>> > works.
>> >
>> > If this isn't possible today, consider it a feature request. =) Thanks!
>> >
>> > Aseem
>> > ___
>> > Neo4j mailing list
>> > User@lists.neo4j.org
>> > https://lists.neo4j.org/mailman/listinfo/user
>> >
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
>
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user