I am studying storage and querying solutions for historical record of events in a large number of elements.
This is a simplified scenario: I get a daily log of 200,000 road lights (indicated by sl1-sl200000), which shows whether the lamp works daily or not. It doesn’t matter how long the lamp was in use only on that calendar day.
Other bits of information are also stored for each lamp, and the beginning of the Python class looks something like this:
class Streetlamp(object):
"""Class for streetlamp record"""
def __init__(self, **args):
self.location = args['location']
self.power = args['power']
self.inservice = ???
My py-foo is not too big, and I would like to avoid a solution that is too greedy on disk / memory. Thus, a solution with a dictation (year, month, day) of tuples may be one of the solutions, but I hope to get pointers for a more efficient solution.
, , 1 . , 2010 , :
sl1000_up = dict('2010': '11100000000000...', '2011':'11111100100...')
, - , / . , . speed-up-bitstring-bit-operations, how-do-i-find-missing-dates-in-a-list finding-data-gaps-with-bit-masking . python-bitstring , .
, , "" , . " ", , .
. , , ZODB, Python, , .