ApacheThrift 0.16.0

.NET 5.0 .NET Standard 2.0
Install-Package ApacheThrift -Version 0.16.0
dotnet add package ApacheThrift --version 0.16.0
<PackageReference Include="ApacheThrift" Version="0.16.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ApacheThrift --version 0.16.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ApacheThrift, 0.16.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install ApacheThrift as a Cake Addin
#addin nuget:?package=ApacheThrift&version=0.16.0

// Install ApacheThrift as a Cake Tool
#tool nuget:?package=ApacheThrift&version=0.16.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Apache Thrift netstd

Thrift client library for Microsoft .NET Standard

Build the library

How to build on Windows

  • Get Thrift IDL compiler executable, add to some folder and add path to this folder into PATH variable
  • Open the Thrift.sln project with Visual Studio and build. or
  • Build with scripts

How to build on Unix/Linux

  • Ensure you have .NET Core SDK 3.1 (LTS) installed, or use the Ubuntu docker image
  • Follow common automake build practice: ./ bootstrap && ./ configure && make

Known issues

  • In trace logging mode you can see some not important internal exceptions

Migration to netstd

... from netcore

If you are migrating your code from netcore library, you will have to:

  • Switch to thrift -gen netstd
  • the following compiler flags are no longer needed or supported: hashcode is now standard, while nullable is no longer supported.
  • the Thrift.Transport and Thrift.Protocol namespaces now use the singular form
  • add using Thrift.Processor; in the server code where appropriate
  • rename all T*ClientTransport to T*Transport
  • rename all TBaseServer occurrences in your code to TServer
  • the SingletonTProcessorFactory is now called TSingletonProcessorFactory
  • and the AsyncBaseServer is now the TSimpleAsyncServer

You may wonder why we changed so many names. The naming scheme has been revised for two reasons: First, we want to get back the established, well-known naming consistency across the Thrift libraries which the netcore library did not fully respect. Second, by achieving that first objective, we get the additional benefit of making migration at least a bit easier for C# projects.

... from csharp

Because of the different environment requirements, migration from C# takes slightly more efforts. While the code changes related to Thrift itself are moderate, you may need to upgrade certain dependencies, components or even modules to more recent versions.

  1. Client and server applications must use at least framework 4.6.1, any version below will not work.
  2. Switch to thrift -gen netstd. The following compiler flags are no longer needed or supported: hashcode and async are now standard, while nullable is no longer supported.
  3. Familiarize yourself with the async/await model, if you have not already done so. As netstd does not support ISync anymore, async is mandatory. The synchronous model is simply no longer available (that's also the reason why we don't need the async flag anymore).
  4. Consider proper use of cancellationToken parameters. They are optional but may be quite helpful.
  5. As you probably already guessed, there are a few names that have been changed:
  • add using Thrift.Processor; in the server code where appropriate
  • the TServerSocket is now called TServerSocketTransport
  • change IProtocolFactory into ITProtocolFactory
  • if you are looking for TSimpleServer, try TSimpleAsyncServer instead
  • similarly, the TThreadPoolServer is now a TThreadPoolAsyncServer
  • the server's Serve() method does now ServeAsync()
  • In case you are using Thrift server event handlers: the SetEventHandler method now starts with an uppercase letter
  • and you will also have to revise the method names of all TServerEventHandler descendants you have in your code
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (24)

Showing the top 5 NuGet packages that depend on ApacheThrift:

Package Downloads
Jaeger.Communication.Thrift

Package Description

FsShelter

F# DSL and runtime for Apache Storm topologies

Logary.Targets.Zipkin The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Logary is a high performance, multi-target logging, metric and health-check library for mono and .Net.

Zipkin.Core

A minimalistic .NET client library for Twitter Zipkin tracing.

Logary.Zipkin The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Logary is a high performance, multi-target logging, metric and health-check library for mono and .Net.

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on ApacheThrift:

Repository Stars
fanliang11/surging
Surging is a micro-service engine that provides a lightweight, high-performance, modular RPC request pipeline. support Event-based Asynchronous Pattern and reactive programming ,The service engine supports http, TCP, WS,Grpc, Thrift,Mqtt, UDP, and DNS protocols. It uses ZooKeeper and Consul as a registry, and integrates it. Hash, random, polling, Fair Polling as a load balancing algorithm, built-in service governance to ensure reliable RPC communication, the engine contains Diagnostic, link tracking for protocol and middleware calls, and integration SkyWalking Distributed APM
jaegertracing/jaeger-client-csharp
🛑 This library is DEPRECATED!
Version Downloads Last updated
0.16.0 7,188 2/17/2022
0.15.0 30,761 9/11/2021
0.14.2 3,552 6/17/2021
0.14.1 1,875,559 3/8/2021
0.14.0 7,034 2/13/2021
0.13.0.1 2,883,214 10/17/2019
0.12.0.1 133,625 5/25/2019
0.12.0 11,707 1/2/2019
0.11.0 2,663 1/2/2019
0.10.0 1,719 1/2/2019
0.9.3 105,798 12/15/2015
0.9.2 9,279 2/10/2015