I have a temporary situation where beam files compiled on one node
are executed on another node. Are the beam files portable?
How close do the versions of the Erlang distributions need to be?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Beam files are portable across nodes, as they are bytecode that is interpreted by the Erlang VM, in the same way that Java works. The exception is if they’re compiled for native optimization (+native), in which case they’re obviously not very portable, other than possibly between windows machines. (edit two years later: also machines that have identical hardware and software setups, as you would possibly find in telecom uses of erlang)
Version wise, it’s obvious that you shouldn’t use features that the oldest version doesn’t support. As long as the features are supported, it should work even if the version gap is big.
Note also that some modules may have been experimental in earlier versions, and so their functions may have had slightly different results.