A couple of years ago it was very easy to DoS attack .Net web services as the headers were added to a dictionary. Back then the hash of the key was predictable so using a bunch of machines in azure and a few days it was possible to generate enough strings that resulted in the same hash value that you then could make a fake request with a lot of headers (a few hundred is typically enough) that caused the web server to spend 100% of CPU searching and updating the header dictionary. Since I recently started doing some work using go (aka golang) I immediately started to wonder how this worked in this language.
Showing posts with label collections. Show all posts
Showing posts with label collections. Show all posts
2016-02-18
2016-01-21
Alternatives to hydrating IEnumerables
You should know that whenever you get an IEnumerable you should only enumerate it twice as some implementations don't allow you to enumerate it twice. Normally you don't get an error the second time - just no more items. But what is really the best way to handle this?
2015-11-12
Writing your own LINQ extension methods?
2015-06-11
Asynchronous enumerations - again
Almost 2 years ago I wrote about this problem with accessing data from Azure and returning it in a LINQ friendly way. Well not long ago the discussion came up again only this time it was in regard to access data in a Cassandra cluster.
2015-04-09
Proper collection implementation in .net
Most people I've worked with that needed a collection of some sort have implemented the collection by inheriting from one of the standard collection classes. This is however typically not the right thing to do since you expose more functionality than you really want in many cases.
2014-10-16
What's on tap? And stay hydrated!
Recently when I was experimenting with Spark and Scala I encountered two patterns that I liked; Tap and Hydrate. So I decided to add them to the toolbox as LINQ extensions.
2014-02-20
Hashtable vs ConcurrentDictionary
Historically I've seen the Hashtable be favored over ConcurrentDictionary with the assumption that is was more efficient allowing for lock free reads. Well they both allow lock free reads so which one is really the better option?
Subscribe to:
Posts (Atom)