[ 
https://issues.apache.org/jira/browse/THRIFT-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14205416#comment-14205416
 ] 

Stephen Marbowitz commented on THRIFT-2791:
-------------------------------------------

This is not the appropriate way to add buffering to the server. 

When you create your server, you can do something like 
thrift.NewTSimpleServer4(processor, transport, 
thrift.NewTBufferedTransportFactory(1024), protocolFactory)

and it will buffer the sockets it creates. 

After this patch, my code as above is creating a double layer of buffers, and 
that is not a good change. Can we please revert this patch and encourage 
creating buffered server sockets the correct way?

> Allowing use of buffered sockets in go server
> ---------------------------------------------
>
>                 Key: THRIFT-2791
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2791
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Go - Library
>            Reporter: Craig Peterson
>            Assignee: Jens Geyer
>             Fix For: 0.9.2
>
>
> There is currently no way in a go server to use buffered sockets. Failing to 
> do so decreases performance significantly in my tests.
> I added an option on TServerSocket to set the buffer size to use. This will 
> default to 1024 bytes, but can be disabled if desired to get back to the 
> original behavior by setting BufferSize to 0.
> Github pull request: https://github.com/apache/thrift/pull/249
> Patch https://github.com/apache/thrift/pull/249.patch



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to