You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PHP library does not have THeaderProtocol defined #6
This is not a bug at all more a feature/roadmap request.
The new changes to CPP and generator here are very welcome and mirror several features I am on the verge of hacking into thrift myself (specifically augmenting RPC protocol with headers and variable encoding and a more flexible generator) so I'd love to use your implementation rather than another custom fork.
I'm not very clear from the release notes and reading code though what state the non-cpp language bindings are in here.
Specifically my case needs PHP to work and given that some changes have been made to both generated PHP and the lib compared to Apache thrift, it seems like none of the new features (particularly THeaderProtocol and out-of-order messaging) were built for PHP yet. I was reasonably surprised by that given Facebook's use of PHP for front end especially since python does appear to have the new protocol.
Is this because there are internal different versions/libraries used by your PHP code (like built into the internal version of HHVM or something) or do you really not have a need for any of the new features in PHP client RPCs?
Are there plans to work on that at any point?
Thanks for your commitment to Open Source and the great software!
I agree that out of order messaging would be a great feature to have in every language (on both client and server).
To answer your question as to why it does not exist today: in php, we actually built a php extension that uses an internal thrift routing layer that is written in cpp. The reason we built it was more for connection pooling between requests and to reuse existing routing logic, but one of the more 'accidental' benefits of this is that we did not need to write the out of order connection multiplexing in php, and so it hasn't been done yet!
I believe we do have some new features in our php git repo that we'll have to merge back, including THeaer - but as Marc pointed out, it's not as complete as C++, as we're using C++ bindings in php now.
I guessed at this answer but since there is no sign of client code in the public HHVM code base I wanted to check what the plans were.
Without being able to promise anything right now, would a native PHP contribution of THeader and other new features be a worthwhile thing for me or another to spend time on or would it just duplicate work you have already done internally and will release soon anyway?
Everything we're going to release is now merged: 8be7319
I did some simple testing on it, but might still have issues, YYMV. We use it in production at facebook, but it may still have some hhvm specific references.
Activity
marccelani commentedon Mar 3, 2014
I agree that out of order messaging would be a great feature to have in every language (on both client and server).
To answer your question as to why it does not exist today: in php, we actually built a php extension that uses an internal thrift routing layer that is written in cpp. The reason we built it was more for connection pooling between requests and to reuse existing routing logic, but one of the more 'accidental' benefits of this is that we did not need to write the out of order connection multiplexing in php, and so it hasn't been done yet!
djwatson commentedon Mar 3, 2014
I believe we do have some new features in our php git repo that we'll have to merge back, including THeaer - but as Marc pointed out, it's not as complete as C++, as we're using C++ bindings in php now.
banks commentedon Mar 8, 2014
Thanks for the responses guys.
I guessed at this answer but since there is no sign of client code in the public HHVM code base I wanted to check what the plans were.
Without being able to promise anything right now, would a native PHP contribution of THeader and other new features be a worthwhile thing for me or another to spend time on or would it just duplicate work you have already done internally and will release soon anyway?
djwatson commentedon Mar 10, 2014
I'll merge all the php changes we have as soon as I get time. It's unlikely we will release the client HHVM code anytime soon, though.
www -> fbcode php merge
djwatson commentedon Mar 18, 2014
Everything we're going to release is now merged: 8be7319
I did some simple testing on it, but might still have issues, YYMV. We use it in production at facebook, but it may still have some hhvm specific references.
thrift: avoid ASAN-detected test-only stack buffer overrun
thrift/lib/cpp2/test/StreamingTest.cpp: fix SIOF bug and heap-use-aft…
Regression unit-test for recent crash in THttpParser
fix dynamic-type-mismatch UBSAN error in t_json_generator.cc
Do not manually reset `RocketServerConnection::socket_`
Fix TMemoryBuffer::ensureCanWrite
Fix ByteBuf leak in legacy THeader client on unmatched response seqId
Fix ByteBuf leak in legacy THeader server on synchronous decode/dispa…
Add e2e regression test for Cpp2Channel::writeError upgrade-teardown UAF
Support Allocator In Union #6: Fix cpp.allocator union copy assignmen…