Archive

Posts Tagged ‘apache’

Porting Apache Avro into .NET Core

September 7, 2016 Leave a comment

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.

appdomainmissing

dynamicmethod

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.

AppDomain has also been solved by Michael Whelan. Here’s the blog post around how to replace AppDomain.

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.

test_passed

Cheers

 

 

Categories: .NET, net core Tags: , , , ,

LINK : fatal error LNK1123: failure during conversion to COFF

December 7, 2012 Leave a comment

Yesterday I’ve got a strange error while compiling an old C modules for Apache web server. It show this error.

image

After googling I’ve found the solution in stackoverflow.

LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt after installing VS2012 release preview

 

Yes. I think that’s the problem. The problem appear because I’ve installed Visual Studio 2012 in my machine. The solution is very simple. Just disable incremental linking.

image

After that you will see the problem solved.

 

image

 

Cheers