An implementation of Apache AVRO in swift 4+

linux
codable

(Yang Liu) #1

I just completed a simple project implemented the Codable coding function of Apache Avro™ 1.8.2 Specification in Swift 4.2. at:SwiftAvroCore https://github.com/lynixliu/SwiftAvroCore. There already have a Swift protobuf, why not have one Swift Avro:)
I am still writing another project to implement the left RPC part required in Avro spec base on SwiftNIO also licence in apache2. I found that Compression framework only work for iOS and OSX. However, as server side framework, the linux version is still needed. I noticed there is already an implementation of zlib in SwiftNIO. Can I using this CNIOZlib instead of the Compression in the SwiftAvroRpc project, because I don't want to add a lot of OS checking in the code. Same thing for CNIOSHA1.
Any suggestion would be helpful.

Thanks
Yang


(Cory Benfield) #2

The NIO project doesn’t really want to be in the business of supporting zlib bindings, or SHA1 bindings: we view these as things that the wider community should solve.

For both of these cases they are quite trivial, so you’re probably best served by copying the code. You could even choose to make them full production packages!


(Yang Liu) #3

Thanks a lot Cory,
In fact, the zlib and SHA are not the core functions of Avro, I will focus on the RPC function first with NIO and leave the compression and fingerprint functions as a customised option to let the user choose the dependency library.