UPDATE: the negativity about Erlang in this post no longer reflects my current opinion. Thank you Justin Sheehy for making webmachine which has handily carried me across my hurdles with implementing RESTful Web Services in Erlang.
The death of useful insight from a new idea encountered or approach studied begins a time of denial for me and then a time of mourning. Erlang stopped providing me with useful insight months ago, yet I doggedly pursued it hoping I would experience more of the mind-opening joy I had when I first encountered it. This has not happened. Worse than that I feel a seething resentment for Erlang now since it continually pops up in my head as a possible solution to things I am ill-equipped to solve using it. None of this is a fault of Erlang, but rather a reality of my inexperience with Functional Programming and the lack of modules in Erlang for structuring and developing RESTful Web Services the way I would like (UPDATE: WebMachine looks like it may invalidate this post, stay tuned).
Certainly Yaws and mochiweb let you build RESTful Web Services, but I find myself fumbling with them rather than solving my real domain problems. I am not sure if this is a side-effect of transparent data structures in Erlang vs objects in Java or what. I do know that I find it easier to grow a solution gradually with Restlet (a Java REST framework). Nothing inherently prevents Erlang from providing developers with a good framework for building RESTful Web Services. I believe Erlang is inherently better suited to the purpose at a runtime level than Java, but Yaws and mochiweb do not fit my way of thinking.
It would be very interesting to see OTP-style behaviours for Resources and Routers (and the various other actors of the Restlet framework) which could be implemented simply in Erlang. Much of the design is already there in Restlet. I simply do not have the time or expertise to develop it in Erlang. I imagine that much of the high-level architecture of Restlet could be reproduced in Erlang with ease by an experienced Erlang developer.
So I am now mourning the loss of useful insight from Erlang and the likely impossibility of ever using it productively beyond desktop automation. Alas poor Erlang, I knew ye well!
10 comments:
I don't mean to be an asshole or troll but you need to toughen up a little. What you are complaining about is a lack of experience and there's only one way to get it. The wrong thing to do is to fall back on familiar tools not because they are the best fit for the job but because they are the most familiar.
I've been facing a similar decision but have decided to stick it out and get it done the right way. You may be interested to know that there is a great REST framework built on top of Mochiweb called WebMachine that is likely the piece of the puzzle you are missing.
To be honest it sounds like you found a hard problem and backed out before anything came of it. If you really feel this way then it's because of your own inability to follow through and tackle problems that you aren't used to.
Erlang is an awesome language for RESTful services and web APIs. Maybe you should do some research and look at the open source projects out there that are already using it for such.
Suggest that you take a look at Steve Vinoski's blog who has written quite a lot on the topic of Erlang and REST.
@CDub: WebMachine looks fantastic. I will dive back in and give it a try. I was more dissuaded from continuing this by the incredibly hostile response I got when I suggested using Erlang at work. For my homebrew projects WebMachine looks like an ideal candidate.
@mikaela: Thank you for the link. I have just read a couple of articles and they are great! I have a lot of respect for Steve. He has a huge amount of experience with both RPC and REST and always contributes thoughtfully to the discussion. A combination of his deep insight into the REST architectural style combined with a framework like WebMachine to express a solution promises to be a very good experience. Well I had better get back to learning WebMachine. Thanks for dropping by :)
You're quite welcome, Alain.
Good Article!
Regards
SBL Software Development Solutions
http://www.sblsoftware.com
superb article dude
IMPORTANT SOFTWARE DOWNLOAD
CDub told you to toughen up, and Nick told you that if these were your honest feelings, you were demonstrating an inability to follow through.
Your reaction to Nick was bizarre. Also, if it's the Nick I think it is, studying the open source Erlang projects that he has done creating RESTful services and web APIs are going to be vital to your productivity.
Of course, this post was months ago, and you've probably realized all this by now:)
@jamaal sibley:
Although it is a little late coming: Thank you for your comments. I censored my ignorant responses that you pointed out a while ago now after reading your comment.
Post a Comment