[erlang-questions] My frustration with Erlang

YourSurrogateGod <>
Mon Sep 15 23:16:06 CEST 2008

I'll admit that I'm highly inexperienced when it comes to Erlang.
However, I'm surprised that there is such a barrier. From what I
understood, Erlang's way of handling messages is *very* efficient.
Just what percentage of overall processing is done by the process
that's responsible for passing messages around? As opposed to other
processes which can do actual work.

I might have a suggestion. At my job, we've used CORBA. Although not
exactly the same, in principle, it's similar. We had an issue with
lots of messages getting passed around and gumming up the works,
causing messages to get delivered late (our software had requirements
to deliver the messages within a certain amount of time). The biggest
problem was that there were lots of small messages getting sent
around. Which meant, behind the scenes, a lot of connections openned
and closed, which takes time, during which less productive processing
(on the CPU) is done. We tried 2 solutions:
1) Turn the small messages into large, long ones. That way, you just
have one massive message sent. Combine them.
2) Collect pieces of information into a buffer and then send it out
once the buffer has reached a limit.

Say you do:
  Message1 ->
  Message2 ->
  Message3 ->
  Message4 ->

But you change it to:
  LargeMessage ->

Also, I have a question. Isn't it possible to simulate multiple CPU's
with Erlang's virtual machine? If so, then wouldn't creating lots of
these virtual CPUs emulate the said problem and make it easier to see
on the horizon? etop seems like a tool that might answer this
question, too bad it crashes so often :( .

More information about the erlang-questions mailing list