Today I needed to work from a coffee shop since my cable modem went on the fritz last night.  I use virtual box to virtualize a Kazoo cluster on my laptop with 10 linux servers.  I kicked around a complicated NAT’ing scheme for port range forwarding, but I wanted to keep things simple at the networking level at the early stage in the game of the testing some new feature development.  So, instead of changing 10 static IP configurations, I brought my own router.

 

IMG_3908

IMG_3909

I work on a product called Kazoo.  Kazoo is written in erlang.  Lately at work, those of us on the Platform team have been having a conversation about a language feature known as ETS (erlang term storage). The end of the conversation pretty much always concludes that

Erlang ETS == Magical

I have been down the road of finding a magical language feature (not in erlang) for a specific use case, only later to find out that when I switch the conditions of the use case, it totally and completely falls apart.  With that in mind, this weekend I did a little reading / researching / googling to find the source of the magic.

Thanks for Erlang Solutions for posting the Videos from the latest Erlang Factory in Sweden, had a talk specifically about benchmarking ETS.  This was really awesome, and anyone who cares about ETS should watch it.

tl;dw – ETS is MAGIC, however, if you are trying to scale a product using ETS, be VERY aware of the number of physical chips on the server vs. the number of cores on those chips.  There are runtime flags to pin process schedulers to individual cores, but there are tradeoffs.

Screen Shot 2013-12-09 at 10.19.30 AM

 

 

 

 

grace-hoppers-107th-birthday-5447077240766464.4-hp220px-Commodore_Grace_M._Hopper,_USN_(covered)

Thanks for the awesome doodle logo Google!  Anyone who does not know the scope to which Grace Hopper affected all of our lives, should read her wikipedia page.  Ending with the rank of Navy Rear Admiral, she coined the phrase “debugging” by getting a moth to be removed from one of the early computers (they liked the circuits apparently!).  She invented the compiler, and argued (to much resistance at time) that programs should use english language to be more expressive.  Any CompSci friends out there pining for writing in binary or hexadecimal still?  It was cool also to read in that article that she tried to influence the DOD to move away from large centralized systems and use smaller distributed systems.  Grace Hopper, we salute you and all your contributions to humanity!

 

http://www.h-online.com/open/news/item/Rootkit-infects-Linux-web-servers-1753969.html

All you linux sysadmin types, be on the lookout for this tasty treat.  After having done damage control from a rootkit attack in the past, I try to stay as up to date as possible on these types of attacks.

Your welcome 🙂

Reached the point this evening where I got sick of editing /etc/hosts when doing local development on my MacBookPro.

I have learned enough lately configuring and installing BIND9, that I mustered up the courage to get it running on 127.0.0.1 (theres no place like home).

Using this new fangled Google machine, I drummed up this tasty post.  OSX comes packaged with BIND (named is the daemon name), but it is disabled.  This post gets you setup and running.

The important thing I have to add to this topic, is that I could not for the life of me figure out what I added my local zone file called mysite.local (versus mysite.com for a production BIND DNS server) it would not respond to queries.  Back to the google.

I search for the phrase “osx bind cant ping local domain”, and wouldn’t you know it, the Google machine came through again.  I found this post dating back from 2002 that solved the problem.  Seeing the date of 2002, I was skeptical since BIND has had some many advances since then, and of course OSX is a totally different beast, but I was desperate.  Low and behold they were correct though.  It appears that Bonjour will snag queries for domains with TLD of “.local”, thereby cutting BIND completely out of the deal.

I am sure that there is some configuration that could get one past this, but I am fine just moving my local development domains to .net and calling it a job well done.

Thanks Google machine, what in the world would I do without you! (No seriously, I realized the other day, that I would be 1/100th the programmer I am today, not to mention the productivity and speed, without modern search engines like Google).

Needed to add a bunch of files to my (mercurial) hg repo and realized that a command I use all the time in subversion (svn) repos.

hg st | grep ? | sed ‘s/? *//’ | xargs hg add

Break it down for ya.  Remember the “|” unix character takes the results of stdout and pipes that as the inputs to the next chain in the command.  For the purposes of explanation, assume I were to create a file called testfile.js in the “js” directory in my repo directory.

1. hg st – this displays the files in an hg repo that are currently not versioned in the repo.  Results are sent to stdout.

Results:

? js/testfile.js

2. grep ? – This looks at each line and returns it valid if there is a ? in the string.

Results:

? js/testfile.js

3. sed ‘s/? *//’ – sed is an awesome text tool for performing operations on text,  in this case a executing a regex on each line that removes that ? from the text.  This is important because the next command does not recognize “?” as in the filename.

Results:

js/testfile.js

4. xargs hg add – Finally, we execute the command on the sanitized string.

A js/testfile.js

Enjoy!