Add examples in all supported languages
As far as I can see fbthrift supports all major languages which are used at Meta (Hack, Cpp, Rust, Python and Java [^1]) but the examples directory only contains a simple Python and Cpp client/server example.
Hopefully this is just a port of internal examples.
Thanks.
[^1]: Taken from https://engineering.fb.com/2022/07/27/developer-tools/programming-languages-endorsed-for-server-side-use-at-meta/
Well, this repo is faulty and not useful.
- fbthrift is not buildable
Unfortunately, this code is only buildable with Facebook internal build system "Buck". Buck itself is open-sourced (https://buck.build/) but the build files are full of internal references which would make it impossible to use outside of Facebook.
Originally posted by @stevegury in https://github.com/facebook/fbthrift/issues/364#issuecomment-544726256
- fbthrift even cannot run normally
At client, "MethodName" will be convert to "method_name", like this:
https://github.com/facebook/fbthrift/blob/70d9d75aeb70fa936d322e3fe28157cd6497cc05/thrift/compiler/test/fixtures/basic/out/java/gen-java/test/fixtures/basic/FB303ServiceReactiveClient.java#L98-L99
But for server, "MethodName" is still "MethodName", like:
https://github.com/facebook/fbthrift/blob/70d9d75aeb70fa936d322e3fe28157cd6497cc05/thrift/compiler/test/fixtures/basic/out/java/gen-java/test/fixtures/basic/FooServiceRpcServerHandler.java#L190-L192
Caused TApplicationException: no method found with name simple_rpc.
I didn't know why there is an convertion, what is .thrift file has two method simple_rpc and simpleRpc?
- fbthrift lacks document, you couldn't find any document for use fbthrift.
There is only source code, which is not buildable.
- fbthrift pollute search engine
When talking thrift, developers have to distinguish which thrift, apache thrift or fbthrift.
Thrift holds a significant position in the history of RPC (Remote Procedure Call) frameworks as it is truly a remarkable one and was among the earliest developed in this domain. It once boasted a series of features that made it a popular choice among developers in the early days of RPC development. For instance, it provided efficient ways to enable communication between different services across various programming languages, facilitating the building of distributed systems. However, as the technology landscape has evolved rapidly over time, it's rather disheartening to witness that Thrift's influence in the RPC field has waned to such a considerable extent nowadays.
One of the major issues plaguing Thrift is the fragmentation within its community. Specifically, it has diverged into two main branches, namely apache thrift and fbthrift. This split has led to a lack of cohesive development efforts. Different teams or individuals might be working on these separate branches, resulting in inconsistent feature implementations, compatibility challenges between the two variants, and a general confusion for users who are trying to decide which one to adopt. Another problem that can't be overlooked is its relatively low developer-friendliness. When developers evaluate a framework for their projects, aspects such as straightforward APIs, comprehensive and clear documentation, easy onboarding processes, and convenient debugging tools are of utmost importance. Unfortunately, Thrift falls short in some of these areas. Its APIs might not be as intuitive as those of some modern RPC frameworks, making it take longer for developers to understand and utilize them effectively. The documentation might also lack clarity or be incomplete in certain aspects, causing developers to struggle when they encounter issues during the development process. All these factors combined make it less appealing compared to other options available in the market.
Subsequently, with the emergence of gRPC, which has come to the fore with its own set of powerful features and advantages, Thrift has been gradually overshadowed. gRPC, built on top of the HTTP/2 protocol, offers high performance, seamless cross-language support, and excellent compatibility with the cloud-native ecosystem. It has managed to attract a large number of developers and enterprises, gradually taking over the spotlight in the RPC domain that Thrift once held. This shift in the landscape is truly a pity considering Thrift's historical contributions and potential.