ApacheThrift 0.19.0

dotnet add package ApacheThrift --version 0.19.0
NuGet\Install-Package ApacheThrift -Version 0.19.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ApacheThrift" Version="0.19.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ApacheThrift --version 0.19.0
#r "nuget: ApacheThrift, 0.19.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. 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.19.0

// Install ApacheThrift as a Cake Tool
#tool nuget:?package=ApacheThrift&version=0.19.0

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 Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (27)

Showing the top 5 NuGet packages that depend on ApacheThrift:

Package Downloads
Jaeger.Communication.Thrift

Package Description

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.

FsShelter

F# DSL and runtime for Apache Storm topologies

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 (4)

Showing the top 4 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!
huynhsontung/Indirect
UWP Instagram Direct Message Client
hazelcast/hazelcast-csharp-client
Hazelcast .NET Client
Version Downloads Last updated
0.19.0 8,421 9/2/2023
0.18.1 17,057 3/1/2023
0.18.0 1,528 2/14/2023
0.17.0 30,632 9/18/2022
0.16.0 28,009 2/17/2022
0.15.0 98,367 9/11/2021
0.14.2 6,900 6/17/2021
0.14.1 5,148,130 3/8/2021
0.14.0 9,759 2/13/2021
0.13.0.1 3,739,519 10/17/2019
0.12.0.1 222,366 5/25/2019
0.12.0 15,324 1/2/2019
0.11.0 8,276 1/2/2019
0.10.0 333,070 1/2/2019
0.9.3 125,943 12/15/2015
0.9.2 11,214 2/10/2015