Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

whereas in Erlang (IIRC) ETS cause some issues with GC

There isn't any at all for ETS:

   Note that there is no automatic garbage collection for
   tables. Even if there are no references to a table from
   any process, it will not automatically be destroyed
   unless the owner process terminates. It can be destroyed
   explicitly by using delete/1. The default owner is the
   process that created the table. Table ownership can be
   transferred at process termination by using the heir
   option or explicitly by calling give_away/3.
Of course, you'll seldom be using ETS directly, but rather through Mnesia.

From: http://www.erlang.org/doc/man/ets.html



I've built dozens of Erlang apps and used ETS in every one. I've used Mnesia once, and it was not a pleasant experience. Most Erlang dev teams use ETS directly. It's possible to use Mnesia successfully but I see it far less often than ETS these days.


You will be using ETS directly way more often than you will be using Mnesia in many Erlang systems, so I wouldn't really say you'll use it rarely.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: