[erlang-questions] count events within last XX minutes

Max Lapshin max.lapshin@REDACTED
Sun Aug 26 10:04:17 CEST 2012


On Sun, Aug 26, 2012 at 12:02 PM, Michael Truog <mjtruog@REDACTED> wrote:
> There often is a habit with quick projects to throw data in ets, since it is
> easy to access the data as global data.  This helps people coming from an
> imperative programming background.  I don't see a good reason in the email
> thread that shows that ets is the best solution,


But there is a good reason. It is performance. For example, in
erlyvideo all major statistics data are
collected not via gen_server:cal: you cannot ask process to tell its
statistics, because
it is very easy to DOS your server with such replies.

If you put stats into public ets, than collector will not be
overloaded with requests.



More information about the erlang-questions mailing list