Code Monkey home page Code Monkey logo

pynvm's Introduction

pynvm - Non-volatile memory to Python ecosystem

PyPI Build Status Coverage Status Docs

⚠️ Discontinuation of the project

The pynvm project will no longer be maintained by Intel.

  • Intel has ceased development and contributions including, but not limited to, maintenance, bug fixes, new releases, or updates, to this project.
  • Intel no longer accepts patches to this project.
  • If you have an ongoing need to use this project, are interested in independently developing it, or would like to maintain patches for the open source software community, please create your own fork of this project.
  • You will find more information here.

Introduction

A Python implementation of bindings to the Persistent Memory Development Kit.

Documentation

The entire documentation is located at the pynvm Documentation.

pynvm's People

Contributors

bitdancer avatar catalin-manciu avatar krzycz avatar pbalcer avatar perone avatar szadam avatar wlemkows avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pynvm's Issues

Validate the transactions used by the Persistent data types

It should be possible to write a test harness that makes sure every transaction used by the Persistent data types is failure-tested to make sure everything is rolled back correctly (that is, that everything that needs to be snapshotted is).

Current status & Windows support - possible Unicode issue?

Just checking if this is the latest version of pynvm? It may not be working against the latest version of pmdk (built via vcpkg on Windows 10 & VS2017)

During pip install, I need to manually rename the pmdk obj files to remove the "lib" part of the name.

Running the account demo, the created file is jumbled unicode - 祭捡潣湵獴瀮敭潭橢漀獲 whereas it should be myaccounts.pmemobj. Running a second time fails.

It may be related to the following warning during compile time...

build\temp.win-amd64-3.6\Release_pmem.c(933): warning C4133: 'return': incompatible types - from 'const wchar_t *' to 'const char *'
(there are approx 36 similar issues relating to wchar_t)

I recall getting this working on Windows a few months ago, but since then my build environment was wiped :-)

Optimize by moving code into a C library

This should be guided by profiling, but pretty clearly things like the dictionary key lookup should be recoded in C (the existing CPython code will be helpful in this process, but note that it is the 3.5 code and note the 3.6 code I used as a model for the python code).

new pynvm release

Once "enough" features are implemented (which I would say would be the default serializer/whitelist, support for PersitentObject, and the expanded docs), we should cut a new pynvm release and upload it to pypi. We will need perone's help with that, as I presume he is the current owner of the pypi project.

Wrong "getting started" example for pmem

The current examples in https://pynvm.readthedocs.io/en/v0.3.1/getting_started.html regarding libpmem library use a call pmem.map which doesn't seem to exist.

I suppose that it should be pmem.map_file, which seems to be similar (https://pynvm.readthedocs.io/en/v0.3.1/pmem.html#nvm.pmem.map_file). However, the documentation for map_file only explains three of the four parameters, and they are all needed (that is what I see in Python 2.7 and pynvm==0.3.1, which is my current environment).

I am unable to execute the tests nor I fully understand the meaning of the mode parameter. I don't know if this is only a documentation problem or the call is expected to have optional parameters.

how to persist numpy:ndarray

from nvm.pmemobj import PersistentObjectPool

data = np.load('/data/data/feature_100000_mat.npy')
with PersistentObjectPool('hello_world.pmem', flag='c') as pool:
if pool.root is None:
pool.root = data

Traceback (most recent call last):
File "", line 3, in
File "/usr/lib64/python2.7/site-packages/nvm/pmemobj/pool.py", line 795, in root
oid = self.mm.persist(value)
File "/usr/lib64/python2.7/site-packages/nvm/pmemobj/pool.py", line 491, in persist
raise TypeError("Don't know how to persist {!r}".format(cls_str))
TypeError: Don't know how to persist 'numpy:ndarray'

Facilitate versioning and migrations

Like a more traditional DB, pynvm applications are probably going to want to version their persistent data "schema", and provide automatic migrations when the schema changes. pynvm.pmemobj can facilitate this at a minimum level by providing an 'application version' string stored in the root object and exposed as a property of the pool object, and a way to treat a version mismatch as an error (and a way not to, so one can do a migration).

We could also go further and provide a migrations infrastructure. If we choose to do the latter we should look at best practices in the SQL realm. This ticket is really only about the minimal version support., though.

Activate CI

The preone repo has coveralls/Travis CI enabled, we should enable it for this repo as well. That's mostly a matter of turning it on, but I haven't tested the code on pypy yet and py3 should be added to the versions tested in the .travis.yml file.

Make the code thread safe.

Currently no locking is done. The Python C code I've translated assumes it holds the global interpreter lock, which is not true for this code, so appropriate locks need to be added.

Add support for PersistentTuples.

From our point of view tuples are an immutable list, so the code should be a stripped down version of the PersistentList code. This is worth adding as a Persistent class so that we aren't going through a pickle/unpickle serialization for the whole tuple.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.