You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/12/22 08:21:39 UTC

[GitHub] [skywalking] JHub-Wei opened a new issue #6055: WebSocket Agent

JHub-Wei opened a new issue #6055:
URL: https://github.com/apache/skywalking/issues/6055


   Please answer these questions before submitting your issue.
   
   - Why do you submit this issue?
   - [* ] Question or discussion
   - [ ] Bug
   - [ ] Requirement
   - [ ] Feature or performance improvement
   
   ___
   ### Question
   - What do you want to know?
   Is there any plan to develop the WebSocket agent plugin?
   ___
   ### Bug
   - Which version of SkyWalking, OS, and JRE?
   
   - Which company or project?
   
   - What happened?
   If possible, provide a way to reproduce the error. e.g. demo application, component version.
   
   ___
   ### Requirement or improvement
   - Please describe your requirements or improvement suggestions.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] makefriend8 commented on issue #6055: WebSocket Agent

Posted by GitBox <gi...@apache.org>.
makefriend8 commented on issue #6055:
URL: https://github.com/apache/skywalking/issues/6055#issuecomment-830577113


   > Take a look at the support list doc. I remember there was one there. But don't know whether you ask that.
   
   Sorry, I can't find any one. Can you please help me @wu-sheng ? Websocket  does not have the http head, so what is the rule for  propagation with the protocol with no head? How about adding a json string such as {"sw8":"xxxxxxx","sw8-correlation":"xxxxxx","sw8-x":"xxxxxxxxxxxx"}?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] makefriend8 commented on issue #6055: WebSocket Agent

Posted by GitBox <gi...@apache.org>.
makefriend8 commented on issue #6055:
URL: https://github.com/apache/skywalking/issues/6055#issuecomment-830733783


   Websocket is a common scenario(it is widely used now, especially in webrtc). Have you considered extending the protocol, not just HTTP (grpc is also based on http2)?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] wu-sheng closed issue #6055: WebSocket Agent

Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #6055:
URL: https://github.com/apache/skywalking/issues/6055


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] wu-sheng commented on issue #6055: WebSocket Agent

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #6055:
URL: https://github.com/apache/skywalking/issues/6055#issuecomment-749417740


   Take a look at the support list doc. I remember there was one there. But don't know whether you ask that.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] wu-sheng commented on issue #6055: WebSocket Agent

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #6055:
URL: https://github.com/apache/skywalking/issues/6055#issuecomment-830577661


   We don't care how you propagate, that is the plugin's responsibility. The key of the format is, you should not impact the peer of the RPC. Such as one side having an agent installed and the other side doesn't, all RPCs should run normally.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] makefriend8 edited a comment on issue #6055: WebSocket Agent

Posted by GitBox <gi...@apache.org>.
makefriend8 edited a comment on issue #6055:
URL: https://github.com/apache/skywalking/issues/6055#issuecomment-830737472


   How about adding a description of the websocket extension to the SkyWalking Cross Process Propagation Headers Protocol.I don't think that protocol is enough for websocket.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] makefriend8 commented on issue #6055: WebSocket Agent

Posted by GitBox <gi...@apache.org>.
makefriend8 commented on issue #6055:
URL: https://github.com/apache/skywalking/issues/6055#issuecomment-830737472


   How about adding a description of the websocket extension to the SkyWalking Cross Process Propagation Headers Protocol.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] makefriend8 edited a comment on issue #6055: WebSocket Agent

Posted by GitBox <gi...@apache.org>.
makefriend8 edited a comment on issue #6055:
URL: https://github.com/apache/skywalking/issues/6055#issuecomment-831848527


   I have two ideas.I don't know which idea is better, it can be discussed
   # Design Philosophy 1
   1: Let all services follow the stomp specification over webscoket.
   2:write a java plugin.( maybe it can be called apm-spring-stomp-over-websocket-plugin)
   3:write a c++ plugin.
   4:write a js plugin.
   (stomp has the optional field like http)
   
   # Design Philosophy 2
   Because websocket has no optional fields, it cannot follow the specification SkyWalking Cross Process Propagation Headers Protocol. However websocket has extended field which named Sec-WebSocket-Extensions in [rfc6455](https://tools.ietf.org/html/rfc6455). I want to use this feature to enable websocket services to be tracked by skywalking and change skywalking as little as possible.
   Let's discuss this scenario.
   ![image](https://user-images.githubusercontent.com/10958991/116992500-b13f6e80-ad08-11eb-947c-98c38557d178.png)
   
   ## step:1 
   Client send http request with "Sec-WebSocket-Extensions:skywalking-extend-rule".(like [rfc7692](https://tools.ietf.org/html/rfc7692 ))
   This indicates that the client has been modified by the plugin, if there is no such field. It indicates that the client has not been modified by the plugin.
   ## step:2
   Server send http response with "Sec-WebSocket-Extensions:skywalking-extend-rule".
   If one of the server or client has not been modified by the plugin, the server will not return this field, and the two sides will communicate in the original way.
   ## step:3 
   Both sides reach an agreement to establish websocket connection.The client sends the first request. The plugin modifies the sent request according to the skywalking-extend-rule protocol.
   ## step:4,5  
   Server calls other necessary services.
   ## step:6 
   The server sends the request. The plugin modifies the sent request according to the skywalking-extend-rule protocol.
   ## step:7 
   The client sends the request. The plugin modifies the sent request according to the skywalking-extend-rule protocol.
   ## step:8,9 
   Server calls other necessary services.
   ## step:10 
   The server sends the request. The plugin modifies the sent request according to the
   ## step:11 
   close connection.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] wu-sheng commented on issue #6055: WebSocket Agent

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #6055:
URL: https://github.com/apache/skywalking/issues/6055#issuecomment-830733071


   > > It depends, how you are going to do. Such as, if you add a field, but the server-side doesn't know and expect, whether could trigger an exception or failure?
   > 
   > 
   > Let's just talk about what may happen while using websocket only. For the client with extended field added, the server that does not know the field will reject the connection of the client. For the server that added the extended field, the client that does not know the field will not be affected.
   
   Then this is not a typical plugin. Unless you would like to ask users to declare fields to host context, such as sw8, sw8-x. Read protocol document, we have a clear document about that.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] wu-sheng commented on issue #6055: WebSocket Agent

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #6055:
URL: https://github.com/apache/skywalking/issues/6055#issuecomment-831885513


   I did a quick read, once this could prevent breaking existing PRC, it is fine. How many plugins are you going to write, that is another this.
   Also, please note, what your proposed has nothing to change the current SkyWalking. All above are pure plugin behavior, please recheck, this is a gap between us.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] makefriend8 edited a comment on issue #6055: WebSocket Agent

Posted by GitBox <gi...@apache.org>.
makefriend8 edited a comment on issue #6055:
URL: https://github.com/apache/skywalking/issues/6055#issuecomment-830701839


   > It depends, how you are going to do. Such as, if you add a field, but the server-side doesn't know and expect, whether could trigger an exception or failure?
   
   Let's just talk about what may happen while using websocket only. For the client with extended field added, the server that does not know the field will reject the connection of the client. For the server that added the extended field, the client that does not know the field will not be affected.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] wu-sheng commented on issue #6055: WebSocket Agent

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #6055:
URL: https://github.com/apache/skywalking/issues/6055#issuecomment-830735561


   Typical means you should not break RPC because of agent. Not talk about the websocket isn't typical.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] makefriend8 commented on issue #6055: WebSocket Agent

Posted by GitBox <gi...@apache.org>.
makefriend8 commented on issue #6055:
URL: https://github.com/apache/skywalking/issues/6055#issuecomment-830737110


   > Typical means you should not break RPC because of agent. Not talk about the websocket isn't typical.
   
   I mean not break the RPC, just get an error of connection. If the client still wants to connect to the server and is not traced by skywalking.it can connect to the server with no  extended field after that error.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] makefriend8 edited a comment on issue #6055: WebSocket Agent

Posted by GitBox <gi...@apache.org>.
makefriend8 edited a comment on issue #6055:
URL: https://github.com/apache/skywalking/issues/6055#issuecomment-830701839


   > It depends, how you are going to do. Such as, if you add a field, but the server-side doesn't know and expect, whether could trigger an exception or failure?
   Let's just talk about what may happen while using websocket only. For the client with extended field added, the server that does not know the field will reject the connection of the client. For the server that added the extended field, the client that does not know the field will not be affected.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] wu-sheng commented on issue #6055: WebSocket Agent

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #6055:
URL: https://github.com/apache/skywalking/issues/6055#issuecomment-830757348


   I think I said. This is not protocol. This is how the plugin would like to do.
   Let's not talk at the protocol level.
   About websocket, how plugin knows where or which field should inject the context(s).
   What is your design? Please provide a doc, then we have something to discuss accordingly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] makefriend8 commented on issue #6055: WebSocket Agent

Posted by GitBox <gi...@apache.org>.
makefriend8 commented on issue #6055:
URL: https://github.com/apache/skywalking/issues/6055#issuecomment-830701839


   > It depends, how you are going to do. Such as, if you add a field, but the server-side doesn't know and expect, whether could trigger an exception or failure?
   Let's just talk about what may happen while using websocket only. For the client with optional field added, the server that does not know the field will reject the connection of the client. For the server that added the optional field, the client that does not know the field will not be affected.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] wu-sheng commented on issue #6055: WebSocket Agent

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #6055:
URL: https://github.com/apache/skywalking/issues/6055#issuecomment-749415111


   > Is there any plan to develop the WebSocket agent plugin?
   
   What do you mean plan? The community counts on the contributors. We usually don't assign tasks. If you want to establish a new thing around SkyWalking, we are glad to help.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] JHub-Wei commented on issue #6055: WebSocket Agent

Posted by GitBox <gi...@apache.org>.
JHub-Wei commented on issue #6055:
URL: https://github.com/apache/skywalking/issues/6055#issuecomment-749416916


   Is there a plugin for tracking websocket messages?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] wu-sheng commented on issue #6055: WebSocket Agent

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #6055:
URL: https://github.com/apache/skywalking/issues/6055#issuecomment-830580530


   > 1: I think all plugins should obey the same rule no matter java agent plugin or python agent plugin.So it should be a standard.
   
   That is a contract for websocket, rather than language or other RPC framework.
   
   > 2: If the protocol has no optional fields,agent plugin can't be accepted by skywalking ?
   
   It depends, how you are going to do. Such as, if you add a field, but the server-side doesn't know and expect, whether could trigger an exception or failure?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] makefriend8 commented on issue #6055: WebSocket Agent

Posted by GitBox <gi...@apache.org>.
makefriend8 commented on issue #6055:
URL: https://github.com/apache/skywalking/issues/6055#issuecomment-830580126


   > We don't care how you propagate, that is the plugin's responsibility. The key of the format is, you should not impact the peer of the RPC. Such as one side having an agent installed and the other side doesn't, all RPCs should run normally.
   
   1: I think  all plugins should obey the same rule  no matter java agent plugin or  python agent plugin.So it should be a standard.
   2: If the protocol has no optional fields,agent plugin can't be accepted by skywalking ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] makefriend8 commented on issue #6055: WebSocket Agent

Posted by GitBox <gi...@apache.org>.
makefriend8 commented on issue #6055:
URL: https://github.com/apache/skywalking/issues/6055#issuecomment-831848527


   I have two ideas.I don't know which idea is better, it can be discussed
   # Design Philosophy 1
   1: Let all services follow the stomp specification over webscoket.
   2:write a java plugin.( maybe it can be called apm-spring-stomp-over-websocket-plugin)
   3:write a c++ plugin.
   4:write a js plugin.
   (stomp has the optional field like http)
   
   #Design Philosophy 2
   Because websocket has no optional fields, it cannot follow the specification SkyWalking Cross Process Propagation Headers Protocol. However websocket has extended field which named Sec-WebSocket-Extensions in [rfc6455](https://tools.ietf.org/html/rfc6455). I want to use this feature to enable websocket services to be tracked by skywalking and change skywalking as little as possible.
   Let's discuss this scenario.
   ![image](https://user-images.githubusercontent.com/10958991/116992500-b13f6e80-ad08-11eb-947c-98c38557d178.png)
   
   ## step:1 
   Client send http request with "Sec-WebSocket-Extensions:skywalking-extend-rule".(like [rfc7692](https://tools.ietf.org/html/rfc7692 ))
   This indicates that the client has been modified by the plugin, if there is no such field. It indicates that the client has not been modified by the plugin.
   ## step:2
   Server send http response with "Sec-WebSocket-Extensions:skywalking-extend-rule".
   If one of the server or client has not been modified by the plugin, the server will not return this field, and the two sides will communicate in the original way.
   ## step:3 
   Both sides reach an agreement to establish websocket connection.The client sends the first request. The plugin modifies the sent request according to the skywalking-extend-rule protocol.
   ## step:4,5  
   Server calls other necessary services.
   ## step:6 
   The server sends the request. The plugin modifies the sent request according to the skywalking-extend-rule protocol.
   ## step:7 
   The client sends the request. The plugin modifies the sent request according to the skywalking-extend-rule protocol.
   ## step:8,9 
   Server calls other necessary services.
   ## step:10 
   The server sends the request. The plugin modifies the sent request according to the
   ## step:11 
   close connection.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org