You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by GitBox <gi...@apache.org> on 2021/05/17 05:28:39 UTC

[GitHub] [thrift] bforbis opened a new pull request #2393: THRIFT-5416: Allow UDP Sockets

bforbis opened a new pull request #2393:
URL: https://github.com/apache/thrift/pull/2393


   Allows perl Socket.pm constructor to take an optional "proto" parameter which would let user's specify the socket to be of type "UDP".


-- 
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] [thrift] emmenlau commented on pull request #2393: THRIFT-5416: Allow UDP Sockets

Posted by GitBox <gi...@apache.org>.
emmenlau commented on pull request #2393:
URL: https://github.com/apache/thrift/pull/2393#issuecomment-855365314


   > If a user is not tolerant to data loss, they should not use UDP. This is an option to increase the efficiency of data transfer and avoid blocking the main application. A specific example of a use case for this is instrumenting a perl application for sending spans to [Jaeger agent](https://www.jaegertracing.io/docs/1.22/deployment/#agent), which only accepts thrift void-style messages over UDP.
   
   I can very much relate to your use case. But I still worry that from the point of view of an unsuspecting Thrift user, its not easily understandable that Thrift will allow UDP and then silently drop lost messages. Furthermore, for non-void-messages its very likely that this will mess with protocols and servers. It seems to me this hands the user a running chainsaw without any guidance. But I may not see all the details here, since AFAICS the change is "only" in the client? Maybe its less harmful there because users are not able to create a corresponding UDP server(?). Opinions?


-- 
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] [thrift] bforbis commented on pull request #2393: THRIFT-5416: Allow UDP Sockets

Posted by GitBox <gi...@apache.org>.
bforbis commented on pull request #2393:
URL: https://github.com/apache/thrift/pull/2393#issuecomment-855287712


   If a user is not tolerant to data loss, they should not use UDP. This is an option to increase the efficiency of data transfer and avoid blocking the main application. A specific example of a use case for this is instrumenting a perl application for sending spans to [Jaeger agent](https://www.jaegertracing.io/docs/1.22/deployment/#agent), which only accepts thrift void-style messages over UDP. 


-- 
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] [thrift] Jens-G merged pull request #2393: THRIFT-5416: (perl) Allow UDP Sockets

Posted by GitBox <gi...@apache.org>.
Jens-G merged pull request #2393:
URL: https://github.com/apache/thrift/pull/2393


   


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@thrift.apache.org

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



[GitHub] [thrift] emmenlau commented on pull request #2393: THRIFT-5416: Allow UDP Sockets

Posted by GitBox <gi...@apache.org>.
emmenlau commented on pull request #2393:
URL: https://github.com/apache/thrift/pull/2393#issuecomment-854664416


   The change itself seems sufficiently clear to be acceptable. But I worry about the implications. AFAIK Thrift is not UDP-aware and has no mechanism to re-transmit or cope with lost packages. Is this in the interest of the user? Are more actions required to make this a useful change?


-- 
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] [thrift] bforbis commented on pull request #2393: THRIFT-5416: Allow UDP Sockets

Posted by GitBox <gi...@apache.org>.
bforbis commented on pull request #2393:
URL: https://github.com/apache/thrift/pull/2393#issuecomment-855454309


   Yes, this would not work for anyone who is using non-void style RPC calls, however considering that UDP is not the default protocol, I find it unlikely this will actually cause any issues for users. Using UDP with thrift should be considered an advanced option and someone who intentionally sets up their client to use UDP should be responsible for understanding the tradeoffs between UDP and TCP and know what they are getting into.
   
   As for setting up a UDP server, I specifically don't have a use case for it in perl so did not implement any server side code. In my example, Jaeger Agent is already setup to be a thrift UDP server (presumably that means there is already thrift UDP server support in golang, though I haven't looked closely at the Jaeger codebase to see if they wrote their own custom thrift code).
   
   Perhaps I could just leave some documentation in the source file about the use cases for tcp vs udp.


-- 
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