Tereska
Tereska

Reputation: 771

Which serialization method/function/BIF has the best performance in Erlang?

Which serialization method/function/BIF etc has best performance in Erlang? My case is:

  1. I have memcache with data i need to retrive every request.
  2. Retrevied data is binary term (when i do binary_to_term a have a List of small data)
  3. I need to do some logic on that data so i need to unserialize them.
  4. On the other system i'm setting that data in that memcache so i can change everything.

Please help me choosing the method of serialization. Only performance is my goal. Thanks!

Upvotes: 2

Views: 1071

Answers (2)

Ward Bekker
Ward Bekker

Reputation: 6366

An alternative to the Binary Erlang format might be Google protocol buffers. It's a "a language-neutral, platform-neutral, extensible way of serializing structured data for use in communications protocols, data storage, and more". The Erlang implementation that is used by Basho's Riak product is available on Github.

Upvotes: 0

Worker
Worker

Reputation: 2409

binary_to_term is your friend. This is exactly what you need.

If you want to utilize this data buy other not-erlang systems here is a list of libraries to help you: http://bert-rpc.org/

Upvotes: 5

Related Questions