[Python-ideas] Application awareness of memory storage classes

Nick Coghlan ncoghlan at gmail.com
Mon May 23 22:35:26 EDT 2016


On 24 May 2016 at 05:33, R. David Murray <rdmurray at bitdance.com> wrote:
> On the other hand, the fact that *all* in-block persistent object state
> gets restored on block abort, regardless of where the exception occurred,
> could be somewhat confusing to Python programmers.

It occurs to me that you may want to talk to Mike Bayer and start
digging into the way SQL Alchemy session objects work, as what you're
describing here is starting to sound a *lot* like working with the SQL
Alchemy ORM:

- you have stateful objects declared as classes (SQL Alchemy models)
- you have volatile state in memory (the SQL Alchemy session)
- you have transactional commits to persistent storage (also the session)

The difference would be that instead of working with a backing
relational data store, you're working directly with persistent memory.
It would also be interesting to see how much of this could be emulated
with mmap and memoryview, permitting such code to have a slower
fallback in cases where actual NVRAM wasn't available.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-ideas mailing list