[erlang-questions] trading systems
Thu Oct 1 22:36:54 CEST 2009
> The difficulty with Erlang is tracking the state of all the message
> queues at any given moment and just plain figuring out what's going
> on among all the different processes. I have resorted to various
> tricks apart from tracing, e.g. putting stuff into the process
> dictionary at various stages of process life for ease of fetching
> via process_info.
Are you using vanilla tracing, sequential tracing, or both? Yes, the
mailboxes are the number one headache for me.
You can always get at the message queue with
erlang:process_info(self(),messages). I have a check in most of my
servers that, when I'm debugging, will dump the message queue to disk
if it gets over a certain size. Helps me track down places that need
to be synchronized to prevent run-ahead.
>> That said, Erlang certainly takes a specific mindset to optimize.
>> Are these built with Distributed Erlang?
> Distributed Erlang indeed. Very distributed. Check the recent
> netsplit thread for some of the weirdness. Go back to the "Ultimate
> Erlang Challenge" for more.
Yeah. Since distribution modules are C, I doubt it's going to get
fixed any time soon though. :(
More information about the erlang-questions