awslabs / elasticache-cluster-config-net

A configuration object for Enyim's MemcachedClient that enables the use of Amazon ElastiCache's Auto Discovery feature
Apache License 2.0
29 stars 17 forks source link

.NET Core Compatibility #6

Open derFunk opened 7 years ago

derFunk commented 7 years ago

Hi,

are there any plans to make this lib compatible to .NET Core? If not, is there something else we can use for Cluster Discovery etc for .NET Core?

normj commented 7 years ago

I would like to be first we need the EnyimMemcached dependency to be updated to .NET Core.

derFunk commented 7 years ago

@normj It is already! https://www.nuget.org/packages/EnyimMemcachedCore/

normj commented 7 years ago

Thanks, I didn't realize that they put out a separate package for it. I'll take a look to see what it will take.

derFunk commented 7 years ago

Configuration Management will be the biggest part IMHO. See https://docs.asp.net/en/latest/fundamentals/configuration.html.

jeffbromberger commented 7 years ago

@normj any updates on being able to use ElastiCache from .NET core?

normj commented 7 years ago

I haven't had a chance yet to work on this but it is still on my radar.

bcuff commented 7 years ago

Adding my 👍 to this issue.

alanedwardes commented 7 years ago

Also very interested in this too. Is there a plan around the configuration portions of this library?

Asking because if I fork it for .NET Core, I want to make sure I go in roughly the same direction so replacing it with the official version later down the line is easier.

rknewbow commented 7 years ago

@normj Is there any update on this?

bcuff commented 7 years ago

@rknewbow I have a fork where i've ported to .NET core: https://github.com/bcuff/elasticache-cluster-config-net

It works, but it's not very pretty so I haven't made a PR.

rknewbow commented 7 years ago

@bcuff Thanks! I'll take a look. It doesn't have to be pretty if it works.

rknewbow commented 7 years ago

@bcuff Wanted to let you know that your fork is working for me. Thanks again!

bcuff commented 7 years ago

@rknewbow you're welcome. glad it was helpful.

akinzo1 commented 7 years ago

Looks like the official version isn't available atm, or is it? About to use @bcuff fork

akinzo1 commented 7 years ago

Hi @bcuff . I am using your fork. It works in a .net core web application, but it doesn't work with lambda, which is also .net core. Are you getting it to work in a lambda project by any chance?

bcuff commented 7 years ago

I've never tried it on lambda. What is the issue you're seeing?

akinzo1 commented 7 years ago

Thanks for the response @bcuff . It can't connect to my node. I get the following error message. I was on the phone with AWS, and we confirmed that the node has been configured correctly.

Error Enyim.Caching.MemcachedClient: Create PooledSocket Error Enyim.Caching.MemcachedClient: Could not init pool. Debug Enyim.Caching.MemcachedClient: Mark as dead was requested for Unspecified/mynodeurl.cache.amazonaws.com:11211 Debug Enyim.Caching.MemcachedClient: FailurePolicy.ShouldFail(): True Warning Enyim.Caching.MemcachedClient: Marking node Unspecified/mynodeurl.cache.amazonaws.com:11211 as dead Debug Enyim.Caching.MemcachedClient: Node Unspecified/mynodeurl.cache.amazonaws.com:11211 is dead. Debug Enyim.Caching.MemcachedClient: Starting the recovery timer. Debug Enyim.Caching.MemcachedClient: Timer started. Information Enyim.Caching.MemcachedClient: MemcachedInitPool-cost: 43.048ms Debug Enyim.Caching.MemcachedClient: Acquiring stream from pool. Unspecified/mynodeurl.cache.amazonaws.com:11211 Debug Enyim.Caching.MemcachedClient: Pool is dead or disposed, returning null. Unspecified/mynodeurl.cache.amazonaws.com:11211 EnyimMemcached Started.

bcuff commented 7 years ago

Hey @akinzo1,

This looks like it might not be able to connect to the nodes. Have you tried your lambda by specifying the node names explicitly rather than using this plugin? If that doesn't work either then I would suspect that there is something wrong with your security group settings. See here about configuring your lambda to access resources within a VPC.

akinzo1 commented 7 years ago

Got it. Thanks @bcuff

timtalbot commented 7 years ago

+1 for official .NET Core support, would really like to be able to use this within a C# lambda in AWS

eshenem commented 7 years ago

+1 for official .NET Core support...

amruthbinish commented 7 years ago

I have the plan to migrate projects ((Framework 4.6.2 ) to .NET core. The existing project we are using Enyim.Caching, Version=2.16.0.0 . Can any one answer ,Is Enyim.Caching support ,NET Core ? if yes which Version of .NET Core version (Core 1.0 and 2.0) ? and which .NET Standard version it's support? Thanks

bcuff commented 7 years ago

I don't think the main Enyim will ever support .NET core. There is a fork that everyone uses for .NET Core here - https://www.nuget.org/packages/EnyimMemcachedCore/

amruthbinish commented 7 years ago

Thanks !!

amruthbinish commented 7 years ago

Do you have any idea its support information about FluentAssertions.Core, Version=4.19.2.0 and FluentAssertions , Version=4.19.2.0 as well ?

bcuff commented 7 years ago

I'm not sure I understand the question. If that is a dependency of this project then it should just be a test dependency.

kaurranjeet12 commented 7 years ago

Hi bcuff,

I want to use your fork too in my lambda core project. I am new to github so not sure how to use it. Are you releasing an official version anytime soon?

Thanks, Jassi

bcuff commented 7 years ago

@kaurranjeet12 I wasn't planning on it, but since so many people seem to be asking about it maybe I should. @normj Do you want a PR for .NET Core support?

In the mean time you would just have to build my fork from source.

kaurranjeet12 commented 7 years ago

@bcuff thank you. It works fine with API running on core 1.0. but not working with my AWS lambda function. I am getting error saying netstandard1.6.1 can't be used with core 1.0

bcuff commented 7 years ago

@kaurranjeet12 You could try downgrading to netstandard 1.6.0 or 1.5 to get it working on lambda. It looks like AWS Lambda only supports the 1.0 runtime at the moment. Hopefully they'll add support for 1.1 and 2.0 soon.

normj commented 7 years ago

@kaurranjeet12 The earliest version of EnyimMemcachedCore depends on NETStandard.Library 1.6.1 which is part of .NET Core 1.1 which is why it doesn't work in Lambda. The Lambda environment doesn't have .NET Core 1.1 bits on it.

kaurranjeet12 commented 7 years ago

Yes, I kinda of guessed it. I tried downgrading but since EnyimMemcashedCore depends on NetStandard 1.6.1 it was not working. Just wanted the confirmation from you guys. I guess have to wait until lambda supports Core 1.1. Thank you Brandon and Norm.

On Thu, Aug 24, 2017 at 11:10 AM, Norm Johanson notifications@github.com wrote:

@kaurranjeet12 https://github.com/kaurranjeet12 The earliest version of EnyimMemcachedCore depends on NETStandard.Library 1.6.1 which is part of .NET Core 1.1 which is why it doesn't work in Lambda. The Lambda environment doesn't have .NET Core 1.1 bits on it.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/awslabs/elasticache-cluster-config-net/issues/6#issuecomment-324713607, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ-zpGJmzWZq7AEBAj3Od56X1TCU46mpks5sbbylgaJpZM4KU8RE .

rajkumars82 commented 6 years ago

@bcuff support for .NET Core 2.1 with EnyimMemcachedCore 2.1.8?

bcuff commented 6 years ago

Feel free to use my fork - https://github.com/bcuff/elasticache-cluster-config-net it supports .net core however I do not feel like it is good enough to publish a package so I haven't.

Kaelum commented 5 years ago

For anyone interested, I ported this project and enyim/EnyimMemcached to .NET Standard 2.0 libraries in the Kaelum/EnyimMemcachedStandard project. I can't support the code long term, but you are free to use it under the Apache 2.0 license.

UPDATE 08/29/2019: Due to Windows library refences in the original library, this library only works on Windows. The Windows library references would need to be converted to .NET Standard libraries in order for this to work on Linux or Mac.

Kaelum commented 5 years ago

It appears that someone else has forked a branch as well, and it is available at:

https://github.com/kt81/elasticache-cluster-config-net-core/

jbright commented 4 years ago

@normj happy holidays! Checking in on this request. I'm using EnyimMemcachedCore which seems to work fine for a single node, but I'd love to be using an AWS provided library and move to a cluster. Thanks!