[Neo4j] neo4j REST GraphAlgo

Todd Chaffee todd at mikamai.com
Sat Aug 21 13:28:12 CEST 2010

Hi Mattias,

> Could you supply some test case which can trigger it? That ShortestPath
> algo
> has been tested and even deployed in production environments with correct
> behaviour.

Yes, I'll try to reproduce this with a small bit of java code.  You could
also reproduce it immediately with any of the pathfinder examples just by
using a maxdepth of 1 or 2 where the shortest path is really 3.  For me it
still returned a path with a length of 3 and I was expecting it to return an
empty result.

> So shortest path is the default algo if none specified?

Yes, it seemed like a reasonable default.  I could change it if there is a
group preference for another algorithm.

> My initial thought was to have a
>    .../node/1/shortestpaths
>    .../node/1/allpaths
>    a.s.o.
> Or even (may be my favourite)
>    .../node/1/paths/shortest
>    .../node/1/paths/simple
> for multiple paths and
>    .../node/1/path/shortest
>    .../node/1/path/simple.
> for single paths, but it's a matter of taste here I'd guess. Your solution
> is also quite nice.

I can never decide myself when it comes to REST :-)  The reason I didn't go
with something like the above is that I'm still not entirely happy with
tying the algorithm name directly to the API.  I'd like to see a way that
new algorithms could be implemented without an impact (or with minimal
impact) to the REST api.

Thanks for taking the time to look at this and I'm looking forward to
hearing your feedback on the code when you get chance.


More information about the User mailing list