Skip to content

Use anonymous table for history (like histogram reservoir)#22

Merged
joewilliams merged 1 commit intoboundary:masterfrom
basho:rdb-history-ets-name
May 27, 2012
Merged

Use anonymous table for history (like histogram reservoir)#22
joewilliams merged 1 commit intoboundary:masterfrom
basho:rdb-history-ets-name

Conversation

@russelldb
Copy link
Contributor

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?

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?
@joewilliams
Copy link
Contributor

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?

@russelldb
Copy link
Contributor Author

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.

@joewilliams
Copy link
Contributor

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 ...

joewilliams added a commit that referenced this pull request May 27, 2012
Use anonymous table for history (like histogram reservoir)
@joewilliams joewilliams merged commit 62712df into boundary:master May 27, 2012
@russelldb
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants