Archive for May, 2010

Things I always forget about resolving Erlang nodes on localhost

Switching back and forth between programming languages and development environments gets easier over time. There is one thing that I’m constantly forgetting as switch back and forth between Java and Erlang however. In order to work with distributed Erlang nodes on OSX, you need an entry in your /etc/hosts file resolving to your (short) hostname (because the OS seems incapable of resolving its shortname properly). The problem with doing this is it wreaks all kinds of havoc with java applications, so you need to remember to switch it back again when you’re jumping between developments environments. If you have both kinds of VM running at the same time in your dev environment then it’s a bit of a challenge to keep everything running smoothly. My solution (thus far) has been to use my extra laptop and run the java and erlang apps separately for dev/testing. This works fine as the target environment is generally linux so this OSX nonsense goes away once you’ve actually deployed somewhere.

Still, I forget this point regularly when flitting between my day job and personal projects. Hopefully having written it down will help me to remember.


Leave a comment