Hi people,

Here is a ticket that I think we should strongly consider.

        https://issues.apache.org/jira/browse/TINKERPOP-1166 (in particular 
read my last comment for a clean breakdown)
        
This would be an API breaking change for both users (who write VertexPrograms) 
and providers (who have their own GraphComputer implementation).

* If you are a user and don't have any VertexProgram implementations, this will 
not effect you save for performance gains.
* If you are a graph system provider that does not have a custom GraphComputer 
(e.g. you rely on SparkGraphComputer for instance), this will not effect you 
either.

If you do write VertexPrograms, it will require you to go through your 
VertexProgram and change all your memory.xxx() calls. Here are the stats on the 
main VertexPrograms TinkerPop has:
        PageRankVertexProgram -- 0 memory calls.
        PeerPressureVertexProgram -- 3 memory calls. (could be 2 if I was smart 
organizing my code)
        TraversalVertexProgram -- 3 memory calls.
Thus, its not a big rewrite. It will be simply changing, for example, 
"memory.and("vote",true) to memory.add("vote",true)" .. thats it. No more 
incr(), sum(), etc. methods. You just .add().

If you do have a custom GraphComputer, it will require you to rewrite your 
Memory implementation. The logic is basically the same (nothing you can't 
already express with your system now), but the API will be different, though 
less methods required. Finally, I will add a 
GraphComputerTest.shouldRespectTransientKeys() that will make sure transient 
memory and compute keys are purged prior to returning the ComputerResult.

Please review the proposed changes and provide your feedback. I don't think we 
will be able to make this a backwards compatible change so, please think hard.

Thanks,
Marko.

http://markorodriguez.com

Reply via email to