You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Alexander Elyseev (JIRA)" <ji...@apache.org> on 2014/01/16 20:15:29 UTC

[jira] [Comment Edited] (THRIFT-2310) PHP: Client-side support for Multiplexing Services

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

Alexander Elyseev edited comment on THRIFT-2310 at 1/16/14 7:15 PM:
--------------------------------------------------------------------

Hi [~jensg],

I've uploaded second version of the patch with PHPUnit tests and with some refactoring:
# new files was added to makefiles;
# unit test for TMultiplexedProtocol was added;
# files with PHPUnit classes was renamed according to required pattern (with *Test.php* postfix);
# common autoload php file for all tests;

About integrated tests. I have not found tests for multiplexed clients or servers. I may be wrong, but it looks like great amount of work. Can we create another issue or it's required for this task?

As you could see, my english is not perfect, and I'll be very appreciated if you tell me about grammar mistakes at code.

Best regards,
Alexander


was (Author: alexanderelyseev):
Second version with PHPUnit tests and some refactoring.

> PHP: Client-side support for Multiplexing Services
> --------------------------------------------------
>
>                 Key: THRIFT-2310
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2310
>             Project: Thrift
>          Issue Type: Sub-task
>          Components: PHP - Library
>    Affects Versions: 0.9.1
>            Reporter: Alexander Elyseev
>            Assignee: Jens Geyer
>            Priority: Minor
>              Labels: multiplexing
>         Attachments: php_multiplexed_protocol.diff, php_multiplexed_protocol_v2.diff
>
>
> Attached patch contains implementation of TMultiplexedProtocol for PHP Thrift client that used TProtocolDecorator (the same approach from Java client).
> Example:
> {code}
> $socket = new TSocket('localhost', '9090');
> $transport = new TBufferedTransport($socket);
> $protocol = new TMultiplexedProtocol(new TBinaryProtocol($transport), "CalcService");
> $transport->open();
> $calcService = new CalcServiceClient($protocol);
> $calcService->calculate();
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)