[jira] [Created] (ZEPPELIN-2643) Adding functionality to hook into WebSocket traffic

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Created] (ZEPPELIN-2643) Adding functionality to hook into WebSocket traffic

JIRA jira@apache.org
stergiotis created ZEPPELIN-2643:

             Summary: Adding functionality to hook into WebSocket traffic
                 Key: ZEPPELIN-2643
                 URL: https://issues.apache.org/jira/browse/ZEPPELIN-2643
             Project: Zeppelin
          Issue Type: Improvement
          Components: front-end
    Affects Versions: 0.7.2
            Reporter: stergiotis

I would like to propose an extension mechanism which is orthogonal to the concept of interpreters. This mechanism has proven valuable (and simple) to implement certain kind of end-to-end functionalities across interpreters (e.g. enhanced security, auditing, resource and session management, ...). In order to do so it is necessary to hook into the Zeppelin frontend to backend communication.

I therefore propose the following:
# Introduce a mechanism to late-bind two hook functions upon website instanciation (e.g. try to <script /> a zepplin external resource (in a CORS compliant manner)). Lets call these functions window.hookOutgoing(..) and window.hookIncoming(..).
# Modify https://github.com/apache/zeppelin/blob/master/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js
websocketCalls.ws.send(JSON.stringify(window.hookOutgoing(data))) // instead of websocketCalls.ws.send(JSON.stringify(data))
payload = angular.fromJson(window.hookIncoming(event.data)) // instead of payload = angular.fromJson(event.data)
I am aware of the fact that this exposes Zeppelin internal datastructures which may be subject to changes. I am looking for a late-bind option which does not make use of Angular's dependency injection mechanism.

This message was sent by Atlassian JIRA