Monday, March 30, 2009

365 DoC - Call for Topics/Disclaimer

First off, just wanted to ask any one who's reading this to please send any and all suggestions you have re. topics/excercises/etc to use as one of the 365 days... I have a pretty decent list of stuff to do, things to work on, etc., but it will be good to have as many options as possible and as much material as I can to choose from when deciding on the mission for a given day.

Also, as far as the actual resulting code goes, I in no way guarantee that anything I produce and subsequently post about here will be a) optimized in any way, b) the most appropriate/elegant/efficient/etc solution to a given problem, c) suitable for usage in any real applications, etc. Having said that, I'll obviously do my best to post working, usable code, but at the heart of it the main purpose here is to code every day and hone my skills, etc, and so the blog posts and accompanying code are just a side effect.

Lastly, just because I'm writing code every day, doesn't mean I'll have time to post about it as well (in fact, writing code every day makes it that much more unlikely that I'll have a new post daily)... I will however do my best to try and post, at least briefly, eventually, about every day's code. It may be a few days late, and you'll probably see chunks of 3 or 4 day's worth of posts appear all at once, but I'll try to get them all in here sooner or later.

So, without further ado... on to the next day's code!

1 comment:

  1. Hey Rudy! I really love this idea.

    I've got a topic for ya: consistent hashing.

    This is a problem I'm faced with a lot these days. Say you've got a database which is overloaded and you want to implement a caching system (memcached) in front of it. You want this system to be scalable (either scale up by adding more machines, or scale down). You will need some way of determining which caching server a particular key will end up on. A naive approach is given N machines, use % N to find your server. All is fine until you realize you need to add another server. Changing N will result in a lot of cache invalidations. The other problem occurs when one of your servers go down, again changing N.

    What's needed is a consistent hashing algorithm; some way of adding and removing machines without causing a cascading failure. Looking forward to the rest of the year!

    ReplyDelete