Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2806

Provide method for provider plugins to get notified on script/query processing

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Done
    • 3.6.1
    • 3.7.0, 3.6.2
    • server
    • None

    Description

      What happens in the gremlin-server is more or less a black box for provider plugins. This ticket proposes a change to the GraphManager interface to allow providers to opt into receiving notifications for GremlinExecutor lifecycles.

      The following items could be added to the GraphManager interface:
      /**

      • This method will be called before a script or query is processed by the
      • gremlin-server.
      • The msg is the {@link RequestMessage} received by the gremlin-server.
        */

        default void beforeQueryStart(RequestMessage msg) {

        }

        /**
        * This method will be called before a script or query is processed by the
        * gremlin-server.
        * The msg is the {@link RequestMessage}

        received by the gremlin-server.

      • The error is the exception encounted during processing from the gremlin-server.
        */
        default void onQueryError(RequestMessage msg, Throwable error) {

      }

      /**

      • When a script or query successfully completes this method will be called.
      • The msg is the {@link RequestMessage}

        received by the gremlin-server.
        */
        default void onQuerySuccess(RequestMessage msg) {

      }

      In AbstractEvalOpProcessor where the GremlinExector.LifeCycle is created the graphManager can be accessed through the Context and those methods called at each stage of the lifecycle.

      In TraversalOpProcessor the graphManager can also be accessed through context. Similar methods exist to the GremlinExecutor.LifeCycle, those can call the graphManager methods as needed.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            spmallette Stephen Mallette
            tkolanko Tom Kolanko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment