ApacheThrift 0.21.0
dotnet add package ApacheThrift --version 0.21.0
NuGet\Install-Package ApacheThrift -Version 0.21.0
<PackageReference Include="ApacheThrift" Version="0.21.0" />
paket add ApacheThrift --version 0.21.0
#r "nuget: ApacheThrift, 0.21.0"
// Install ApacheThrift as a Cake Addin #addin nuget:?package=ApacheThrift&version=0.21.0 // Install ApacheThrift as a Cake Tool #tool nuget:?package=ApacheThrift&version=0.21.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.
- Alternatively, build from source by using the cmake target "copy-thrift-compiler", which places the binary to a suitable place.
- Open the Thrift.sln project with Visual Studio and build. or
- Build with scripts
How to build on Unix/Linux
- Ensure you have a suitable .NET Core SDK 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, whilenullable
is no longer supported. - the
Thrift.Transport
andThrift.Protocol
namespaces now use the singular form - add
using Thrift.Processor;
in the server code where appropriate - rename all
T*ClientTransport
toT*Transport
- rename all
TBaseServer
occurrences in your code toTServer
- the
SingletonTProcessorFactory
is now calledTSingletonProcessorFactory
- and the
AsyncBaseServer
is now theTSimpleAsyncServer
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.
- Client and server applications must use at least framework 4.6.1, any version below will not work.
- Switch to
thrift -gen netstd
. The following compiler flags are no longer needed or supported:hashcode
andasync
are now standard, whilenullable
is no longer supported. - Familiarize yourself with the
async/await
model, if you have not already done so. As netstd does not supportISync
anymore, async is mandatory. The synchronous model is simply no longer available (that's also the reason why we don't need theasync
flag anymore). - Consider proper use of
cancellationToken
parameters. They are optional but may be quite helpful. - 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 calledTServerSocketTransport
- change
IProtocolFactory
intoITProtocolFactory
- if you are looking for
TSimpleServer
, tryTSimpleAsyncServer
instead - similarly, the
TThreadPoolServer
is now aTThreadPoolAsyncServer
- the server's
Serve()
method does nowServeAsync()
- 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 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 was computed. 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 is compatible. 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. |
-
.NETStandard 2.0
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.Extensions.Logging (>= 8.0.0)
- Microsoft.Extensions.Logging.Console (>= 8.0.0)
- Microsoft.Extensions.Logging.Debug (>= 8.0.0)
- System.IO.Pipes (>= 4.3.0)
- System.IO.Pipes.AccessControl (>= 5.0.0)
- System.Net.Http.WinHttpHandler (>= 8.0.1)
- System.Net.NameResolution (>= 4.3.0)
- System.Net.Requests (>= 4.3.0)
- System.Net.Security (>= 4.3.2)
- System.Threading.Tasks.Extensions (>= 4.5.4)
-
.NETStandard 2.1
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.Extensions.Logging (>= 8.0.0)
- Microsoft.Extensions.Logging.Console (>= 8.0.0)
- Microsoft.Extensions.Logging.Debug (>= 8.0.0)
- System.IO.Pipes (>= 4.3.0)
- System.IO.Pipes.AccessControl (>= 5.0.0)
- System.Net.Http.WinHttpHandler (>= 8.0.1)
- System.Net.NameResolution (>= 4.3.0)
- System.Net.Requests (>= 4.3.0)
- System.Net.Security (>= 4.3.2)
- System.Threading.Tasks.Extensions (>= 4.5.4)
-
net6.0
- Microsoft.Extensions.Logging (>= 8.0.0)
- Microsoft.Extensions.Logging.Console (>= 8.0.0)
- Microsoft.Extensions.Logging.Debug (>= 8.0.0)
- System.IO.Pipes (>= 4.3.0)
- System.Net.Http.WinHttpHandler (>= 8.0.1)
- System.Net.NameResolution (>= 4.3.0)
- System.Net.Requests (>= 4.3.0)
- System.Net.Security (>= 4.3.2)
- System.Threading.Tasks.Extensions (>= 4.5.4)
-
net8.0
- Microsoft.AspNetCore.Components.Web (>= 8.0.7)
- Microsoft.Extensions.Logging (>= 8.0.0)
- Microsoft.Extensions.Logging.Console (>= 8.0.0)
- Microsoft.Extensions.Logging.Debug (>= 8.0.0)
- System.IO.Pipes (>= 4.3.0)
- System.Net.Http.WinHttpHandler (>= 8.0.1)
- System.Net.NameResolution (>= 4.3.0)
- System.Net.Requests (>= 4.3.0)
- System.Net.Security (>= 4.3.2)
- System.Threading.Tasks.Extensions (>= 4.5.4)
NuGet packages (28)
Showing the top 5 NuGet packages that depend on ApacheThrift:
Package | Downloads |
---|---|
Jaeger.Communication.Thrift
Package Description |
|
Logary.Targets.Zipkin
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
Logary is a high performance, multi-target logging, metric and health-check library for mono and .Net. |
GitHub repositories (5)
Showing the top 5 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
|
|
apache/arrow-adbc
Database connectivity API standard and libraries for Apache Arrow
|
|
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.21.0 | 5,609 | 9/22/2024 | |
0.20.0 | 28,875 | 3/22/2024 | |
0.19.0 | 23,594 | 9/2/2023 | |
0.18.1 | 25,142 | 3/1/2023 | |
0.18.0 | 2,619 | 2/14/2023 | |
0.17.0 | 48,893 | 9/18/2022 | |
0.16.0 | 39,981 | 2/17/2022 | |
0.15.0 | 128,895 | 9/11/2021 | |
0.14.2 | 24,445 | 6/17/2021 | |
0.14.1 | 6,433,640 | 3/8/2021 | |
0.14.0 | 10,855 | 2/13/2021 | |
0.13.0.1 | 3,996,798 | 10/17/2019 | |
0.12.0.1 | 269,869 | 5/25/2019 | |
0.12.0 | 15,960 | 1/2/2019 | |
0.11.0 | 11,727 | 1/2/2019 | |
0.10.0 | 442,203 | 1/2/2019 | |
0.9.3 | 139,993 | 12/15/2015 | |
0.9.2 | 12,126 | 2/10/2015 |