16

I am considering Erlang as a potential for my upcoming project. I need a "Highly scalable, highly reliable" (duh, what project doesn't?) web server to accept HTTP requests, but not really serve up HTML. We have thousands of distributed clients (other systems, not users) that will be submitting binary data to central cluster of servers for offline processing. Responses would be very short, success, fail, error code, minimal data. We want to use HTTP since it is our best chance of traversing firewalls.

Given this limited information about the project, can you provide any weaknesses that might pop up using a technology like Erlang? For instance, I understand Erlang's text processing capabilities might leave something to be desired.

You comments are appreciated. Thanks.

Aaron Rustad
  • 2,016
  • 17
  • 25

5 Answers5

10

This sounds like a perfect candidate for a language like Erlang. The scaling properties of the language are very good, but if you're worried about the data processing abilities, you shouldn't be. It's a very powerful language, with many libraries available for developers. It's an old language, and it's been heavily used/tested in the past, so everything you want to do has probably already been done to some degree.

Alex Fort
  • 18,459
  • 5
  • 42
  • 51
5

Make sure you use erlang version R11B5 or newer! Earlier versions of erlang did not provide the ability to timeout tcp sends. This results in stalled or malicious clients being able to execute a DoS attack on your application by refusing to recv data you send them, thus locking up the sending process.

See issue OTP-6684 from R11B5's release notes.

bmdhacks
  • 15,841
  • 8
  • 34
  • 55
5

With Erlang the scalability and reliability is there but from your project definition you don't outline what type of text processing you will need.

I think Erlang's main limitation might be finding experienced developers in your area. Do some research on the availability of Erlang architects and coders.

If you are going to teach yourself or have your developers learn it on the job keep in mind that it is a very different way of coding and that while the core documentation is good a lot of people do wish there were more examples. Of course the very active community easily makes up for that.

kevink
  • 1,958
  • 3
  • 14
  • 14
  • 2017 and this is still pretty much on the mark. Erlang is an excellent choice for the sort of project described in the OP's question, but the availability of primary Erlang programmers *who are not already employed* is the real limiting factor. – zxq9 Sep 12 '17 at 13:20
3

I understand Erlang's text processing capabilities might leave something to be desired.

The starling project already provides basic unicode support and there is a EEP (Erlang Enhancement Proposal) currently in draft, but going in to bring it into the mainstream of Erlang/OTP support.

legoscia
  • 39,593
  • 22
  • 116
  • 167
Gordon Guthrie
  • 6,252
  • 2
  • 27
  • 52
  • 1
    The link leads to a 'not found' page; a version of starling on google code also seems dead, however, there is a more active version here: https://github.com/hypernumbers/starling – Oliver Mason May 11 '11 at 23:34
  • Yeah, Hasan wrote it when he worked at Hypernumbers and since he left I have brought it back into our github environment. The Hypernumbers version is the 'official' one now. – Gordon Guthrie May 29 '11 at 19:20
1

I encountered some problems with Redis read performance from Erlang. Here is my question. I tend to think the reason is Erlang-written module, which has troubles while processing tons of strings during communication with Redis.

Community
  • 1
  • 1
Vitaly Chirkov
  • 1,692
  • 3
  • 17
  • 33
  • 1
    I managed to improve read performance by using another driver. C-written drivers and its wrappers are still faster, but I can deal with perf that Erlang offers. – Vitaly Chirkov Mar 22 '14 at 15:22