The Case For Erlang For Web Applications
This is the topic I am working on for a paper for my final-year project. The problem with the topic is that it is seriously general, since it can cover so much, like performance and scalability concerns, development concerns, etc. So, while in the midst of preparing to debate this question, I have sat and asked myself "Is there a case to use Erlang for web applications?"
So I am focusing on two areas: "How well can a single Erlang node (the interpreter + the hardware) handle a significant load?" I will admit that I never deployed any web application that is used by more than at most, 10-20 people. There are a lot of concerns that I might be overlooking when considering scalability and performance aspects, so I might be jumping in this naively. However, I am a bit inspired by this one point: "If Erlang can perform well on a single piece of hardware, then can this make scalability potentially easier?" This reminds me of the things I have been reading about Ruby on Rails and the scalability problems that people have been having with that, even though I keep hearing "Well, if you are getting a a lot more hits than your system can handle, then I think you can afford more hardware." Potentially, but it seems very convenient to say when you have to actually deploy a system because your current server setup cannot handle the load.
So, bandwidth excluded, what if my small setup of Rails servers cannot take a current spike because of some Slashdot effect occurring? Or what if I have my Web2.0ish application, dinky and small as it is, become the talk on people's lips, causing a spike in load? (I think that would be wonderful, though ;) )
The fact is, I don't know what would happen. But, at the same time, I am not denying the efficacy of well-designed setups that are running Rails applications. But I am assuming something: if they say that Erlang can potentially handle a lot of load, very well, and if it was designed with this in mind, with a very practical and complex application in mind, can it not help when running my not-so-complicated, dinky little web site? Okay, I might get 10 hits on it every week, but even if I only getting 10 hits, Erlang is not really a sledgehammer to drive in a finish nail. That's where Java would come in.
The fact is, with a little effort, one will find doing web development in Erlang to be easy. Okay, it is not up to the level of Rails in terms of features. However, even regardless of the performance and scalability features that are in Erlang, it is showing me, incrementally, to be a very simple but very powerful language framework to get things done.
I said in an earlier post that I am finding it easier to debug certain things because there is no indeterminacy in variables. Erlang is also dynamically typed, so it, initially was easy to pick and learn, and apply my existing understanding of recursion and of higher-order functions to this language.
So, what I am trying to stress here is that, I think, for what I know, as compared to what other people have been saying, I think that using Erlang, with a platform that has been proven for the types of things that it was designed to do, along with its ease of programming, can be said to be a good platform for web application development. It might not be *perfect* (like the things people complain about in terms of string handling), but these things do not outweigh the positives.
This, is, of course, all a crazy assumption, still. I still have yet to get my tiny web app running to actually run tests on it.
The thing that I am worried about though is how to say all the stuff I said in the typical dry academic tone that I will be compelled to use for my final paper. Ugh. But one reason I wrote this is to figure out how to do just that. The thing also is that all the assumptions I have made here are still willingly open to skepticism, and I open and willing to challenge those assumptions.
I just hope that anyone who is reading this might not immediately jump to the conclusion that I am nuts or I don't know what I am doing; my daily blog readings on Reddit and other places give off this sense, particularly if the object of debate is an article that seems too sure of itself.
So I am focusing on two areas: "How well can a single Erlang node (the interpreter + the hardware) handle a significant load?" I will admit that I never deployed any web application that is used by more than at most, 10-20 people. There are a lot of concerns that I might be overlooking when considering scalability and performance aspects, so I might be jumping in this naively. However, I am a bit inspired by this one point: "If Erlang can perform well on a single piece of hardware, then can this make scalability potentially easier?" This reminds me of the things I have been reading about Ruby on Rails and the scalability problems that people have been having with that, even though I keep hearing "Well, if you are getting a a lot more hits than your system can handle, then I think you can afford more hardware." Potentially, but it seems very convenient to say when you have to actually deploy a system because your current server setup cannot handle the load.
So, bandwidth excluded, what if my small setup of Rails servers cannot take a current spike because of some Slashdot effect occurring? Or what if I have my Web2.0ish application, dinky and small as it is, become the talk on people's lips, causing a spike in load? (I think that would be wonderful, though ;) )
The fact is, I don't know what would happen. But, at the same time, I am not denying the efficacy of well-designed setups that are running Rails applications. But I am assuming something: if they say that Erlang can potentially handle a lot of load, very well, and if it was designed with this in mind, with a very practical and complex application in mind, can it not help when running my not-so-complicated, dinky little web site? Okay, I might get 10 hits on it every week, but even if I only getting 10 hits, Erlang is not really a sledgehammer to drive in a finish nail. That's where Java would come in.
The fact is, with a little effort, one will find doing web development in Erlang to be easy. Okay, it is not up to the level of Rails in terms of features. However, even regardless of the performance and scalability features that are in Erlang, it is showing me, incrementally, to be a very simple but very powerful language framework to get things done.
I said in an earlier post that I am finding it easier to debug certain things because there is no indeterminacy in variables. Erlang is also dynamically typed, so it, initially was easy to pick and learn, and apply my existing understanding of recursion and of higher-order functions to this language.
So, what I am trying to stress here is that, I think, for what I know, as compared to what other people have been saying, I think that using Erlang, with a platform that has been proven for the types of things that it was designed to do, along with its ease of programming, can be said to be a good platform for web application development. It might not be *perfect* (like the things people complain about in terms of string handling), but these things do not outweigh the positives.
This, is, of course, all a crazy assumption, still. I still have yet to get my tiny web app running to actually run tests on it.
The thing that I am worried about though is how to say all the stuff I said in the typical dry academic tone that I will be compelled to use for my final paper. Ugh. But one reason I wrote this is to figure out how to do just that. The thing also is that all the assumptions I have made here are still willingly open to skepticism, and I open and willing to challenge those assumptions.
I just hope that anyone who is reading this might not immediately jump to the conclusion that I am nuts or I don't know what I am doing; my daily blog readings on Reddit and other places give off this sense, particularly if the object of debate is an article that seems too sure of itself.
1 Comments:
This is great info to know.
Post a Comment
<< Home