Use anonymous table for history (like histogram reservoir)#22
Use anonymous table for history (like histogram reservoir)#22joewilliams merged 1 commit intoboundary:masterfrom basho:rdb-history-ets-name
Conversation
In multi-app environments (like riak) naming stats with a 2 tuple
is useful. It makes querying stats by app e.g. {riak_kv, _} much simpler.
History metrics use the name of the metric as the name of the data table,
this commit uses an anonympus table and stores a record in the
?HISTORY_TABLE. Since that table is already defined and created
maybe this was the original intent?
|
I think I would prefer consistent naming on all metrics. I have long tossed around the idea of metric name spacing but having wrote any code. Thoughts? |
|
I'm not sure I follow you. Are you saying don't like the idea of tuples for metrics names? I tried a bunch of experiments for name spacing (used gproc, joining atoms etc.) on some metrics prototypes I did for riak. I never really found anything more satisfying and workable than convention. Using long atoms like 'app_name_some_metric_name' was less than satisfying as it burdens the developer, and is no use when it comes to querying. I dunno. The reason for the PR is that the 'history' metric doesn't behave the same way as the other metrics with regard to naming. |
|
I'm superficially fine with tuples. I'm just saying that I've been considering name spacing but haven't put enough effort in to determine if that's the right route. FWIW I have considered using gproc to solve other issues (#20). Anyway this is all probably tangential. Merging ... |
Use anonymous table for history (like histogram reservoir)
|
Yeah, I was aware of the race, and had a pass at solving it using…a process. The code sketch from Bob looks a lot like the initial metrics work I did with Riak (process per metric, simple-one-for-one.) I'll weigh in on that thread when I can. Thanks for the merge. Will be thinking of a more general solution for name spacing. |
In multi-app environments (like riak) naming stats with a 2 tuple
is useful. It makes querying stats by app e.g. {riak_kv, _} much simpler.
History metrics use the name of the metric as the name of the data table,
this commit uses an anonympus table and stores a record in the
?HISTORY_TABLE. Since that table is already defined and created
maybe this was the original intent?