Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between StackExchange.Redis and StackExchange.Redis.StrongName?

While I was following Azure documentation for how to use Redis Cache in Azure Portal I noticed this note:

If you prefer to use a strong-named version of the StackExchange.Redis client library, choose StackExchange.Redis.StrongName; otherwise choose StackExchange.Redis.

What is the strong-named ? and what is the proc and cons ? How to decide if I need it or not in my application ?

like image 697
Mohamed Farrag Avatar asked Feb 18 '15 13:02

Mohamed Farrag


People also ask

What is StackExchange redis?

StackExchange. Redis is a high performance general purpose redis client for . NET languages (C#, etc.). It is the logical successor to BookSleeve, and is the client developed-by (and used-by) Stack Exchange for busy sites like Stack Overflow.

Is StackExchange redis thread safe?

redis is fully thread safe; the expected usage is that a single multiplexer is reused between concurrent requests etc - very parallel. Two concurrent callers do not block each other: the two requests are pipelined and the results made available to each when the come back.

What is redis used for stackoverflow?

Redis supports data expiration natively, allowing things to fall out of the cache natively, but in the event of prompt updates being necessary, redis pub/sub is used to broadcast a "forget about this key" message to all web-servers.


1 Answers

Do you need a strongly named Redis library? In all likelihood, especially if you never even encountered this term, the answer is no. But read on.

What is strongly named?

  • it's a .NET specific thing
  • you can choose to sign your assembly with a cryptographic key
  • this makes it possible to verify that you are actually loading/running something you expect to load/run
  • the "strong name" includes the cryptographic signature together with the the usual name, version and things like that.

Do you ever need strong names?

  • probably not unless you have specific reasons. Some of these may be:
  • historic (we used to sign our assemblies and why change now)
  • corporate policies
  • special circumstances such as something else you are using requires strong names (it used to be a requirement to have strong name if you wanted to add something to the GAC)
  • possibly security considerations

Is it a good idea to sign your assemblies?

  • there are a lot of divided opinions
  • very often strong names are a pain in so many ways with questionable benefits
  • it has been a trend lately to not use strong names unless you really must

Do you need a strongly named Redis library?

  • unless you decide or have to sign your own application which uses Redis library you don't
  • the strong names version of Redis library is identical to the other one
  • it exists solely for the reason to make lives of those who need to use strong names easier
like image 75
Philip P. Avatar answered Oct 10 '22 21:10

Philip P.