carnival-data / carnival

JVM property graph data unification framework
https://carnival-data.github.io/carnival/
GNU General Public License v3.0
7 stars 2 forks source link

Reaper V2 #41

Closed augustearth closed 3 years ago

augustearth commented 3 years ago

Migrate Reaper, so it follows the Vine pattern.

Basic Call

myReaper.method('doSomething').arguments(Map).call()

Vertices representing all executed reaper method processes

myReaper.method('doSomething').processes()

Vertices representing all reaper method processes given arguments

myReaper.method('doSomething').arguments(Map).processes()

Vertices representing all executed reaper method processes

myReaper.method('doSomething').processes().vertices()

Outputs to any reaper process regardless of arguments

myReaper.method('doSomething').outputs()

Outputs to reaper processes with given arguments

myReaper.method('doSomething').arguments(Map).outputs()
augustearth commented 3 years ago

Reaper

method(String) - returns the ReaperMethod with the given name

ReaperMethod

arguments(Map) - sets the arguments of the ReaperMethod call(Graph, GraphTraversal) - calls the reaper method, returns a ReaperMethodCall processes(GraphTraversal) - returns the collection of executed reaper processes

ReaperMethodCall

arguments() - returns the arguments of the call process(GraphTraversal) - returns the ReaperMethodProcess for this call

ReaperMethodProcess

vertex() - the process vertex outputs(GraphTraversal) - returns the ouput vertices of the process

augustearth commented 3 years ago

While working on this issue, decided that both reapers and reasoners have similar characteristics. They could both be considered graph operations. Implemented a GraphMethod structure similar to VineMethod. There is a GraphMethods trait that is an analog to Vine, the common functionality of the two factored into a utility superclass.

Maybe leave things here for now. Reaper and Reasoner need to be further considered to determine what, if anything, is special about them. If/when that is defined, can implement them.

augustearth commented 3 years ago

Closed by 462296d1a59e608aef1493b2e78069994e8ebb8a.