In this post, let’s try and understand what Consistent Hashing is, when it is needed and how to implement it in Clojure. Consistent hashing has many use cases. I have chosen the use case of distributed caching for this post. One other common use case is for sharding in databases.
Almost all applications today use some kind of caching. Caches reduce the number of requests directly served by your database and improve latency. You start with one cache node sitting over your database. On read paths, you check if the data is available on the cache node, if not, you…
In the last two parts, we customized some defaults of Emacs. We also installed two packages and customized their default behavior. In this part, we will organize our configuration and make it portable using use-package.
After the first two parts, our
init.el looks like this:
What problems do you see in this configuration? There is one major and one minor problem (and there must be many which I have missed).
This is the second part of a series on “Configuring Emacs from Scratch”.
You can read the first part here.
In the last part, we customized some defaults of Emacs. But Emacs is not at all limited to customizing the defaults. Emacs has a huge eco-system of external packages that you can install. The default package manager for Emacs is called “package”. Package can fetch packages from multiple sources. Elpa (Emacs Lisp Package Archive) is the source that it uses by default. But users usually add Melpa and Marmalade to their list of package sources.
In this part, we will…
I have been using Emacs for 6 years now and for the last couple of years, Emacs has been my primary tool for writing Clojure at Helpshift Inc. Over the years, I have realized the value of Emacs. It has made me productive at work and org-mode has certainly made me more disciplined. The idea of having an editor which you can customize as it runs is itself amazing! :)
Unfortunately, I have also realized that getting on-boarded on Emacs is not an easy path. Many people try it for a few days and go back to their IDEs. So…
Software Artisan at Helpshift