Like many others, I'm intrigued by the promise of Erlang but my development efforts to date have been limited to small script-like examples and the odd server from the Programming Erlang book. I wanted to develop something much richer on my own and perhaps even something of value. Since I'm already the author of a high-performance SmugMug client for Python I figured writing a similar library would be a proper way to compare and contrast the two languages and approaches to concurrency.

So, without further ado, I present erlsmug, an Erlang client for the SmugMug API. The project is a whopping day old but I can already log in and query my albums and images. I'm excited to see some benchmarks between my Python and Erlang clients — the Python client makes use of PycURL which is concurrent, rockstar fast and easy to use.

Some issues I've already encountered:

  • The inets application seems to hang if I try an https url.
  • Copying examples of OTP applications is harder than one would think because each is just a little different.
  • How come the .app doesn't automatically start the applications declared as dependencies? It looks like most of the examples I looked at had a start/0 helper function which started the appropriate applications. Is this best practice?
  • I'm still a little confused about the State maintained for the server. I'm using it to keep the session id after logging into SmugMug but what if multiple credential could be used simultaneously? I'm sure there's something I'm just not getting.

That's it for now. I'm going to have to talk to Martin to clear up some questions and learn more about Erlware.

Categories: development 
Tags: erlang  python  smugmug 
comments powered by Disqus