All Projects → AdrianStrugala → AvroConvert

AdrianStrugala / AvroConvert

Licence: other
Apache Avro serializer for .NET

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to AvroConvert

avro-serde-php
Avro Serialisation/Deserialisation (SerDe) library for PHP 7.3+ & 8.0 with a Symfony Serializer integration
Stars: ✭ 43 (-2.27%)
Mutual labels:  serialization, avro, deserialization, avro-format
Noproto
Flexible, Fast & Compact Serialization with RPC
Stars: ✭ 138 (+213.64%)
Mutual labels:  serialization, avro, deserialization
Restfulsense
A RESTFul operations client that serializes responses and throws meaningful exceptions for >= 400 status codes.
Stars: ✭ 28 (-36.36%)
Mutual labels:  serialization, deserialization, netcore
Azos
A to Z Sky Operating System / Microservice Chassis Framework
Stars: ✭ 137 (+211.36%)
Mutual labels:  serialization, netcore, netstandard
avrow
Avrow is a pure Rust implementation of the avro specification https://avro.apache.org/docs/current/spec.html with Serde support.
Stars: ✭ 27 (-38.64%)
Mutual labels:  serialization, avro, deserialization
VSerializer
A library to serialize and deserialize objects with minimum memory usage.
Stars: ✭ 25 (-43.18%)
Mutual labels:  serialization, deserialization
dataclasses-jsonschema
JSON schema generation from dataclasses
Stars: ✭ 145 (+229.55%)
Mutual labels:  serialization, deserialization
Decor.NET
A simple way to decorate a class with additional functionality using attributes.
Stars: ✭ 29 (-34.09%)
Mutual labels:  netcore, netstandard
tyson
A TypeScript serialization/deserialization library to convert objects to/from JSON
Stars: ✭ 25 (-43.18%)
Mutual labels:  serialization, deserialization
DjvuNet
DjvuNet is a cross platform fully managed .NET library for working with Djvu documents which can run on Linux, macOS and Windows. Library has been written in C# and targets .NET Core v3.0 and .NET Standard v2.1 or later. We intend to provide DjVu document processing capabilities on par with DjVuLibre reference library (or even better).
Stars: ✭ 54 (+22.73%)
Mutual labels:  netcore, netstandard
kafka-protobuf-serde
Serializer/Deserializer for Kafka to serialize/deserialize Protocol Buffers messages
Stars: ✭ 52 (+18.18%)
Mutual labels:  serialization, deserialization
avro-parser-haskell
Language definition and parser for AVRO (.avdl) files.
Stars: ✭ 14 (-68.18%)
Mutual labels:  avro, avro-format
CodableWrapper
@codec("encoder", "decoder") var cool: Bool = true
Stars: ✭ 143 (+225%)
Mutual labels:  serialization, deserialization
Portable-WebDAV-Library
Moved to codeberg.org - https://codeberg.org/DecaTec/Portable-WebDAV-Library - The Portable WebDAV Library is a strongly typed, async WebDAV client library which is fully compliant to RFC 4918, RFC 4331 and "Additional WebDAV Collection Properties". It is implemented as .NETStandard 1.1 library in oder to be used on any platform supporting .NETS…
Stars: ✭ 45 (+2.27%)
Mutual labels:  netcore, netstandard
AmiClient
Modern .NET Standard client for accessing the Asterisk AMI protocol using async/await and Reactive Extensions (Rx)
Stars: ✭ 30 (-31.82%)
Mutual labels:  netcore, netstandard
kafka-serialization
Lego bricks to build Apache Kafka serializers and deserializers
Stars: ✭ 122 (+177.27%)
Mutual labels:  serialization, avro
AlphaVantage.Net
.Net client library for Alpha Vantage API
Stars: ✭ 65 (+47.73%)
Mutual labels:  netcore, netstandard
dotnet
.NET Community Toolkit is a collection of helpers and APIs that work for all .NET developers and are agnostic of any specific UI platform. The toolkit is maintained and published by Microsoft, and part of the .NET Foundation.
Stars: ✭ 865 (+1865.91%)
Mutual labels:  netcore, netstandard
ActiveLogin.Identity
Parsing and validation of Swedish identities such as Personal Identity Number (svenskt personnummer) in .NET.
Stars: ✭ 51 (+15.91%)
Mutual labels:  netcore, netstandard
hapic
Input/Output/Error management for your python controllers with Swagger doc generation
Stars: ✭ 18 (-59.09%)
Mutual labels:  serialization, deserialization

SolTechnology-logo

AvroConvert

Rapid Avro serializer for C# .NET

Docs

Avro format combines readability of JSON and compression of binary data serialization.

Introduction article

Apache Wiki

General information

Documentation

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

Features

AvroConvert Apache.Avro Newtonsoft.Json
Rapid serialization ✔️ ✔️ ✔️
Easy to use ✔️ ✔️
Built-in compression ✔️ ✔️
Low memory allocation ✔️ ✔️ ✔️
Support for C# data structures: Dictionary, List, DateTime... ✔️ ✔️
Support for compression codecs Deflate
Snappy
GZip
Brotli
Deflate
Readable schema of data structure ✔️ ✔️ ✔️
Data is encrypted ✔️ ✔️

Full Changelog

Benchmark

Results of BenchmarkDotNet:

Converter Request Time [ms] Allocated Memory [MB] Compressed Size [kB]
Json 672.3 52.23 6044
Avro 384.7 76.58 2623
Json_Gzip 264.1 88.32 514
Avro_Gzip 181.2 75.05 104
Json_Brotli 222.5 86.15 31
Avro_Brotli 193.5 74.75 31

Article describing Avro format specification and benchmark methodology: https://www.c-sharpcorner.com/blogs/avro-rest-api-as-the-evolution-of-json-based-communication-between-mic

Conclusion:
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);

  • Deserialization
CustomClass deserializedObject = AvroConvert.Deserialize<CustomClass>(byte[] avroObject);

  • Read schema from Avro object
string schemaInJsonFormat = AvroConvert.GetSchema(byte[] avroObject)

  • 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
    }
}
  • Generation of C# models from Avro file or schema
  string resultModel = AvroConvert.GenerateModel(_avroBytes);

Full Documentation

Support

If you find my work useful, you can support it :)

Buy Me A Coffee

Related packages

Nuget - Library containing functionalities, which enable communication between microservices via Http using Avro data format

Nuget - 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].