We are from Geekseat has been used Avro extensively. Currently our project needs to be done on .NET core so .As i post previously i’m working on porting Apache Avro into .NET Core. Basically there are two Avro library available. One from Apache and one from Microsoft. I want to port both of library as that has been used a lot in big data application.
Let’s get back to Apache Avro.
There are two main problem that made headache when porting this one. One is AppDomain and IL Generator / Dynamic method is missing.
Both problem exists in the ObjectCreator.cs. This class is responsible for dynamically creating object on the fly based on the avro type.
ILGenerator has been known as the fastest object creator by Ayende Research. So i think this can be replaced with Expression tree but not sure how. Then i remember that Zeddy Iskandar has been create a forum post on how to create object with expression tree with constructor. You can see the method from this forum post. Here’s the complete source code of the ctor delegate.
One down, one more to go.
I use the polyfill approach from that blog post. You can see that in action here.
After fixing both problem i’ve got 382 test passed and 6 failing. I’m quite happy with this result, declare victory and push that to repository. Thanks Zeddy and Michael.