INTRO
As you may know, Erlang has its own binary encoding BERT inside its virtual machine, called BEAM.
For enterprise RPC usually, you use protobuf or MessagePack or Thrift or ASN.1 binary parser generators.
However, as you may know Erlang is not so fast in any tasks except moving binaries between sockets.
So we at Synrc usually use native Erlang BERT encoding on all clients with zero encoding/decoding on server side.
The encoders/decoders could be of two types:
strict (with checking the model for particular type signature with Sums and Products)
and general which encode/decode anything that can be translated into correct encoding.
For example, JavaScript encode/decode generator presented in this repo is just like that
(it doesn’t check types and constants, given in Erlang HRL files).
However, Swift version has the ability to check encoded/decoded term to comply the Erlang Type Specification.