Initial Rust support for Thrift lands in Thrift mainline


#23

DO; Ubuntu 17.04 (Binary/Buffered):

C++ -> C++: 0.001095s wall, 0.000000s user + 0.000000s system = 0.000000s CPU (n/a%)
Rust -> Rust: took PT0.000991742S seconds to make 20 calculate calls
C++ -> Rust:  0.000985s wall, 0.000000s user + 0.000000s system = 0.000000s CPU (n/a%)
Rust -> C++: took PT0.001090593S seconds to make 20 calculate calls

@coder543 I think I figured out why you’re seeing timings that are so far off. The Rust client/server binds to 127.0.0.1, not localhost, so it’s using IPV4. I changed it to bind to localhost to match the C++ client, and to use binary/buffered, and I get the timings above.


#24

So, for anyone who comes along afterwards, it looks like switching from Framed to Buffered helps a lot, switching from 127.0.0.1 -> localhost might help some for whatever reason? And Compact -> Binary is probably just good advice, from what I saw.

Would it be possible to push these changes upstream to apache/thrift? That’ll make it easier for newcomers, and it’ll make the Rust server play better with the other reference implementations of the tutorial code.


TWiR quote of the week
#25

@coder543 Absolutely. I’ll change the default implementations.

Also, @coder543 helped identify a surprisingly large difference in times when a Framed transport is used. I’m going to check if that’s something specific to Rust, or common to all transports. I really want to thank him for:

  1. Being super helpful in working with me until we figured out the exact setup that caused the issue (despite my claiming it was a problem with his setup!)
  2. Having a great attitude! We need more people in our community like this.