I'm trying to learn and use the GAS API to implement a Random Walk over my database, associating every visited vertex to the starting vertex.
I'm having some issues understanding how I can manage to do this; I've been reviewing the PATHS, BFS, PR, and other GAS classes as examples, but I'm not quite sure how to start.
I think my implementation should extend BaseGASProgram
and implement the needed methods. Also, as iterative, the frontier contains all the vertexes of the current iteration. The concept of predecessor is also clear to me.
But I don't think that I understand very well the Gather, Apply, Scatter philosophy and how to distribute the Random Walk over these three concepts.
Also, once I implement my code, how do I call it? How do I even call the already implemented algorithms (PR, SSSP, BFS, etc.) inside my code? Should I instantiate an SSSP
object and then what? Or GASContext
? GASRunnerBase
?
Take a look at the TestBFS class in the bigdata-gas package:
To use it outside of the test case context, you need to create a
SailConnection
of some sort. See the blazegraph-samples GitHub project for examples. Then you need to create aSAILGASEngine
. This should get you started in terms of calling theGASEngine
directly at the Java layer.