Skip to content

PHP library does not have THeaderProtocol defined #6

Closed

Description

@banks

Hi

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!

Paul

Activity

  1. marccelani commented on Mar 3, 2014

    @marccelani

    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!

  2. djwatson commented on Mar 3, 2014

    @djwatson

    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.

  3. banks commented on Mar 8, 2014

    @banks
    Author

    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?

  4. djwatson commented on Mar 10, 2014

    @djwatson

    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.

  5. added a commit that references this issue on Mar 18, 2014
  6. djwatson commented on Mar 18, 2014

    @djwatson

    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.

  7. added a commit that references this issue on Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions