Oleg, for an example of this, see http://docs.neo4j.org/chunked/snapshot/gremlin-plugin.html#rest-api-send-a-gremlin-script---json-encoded-with-table-resultswhere the returned table does not contain nodes or relationships, but only properties, this resulting in _MUCH_ smaller return values, doing most of the work on the server.
Is that what you are looking for? 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 Mon, Aug 29, 2011 at 8:12 PM, Marko Rodriguez <okramma...@gmail.com>wrote: > Hi, > > > - Data transfer bottleneck. Returning a large set of nodes/relationships > > from a Gremlin query with Json might result in excesive result size. We > > transfer from hundreds to 100.000 entities. In our case, we only need to > > obtain a single property value (or just a few properties) for each > > node/relationship. Is it possible to control/limit data in exported node > > representation? We guess this would solve the problem. > > Why return nodes/relationships if you only want a single property: > > g.v(1).out.in.myProperty > > > - Server-side calculations. We find Gremlin very useful to perform simple > > calculations on server side. However, we were not able to return Map > result > > generated by Gremlin's groupCount () call on entity property. The script > > traverses multiple relationships and builds { propertyName, counter } > > histogram. This works fine in Gremlin console, but how to export this > result > > back via REST API. We tried tables, but this option seems to be limited > only > > to nodes/relationships. Any options? > > I don't know enough about the REST API and Gremlin, but have you tried: > > m = [:] > g.v(1).my.groupCount(m).based.traversal >> -1 > m > > where you need the 'm' at the end to return the map. > > Or are you saying that m can't be converted correctly to something Neo4j > managed extensions can understand and JSONify for you? > > See ya, > Marko. > > http://markorodriguez.com > > > > > > Thanks for help in advance! > > > > Best regards, > > Oleg Morajko > > innoquant.com > > > > > > -- > > View this message in context: > http://neo4j-community-discussions.438527.n3.nabble.com/REST-API-output-respresentation-and-performance-tp3293338p3293338.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 mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user