AvroConvert 2.7.0
Apache Avro serializer for .NET.
See the version list below for details.
Install-Package AvroConvert -Version 2.7.0
dotnet add package AvroConvert --version 2.7.0
<PackageReference Include="AvroConvert" Version="2.7.0" />
paket add AvroConvert --version 2.7.0
#r "nuget: AvroConvert, 2.7.0"
Docs
Avro format combines readability of JSON and compression of binary data serialization.
Benefits
The main purpose of the project was to enhance HTTP communication between microservices. Replacing JSON with Avro brought three main benefits:
- Decreased the communication time between microservices
- Reduced the network traffic by about 30%
- Increased communication security - the data was not visible in plain JSON text
Article describing Avro format specification and benchmark methodology: https://xabe.net/why-avro-api-is-the-best-choice/
Conclusion: <br>
Using Avro for communication between your services significantly reduces communication time and network traffic. Additionally choosing encoding (compression algorithm) can improve the results even further.
Code samples
- Serialization
byte[] avroObject = AvroConvert.Serialize(object yourObject);
<br/>
- Deserialization
CustomClass deserializedObject = AvroConvert.Deserialize<CustomClass>(byte[] avroObject);
<br/>
- Read schema from Avro object
string schemaInJsonFormat = AvroConvert.GetSchema(byte[] avroObject)
<br/>
- Deserialization of large collection of Avro objects one by one
using (var reader = AvroConvert.OpenDeserializer<CustomClass>(new MemoryStream(avroObject)))
{
while (reader.HasNext())
{
var item = reader.ReadNext();
// process item
}
}
Related packages
- Library containing functionalities, which enable communication between microservices via Http using Avro data format
- Library containing extensions for Confluent Kafka platform - used together with Kafka Consumer and Producer
License
The project is CC BY-NC-SA 3.0 licensed.
For commercial purposes purchase AvroConvert on website - Xabe.net
Contribution
We want to improve AvroConvert as much as possible. If you have any idea, found next possible feature, optimization opportunity or better way for integration, leave a comment or pull request.
Docs
Avro format combines readability of JSON and compression of binary data serialization.
Benefits
The main purpose of the project was to enhance HTTP communication between microservices. Replacing JSON with Avro brought three main benefits:
- Decreased the communication time between microservices
- Reduced the network traffic by about 30%
- Increased communication security - the data was not visible in plain JSON text
Article describing Avro format specification and benchmark methodology: https://xabe.net/why-avro-api-is-the-best-choice/
Conclusion: <br>
Using Avro for communication between your services significantly reduces communication time and network traffic. Additionally choosing encoding (compression algorithm) can improve the results even further.
Code samples
- Serialization
byte[] avroObject = AvroConvert.Serialize(object yourObject);
<br/>
- Deserialization
CustomClass deserializedObject = AvroConvert.Deserialize<CustomClass>(byte[] avroObject);
<br/>
- Read schema from Avro object
string schemaInJsonFormat = AvroConvert.GetSchema(byte[] avroObject)
<br/>
- Deserialization of large collection of Avro objects one by one
using (var reader = AvroConvert.OpenDeserializer<CustomClass>(new MemoryStream(avroObject)))
{
while (reader.HasNext())
{
var item = reader.ReadNext();
// process item
}
}
Related packages
- Library containing functionalities, which enable communication between microservices via Http using Avro data format
- Library containing extensions for Confluent Kafka platform - used together with Kafka Consumer and Producer
License
The project is CC BY-NC-SA 3.0 licensed.
For commercial purposes purchase AvroConvert on website - Xabe.net
Contribution
We want to improve AvroConvert as much as possible. If you have any idea, found next possible feature, optimization opportunity or better way for integration, leave a comment or pull request.
Dependencies
-
.NETStandard 2.0
- BrotliSharpLib (>= 0.3.3)
- Microsoft.CSharp (>= 4.7.0)
- Newtonsoft.Json (>= 12.0.3)
Used By
NuGet packages (3)
Showing the top 3 NuGet packages that depend on AvroConvert:
Package | Downloads |
---|---|
SolTechnology.Avro.Http
Library containing functionalities, which enable communication between microservices using Avro data format
|
|
SolTechnology.Avro.Kafka
Library containing extensions for Confluent Kafka platform
|
|
SlimMessageBus.Host.Serialization.AvroConvert
Extension to SlimMessageBus that provides Avro serialization based on the AvroConvert library
|
GitHub repositories
This package is not used by any popular GitHub repositories.
Version History
Version | Downloads | Last updated |
---|---|---|
2.7.1 | 235 | 2/5/2021 |
2.7.0 | 10,452 | 12/18/2020 |
2.6.3 | 2,188 | 10/25/2020 |
2.6.2 | 109 | 10/23/2020 |
2.6.1 | 1,966 | 7/25/2020 |
2.6.0 | 178 | 7/22/2020 |
2.5.1 | 962 | 6/11/2020 |
2.5.0 | 489 | 5/15/2020 |
2.4.1 | 961 | 4/14/2020 |
2.4.0 | 461 | 3/25/2020 |
2.3.0 | 378 | 3/19/2020 |
2.2.2 | 594 | 2/7/2020 |
2.2.1 | 189 | 2/7/2020 |
2.2.0 | 242 | 1/27/2020 |
2.1.0 | 176 | 1/16/2020 |
2.0.0 | 171 | 1/4/2020 |
1.8.1 | 455 | 12/9/2019 |
1.8.0 | 920 | 8/30/2019 |
1.7.0 | 224 | 8/22/2019 |
1.6.0 | 262 | 7/22/2019 |
1.5.1 | 288 | 7/14/2019 |
1.5.0 | 284 | 7/11/2019 |
1.4.0 | 238 | 6/17/2019 |
1.3.0 | 275 | 6/4/2019 |
1.2.0 | 261 | 6/3/2019 |
1.1.0 | 250 | 5/28/2019 |
1.0.1 | 272 | 5/21/2019 |
1.0.0 | 461 | 4/24/2019 |
0.8.0 | 415 | 5/1/2019 |
0.7.0 | 497 | 4/22/2019 |
0.6.3 | 431 | 4/19/2019 |
0.6.2 | 445 | 4/19/2019 |
0.6.1 | 429 | 4/19/2019 |
0.6.0 | 435 | 4/19/2019 |
0.5.0 | 461 | 4/18/2019 |
0.3.0 | 572 | 4/11/2019 |
0.2.1 | 436 | 4/11/2019 |
0.2.0 | 438 | 4/11/2019 |
0.1.0 | 455 | 4/10/2019 |