aerospike / aerospike-client-csharp

Aerospike C# Client Library
70 stars 48 forks source link

Support for .NET Core #14

Closed alanprot closed 7 years ago

alanprot commented 8 years ago

Are there any plans for the aerospike client for .NET to support the new .NET Core version? This is the .NET version that will run on Windows, OSX and Linux.

BrianNichols commented 8 years ago

There are no official plans to support .NET Core. That may change after .NET Core becomes more mature. We are always open to code contributions that would make the C# client .NET Core compatible.

akatz0813 commented 8 years ago

@BrianNichols Hi Brian! I took a stab at porting it, and the one thing that needs to change is your use of thread.interrupt. If you clear that I can send up a PR.

BrianNichols commented 8 years ago

Thread.Interrupt() is used in two places.

1) Cluster.Close(). The interrupt is meant to stop the cluster tend thread's current sleep (default 1 second) between polling for node status. If the interrupt was removed. there could be a 1 second lag between close and real shutdown.

2) AsyncTimeoutQueue.Add(). The async timeout thread periodically sleeps between between checking active transactions for timeouts. The interrupt is used when the periodic sleep time needs to be changed dynamically which means the current sleep needs to end.

I'm willing to entertain alternative approaches to solve the same functional requirements.

I'm also curious as to why .NET Core doesn't support thread interrupts?

akatz0813 commented 8 years ago

@BrianNichols not sure actually. We will submit a PR in the coming days for you to look at.

akatz0813 commented 8 years ago

@BrianNichols working on this today. There's a LUA dependency issue at the moment. The only other issue is that .Net Core no longer supports binary serialization. I notice your Formatter.cs class uses it, and is then referenced by ByteUtil, Packer, and Value. Any thoughts on those?

BrianNichols commented 8 years ago

The binary formatter is used to serialize complex objects to byte arrays before sending to the server. The user also has the option to replace the default binary formatter with their own.

In order to preserve functionality, a replacement must be found that conforms to the public IFormatter interface. Also, the default binary format must be the same because some customer database objects are stored in this format and need to be derserialized when retrieving data from the server.

akatz0813 commented 8 years ago

Thanks again. @BrianNichols Any information you can provide on Hash class? You're using RIPEMD160 but there isnt an implementation of it in Core. Can I pick a different one or is there code on the server that uses this same algo?

BrianNichols commented 8 years ago

The hash algorithm is used to create all server keys. The server requires that the hash algorithm be RIPEMD160.

gpuchtel commented 8 years ago

Any update regarding this effort?

akatz0813 commented 8 years ago

Hey Glenn!!  Yeah I am working on submitting a PR for core support. 

On Sun, Oct 2, 2016 at 9:39 AM -0400, "Glenn Puchtel" notifications@github.com wrote:

Any update regarding this effort?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

gpuchtel commented 8 years ago

Brilliant! ;-) We all thank you !

arpit-nagar commented 8 years ago

Hi folks, Any updates on this ??

arpit-nagar commented 7 years ago

I found binary serializer nuget package : https://github.com/lukasz-pyrzyk/BinaryFormatter. We can test it

BrianNichols commented 7 years ago

My understanding is that akatz0813 is still working on it. The BinaryFormatter link is helpful.

arpit-nagar commented 7 years ago

Hi @akatz0813, any update on this ?

gpuchtel commented 7 years ago

Hi Andrew, any progress on this?

arpit-nagar commented 7 years ago

Hi @BrianNichols , Can you please look into it. And suggest any replacement for LUA, binarySerialization and ThreadIntrupt. Please let me know, if you need my help to migrate any module.

BrianNichols commented 7 years ago

We should know more after tomorrow's meeting.

arpit-nagar commented 7 years ago

Thanks @BrianNichols, Waiting for your positive response. 😃

BrianNichols commented 7 years ago

Still waiting. Aerospike will embark on it's own .NET core development project if the current situation does not resolve itself in January.

arpit-nagar commented 7 years ago

Thanks @BrianNichols for the updates. Hoping that Aerospike .net core library will be available soon.

BrianNichols commented 7 years ago

C# client 3.4.0 has been released which includes support for .NET Core.

http://www.aerospike.com/download/client/csharp/3.4.0

arpit-nagar commented 7 years ago

Thanks @BrianNichols. It will be helpful to migrate dependent projects.