Hiring guide for Thrift Engineers

Thrift Developer Hiring Guide

Thrift is a software framework for scalable cross-language services development, originally developed at Facebook and open-sourced in April 2007. It combines a software stack with a code generation engine to build services that work efficiently across various programming languages such as C++, Java, Python, PHP, Ruby, Erlang and others. Thrift allows developers to define data types and service interfaces in its Interface Definition Language (IDL), which it then uses to generate the corresponding code. This language-agnostic approach enables seamless communication between different systems while maintaining high performance levels. The Apache Software Foundation has maintained Thrift since 2008 when Facebook donated it.

Ask the right questions secure the right Thrift talent among an increasingly shrinking pool of talent.

First 20 minutes

General Thrift app knowledge and experience

The first 20 minutes of the interview should seek to understand the candidate's general background in Thrift application development, including their experience with various programming languages, databases, and their approach to designing scalable and maintainable systems.

How would you explain the main purpose of Thrift?
Thrift is an interface definition language and binary communication protocol that is used to define and create services for numerous languages. It is used as a remote procedure call (RPC) framework and was developed at Facebook for scalable cross-language services development.
What are the main components of Thrift?
Thrift includes a software stack with a compiler for generating code and a library to support the runtime. It has an interface definition language to define data types and service interfaces, and the ability to generate code from these definitions for many languages.
Describe the difference between Thrift and Protocol Buffers.
Thrift and Protocol Buffers are both serialization frameworks and interface definition languages. However, Thrift provides a full server stack, allowing for easy implementation of RPC communication, while Protocol Buffers is mainly a way to encode structured data.
How would you handle exceptions in Thrift?
Thrift supports exceptions as a sort of struct, which can be thrown as part of services. These exceptions can be caught and handled in the client code.
What are the advantages of using Thrift?
Thrift has several advantages such as support for numerous languages, efficient binary serialization format, and a compact protocol for small data sizes. It also provides a full stack server solution.
The hiring guide has been successfully sent to your email address.
Oops! Something went wrong while submitting the form.

What you’re looking for early on

Does the candidate have a solid understanding of Thrift's interface definition language (IDL)?
Has the candidate demonstrated experience with cross-language services development?
Is the candidate able to explain how to handle exceptions in Thrift?
Can the candidate articulate the benefits and drawbacks of using Thrift compared to other similar frameworks?

Next 20 minutes

Specific Thrift development questions

The next 20 minutes of the interview should focus on the candidate's expertise with specific backend frameworks, their understanding of RESTful APIs, and their experience in handling data storage and retrieval efficiently.

How would you implement a service in Thrift?
A service in Thrift is defined in the interface definition language and includes a set of functions. Each function has a list of parameters and a return type. The service is implemented in the server side code.
Describe the difference between the binary and compact protocols in Thrift.
The binary protocol is a straightforward, easy-to-use protocol that uses binary encoding. The compact protocol, on the other hand, provides a more compact data format that is more efficient in terms of bandwidth, but is slightly more complex.
What are the limitations of using Thrift?
Thrift has limitations like lack of support for some languages, the requirement of a separate compilation step, and the lack of built-in security features. It also does not support HTTP/JSON natively.
How would you optimize the performance of a Thrift service?
Performance of a Thrift service can be optimized by choosing the right protocol and transport, using binary or compact protocols for efficiency, and optimizing the service design and implementation.
Describe the difference between synchronous and asynchronous communication in Thrift.
In synchronous communication, the client waits for the server to respond before proceeding. In asynchronous communication, the client does not wait and can perform other tasks while waiting for the server response.
The hiring guide has been successfully sent to your email address.
Oops! Something went wrong while submitting the form.

The ideal back-end app developer

What you’re looking to see on the Thrift engineer at this point.

At this point, a skilled Thrift engineer should demonstrate strong problem-solving abilities, proficiency in Thrift programming language, and knowledge of software development methodologies. Red flags include lack of hands-on experience, inability to articulate complex concepts, or unfamiliarity with standard coding practices.

Digging deeper

Code questions

These will help you see the candidate's real-world development capabilities with Thrift.

What does this simple Thrift definition do?
struct Person {
  1: string name,
  2: i32 age
}
This Thrift definition declares a structure named 'Person' with two fields: 'name' of type string and 'age' of type integer.
What does this Thrift service definition do?
service HelloWorld {
  string sayHello(1: string name)
}
This Thrift service definition declares a service named 'HelloWorld' with a method 'sayHello' that takes a string parameter 'name' and returns a string.
What will be the output of this Thrift list definition?
typedef list IntList
This Thrift list definition declares a new type 'IntList' which is a list of integers.
What does this Thrift concurrency model do?
service Concurrency {
  oneway void asyncTask(1: i32 taskID)
}
This Thrift concurrency model declares a service 'Concurrency' with a method 'asyncTask' that takes an integer parameter 'taskID'. The 'oneway' keyword indicates that the method is asynchronous, i.e., it does not wait for the response.

Wrap-up questions

Final candidate for Thrift Developer role questions

The final few questions should evaluate the candidate's teamwork, communication, and problem-solving skills. Additionally, assess their knowledge of microservices architecture, serverless computing, and how they handle Thrift application deployments. Inquire about their experience in handling system failures and their approach to debugging and troubleshooting.

What are the steps to define and implement a service in Thrift?
First, define the service in the Thrift interface definition language. Then, generate the code for the desired language. Finally, implement the service in the server side code using the generated code.
How would you handle versioning in Thrift services?
Thrift has built-in support for versioning. You can add new fields to existing structures and services, and old clients will simply ignore them. This allows for backward compatibility.
Describe the difference between Thrift and gRPC.
Thrift and gRPC are both RPC frameworks, but gRPC is more modern and supports HTTP/2, which allows for server push and other benefits. Thrift, on the other hand, supports more languages out of the box.

Thrift application related

Product Perfect's Thrift development capabilities

Beyond hiring for your Thrift engineering team, you may be in the market for additional help. Product Perfect provides seasoned expertise in Thrift projects, and can engage in multiple capacities.