POC of History API call implementation

I’m going to refactor it, for POC I used existing var names.

On 05 Aug 2014, at 22:40, Lars Windolf <notifications@github.com> wrote:

> In backend/settings.py:
> 
> > +        self.nodes_key = self.history_pfx + '::nodes'
> > +        self.connections_key = self.history_pfx + '::connections'
> > +        self.services_key = self.history_pfx + '::services'
> > +        self.config_key = self.history_pfx + '::config'
> > +        self.resolver_key = self.history_pfx + '::resolver'
> > +
> > +        self.checks_key = self.history_pfx + '::checks'
> > +        self.mon_nodes_key_pfx = self.checks_key + '::nodes::'
> > +        self.mon_services_key_pfx = self.checks_key + '::services::'
> > +        self.mon_config_key = self.checks_key + '::config'
> > +        self.mon_config_key_pfx = self.mon_config_key + '::'
> > +
> > +        self.queue_key = self.general_pfx + '::queue'
> > +        self.history_key = self.general_pfx + '::history'
> > +
> > +rpfx = DOTMKeys()
> 1.) I don't get the naming "rpfx". Neither is "pfx" an English abbreviation, nor is it obvious what the "r" stands for.
> 
> 2.) "DOTMKeys" is a suboptimal name. It doesn't contains any keys. It is about namespace prefixes of a key-value store.
> 
> Thinking about a good solution I'd draft something like
> 
>  ns = DOTMNamespace()
>  print "Node namespace = " + ns.nodes
> No "key" no "prefix" because handling the namespace shouldn't imply the implementation. The namespacing is just about separation.
> 
> —
> Reply to this email directly or view it on GitHub.
>