[
https://issues.apache.org/jira/browse/THRIFT-2310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13874018#comment-13874018
]
Jens Geyer commented on THRIFT-2310:
------------------------------------
Hi Alexander,
good work, but maybe there was a slight misunderstanding.
# With "missing" I looked especially for the PHP-equivalent of the
[TMultiplexedProcessor|https://github.com/apache/thrift/blob/master/lib/java/src/org/apache/thrift/TMultiplexedProcessor.java],
which is still missing. You implemented the client side, but there is also a
server side, which routes the message to the appropriate handlers, based on the
service prefix added in the client code.
# What I meant by "testcase": An example can be found under
[lib/csharp/test|https://github.com/apache/thrift/tree/master/lib/csharp/test/Multiplex].
I didn't remember that Java does not have one yet (albeit it should).
Lastly, you did great work by refactoring and adding some more tests. In my
opinion, we should indeed open another ticket for _that_ stuff. We should focus
solely on the multiplex stuff here. Would it be possible to split the patch
into two?
> 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)