You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jens Geyer (JIRA)" <ji...@apache.org> on 2016/11/28 23:53:58 UTC

[jira] [Comment Edited] (THRIFT-3989) PHP socket client unsupports TFramedTransport

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

Jens Geyer edited comment on THRIFT-3989 at 11/28/16 11:53 PM:
---------------------------------------------------------------

A TFramedSocketTransport sounds strange, that does not fit into the Thrift concept. The TFramedTransport implementation is a so-called "layered" Transport, one which is added (or stacked) to an endpoint transport, e.g. TSocketTransport. 

Due to the modular concept of Thrift, the TFramedTransport could be as well added to some other transport and because of this it must not have a fix relation to a particular endpoint. Technical Details aside, it should work in PHP exactly the same way as with C++ or C# or Ruby.

Hence, if your TFramedSocketTransport really does what the name suggests, it does not follow the modular concept of Thrift that is maintained consistently throughout all languages.

Interestingly enough, [there is already a TFramedTransport implementation for PHP|https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob;f=lib/php/lib/Thrift/Transport/TFramedTransport.php]. And [the Test Suite implementation shows you how to use it|https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob;f=test/php/TestClient.php;h=2443ee058d0b89d56987da5ee9dbcbc74b8461f5;hb=HEAD#l101]

Does that answer your question?






was (Author: jensg):
A TFramedSocketTransport sounds strange, that does not fit into the Thrift concept. The TFramedTransport implementation is a so-called "layered" Transport, one which is added (or stacked) to an endpoint transport, e.g. TSocketTransport. 

Due to the modulatr concept of Thrift, the TFramedTransport could be as well added to some other transport and because of this it must not have a fix relation to a particular endpoint. Technical Details aside, it should work in PHP exactly the same way as with C++ or C# or Ruby.

Hence, if your TFramedSocketTransport really does what the name suggests, it does not follow the modular concept of Thrift that is maintained consistently throughout all languages.

Interestingly enough, [there is already a TFramedTransport implementation for PHP|https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob;f=lib/php/lib/Thrift/Transport/TFramedTransport.php]. And [the Test Suite implementation shows you how to use it|https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob;f=test/php/TestClient.php;h=2443ee058d0b89d56987da5ee9dbcbc74b8461f5;hb=HEAD#l101]

Does that answer your question?





> PHP socket client unsupports TFramedTransport
> ---------------------------------------------
>
>                 Key: THRIFT-3989
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3989
>             Project: Thrift
>          Issue Type: Bug
>          Components: PHP - Library
>    Affects Versions: 0.7, 0.9.3, 0.10.0, 0.11.0
>            Reporter: Zuocheng Liu
>              Labels: patch
>             Fix For: 0.7, 0.9.3, 0.10.0, 1.0
>
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> TFramedTransport for socket is unsupported.
> My C++ thrift server use TFramedTransport, While my PHP thrift client can not connect it.
> I have written a php class named TFramedScoketTransport to solve this problem.
> May I submit the code to the unreleased versions? 



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