[erlang-questions] Erlang beginner questions
Wed Apr 13 18:46:38 CEST 2011
On Apr 13, 2011, at 12:26 PM, Mode7James wrote:
> Speaking of load bearing, is there a way for Erlang to read the cpu load of
> a machine or machine that a node is run on?
Take a look at the cpu_sup module.
> Also, regarding linked-in drivers: I hear that if they crash, then it
> brings the entire VM down. Is this just in case there is a bad piece of
> code? If they are this unstable, then why are they used in production
> environments? For something like an MMO server, I'll want extremely low
> latency between the Erlang side and my math & physics side - but I also need
> it to be stable so if something messes up or crashes, it doesn't bring the
> entire system down.
Yes, a linked in driver runs in your VM's process space, so if it crashes it can bring the entire VM down.
They're not inherently unstable, its just that you're running (possibly buggy) native code inside your VM
I would suggest you implement your logic in Erlang first, and only if it turns out you need better performance, think of native code.
In many cases you won't need to. Also, in many cases tweaking the algorithm will bring you a whole lot more performance gains than going native.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions