• Stars
    star
    221
  • Rank 179,773 (Top 4 %)
  • Language
    Java
  • License
    Other
  • Created about 8 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Persistent Collections for Java

Persistent Collections for Java*

OVERVIEW

This is a "pilot" project to develop a library for Java objects stored in persistent memory. Persistent collections are being emphasized because many applications for persistent memory seem to map well to the use of collections. One of this project's goals is to make programming with persistent objects feel natural to a Java developer, for example, by using familiar Java constructs when incorporating persistence elements such as data consistency and object lifetime.

The breadth of persistent types is currently limited and the code is not performance-optimized. We are making the code available because we believe it can be useful in experiments to retrofit existing Java code to use persistent memory and to explore persistent Java programming in general.

This library provides Java classes whose instances can persist (i.e. remain reachable) beyond the life of a Java VM instance. Persistent classes include:

  1. Primitive arrays
  2. Generic arrays
  3. Tuples
  4. ArrayList
  5. HashMap
  6. LinkedList
  7. LinkedQueue
  8. SkipListMap
  9. FPTree
  10. SIHashMap
  11. ObjectDirectory
  12. Boxed primitives
  13. String
  14. AtomicReference
  15. ByteBuffer

This Java library uses the libpmemobj library from the Persistent Memory Development Kit (PMDK). For more information on PMDK, please visit http://pmem.io and https://github.com/pmem/pmdk.

For a brief introduction on use of the library, please see Introduction.txt.

HOW TO BUILD & RUN

PREREQUISITES TO BUILD

The following are the prerequisites for building this Java library:

  1. Linux operating system (tested on CentOS 7.2 and Ubuntu 16.04)
  2. Persistent Memory Development Kit (PMDK)
  3. Java 8 or above
  4. Build tools - g++ compiler and make

PREREQUISITES TO RUN

This library assumes the availability of hardware persistent memory or emulated persistent memory. Properties of this memory such as path and size can be specified in the config.properties file at the top level directory. Further information can be found inside the file.

Instructions for creating emulated persistent memory are shown below.

EMULATING PERSISTENT MEMORY

The preferred way is to create an in-memory DAX file system. This requires Linux kernel 4.2 or greater. Please follow the steps at:

http://pmem.io/2016/02/22/pm-emulation.html

Alternatively, for use with older kernels, create a tmpfs partition as follows (as root):

$ mount -t tmpfs -o size=4G tmpfs /mnt/mem  # creates a 4GB tmpfs partition
$ chmod -R a+rw /mnt/mem                    # enables read/write permissions to all users

STEPS TO BUILD AND RUN TESTS

Once all the prerequisites have been satisfied:

$ git clone https://github.com/pmem/pcj
$ cd pcj
$ make && make tests

Available Makefile targets include:

  • sources - builds only sources
  • examples - builds the sources and examples
  • tests - builds and runs tests

USING THIS LIBRARY IN EXISTING JAVA APPLICATIONS

To import this library into an existing Java application, include the project's target/classes directory in your Java classpath and the project's target/cppbuild directory in your java.library.path. For example:

$ javac -cp .:<path>/pcj/target/classes <source>
$ java -cp .:<path>/pcj/target/classes -Djava.library.path=<path>/pcj/target/cppbuild <class>

NOTES ON FUNCTIONALITY

  1. PersistentString objects are backed by a byte array and only supports ASCII characters.

CONTRIBUTING

Thanks for your interest! Right now, substantial architectural changes are still happening in the project. This makes it difficult to contribute code and difficult to effectively process pull requests. We expect these changes to settle out around December of this year and we look forward to code contributions once this happens. We will update this README then.

In the meantime, we would love to hear your comments and suggestions via the contacts listed below.

Contacts

For more information on this library, contact Olasoji Denloye ([email protected]) or Steve Dohrmann ([email protected]).

* Other names and brands may be claimed as the property of others.

More Repositories

1

pmdk

Persistent Memory Development Kit
C
1,336
star
2

syscall_intercept

The system call intercepting library
C
631
star
3

pmemkv

Key/Value Datastore for Persistent Memory
C++
397
star
4

ndctl

A "device memory" enabling project encompassing tools and libraries for CXL, NVDIMMs, DAX, memory tiering and other platform memory device topics.
C
262
star
5

kvdk

Key Value Development Kit
C++
201
star
6

pmem-redis

A version of Redis that uses persistent memory
C
113
star
7

valgrind

Enhanced Valgrind for Persistent Memory
C
107
star
8

libpmemobj-cpp

C++ bindings & containers for libpmemobj
C++
107
star
9

rpma

Remote Persistent Memory Access Library
C
101
star
10

vltrace

Tool tracing syscalls in a fast way using eBPF linux kernel feature
C
98
star
11

llpl

Low Level Persistence Library
Java
97
star
12

pmem-rocksdb

A version of RocksDB that uses persistent memory
C++
90
star
13

linux-examples

Early (now outdated) examples. Use PMDK instead.
C
59
star
14

run_qemu

A script to create bootable OS images, and run qemu with a locally built kernel.
Shell
57
star
15

pmdk-examples

PMDK examples and tutorials
C++
57
star
16

book

Persistent Memory Programming book examples
C
39
star
17

vmemcache

Buffer based LRU cache
C
35
star
18

pmemfile

Userspace implementation of file APIs using persistent memory.
C
34
star
19

pmemkv-java

Java bindings for pmemkv
Java
28
star
20

pmse

Persistent Memory Storage Engine
C++
24
star
21

vmem

Volatile Persistent Memory Allocator
C
23
star
22

pmemkv-bench

Benchmarking tools for pmemkv
C++
22
star
23

pmem.github.io

The pmem.io Website
HTML
17
star
24

pmemkv-python

Python bindings for pmemkv
Python
13
star
25

issues

Old issues repo for PMDK.
13
star
26

pmdk-tests

Extended tests for PMDK libraries and utilities
C++
10
star
27

miniasync

C
10
star
28

docs

Persistent Memory Docbook
9
star
29

pmemstream

C++
9
star
30

libpmemobj-js

JavaScript bindings for libpmemobj
C++
8
star
31

pmemkv-nodejs

NodeJS bindings for pmemkv
JavaScript
8
star
32

pmem-rocksdb-plugin

RocksDB plugin for optimized PMem support
C++
5
star
33

mpi-pmem-ext

MPI Extensions for Persistent Memory
C
4
star
34

kvm-redis

Recipe to run a memtier benchmark on a cluster of KVM-hosted Redis servers
Jinja
4
star
35

pmemkv-jni

Java Native Interface for pmemkv
C++
3
star
36

pmul

PMUL is a Java library that adds PMem programming features to Java’s foreign memory API in JDK 18
Java
2
star
37

acpi-spec-ecr

ACPI Specification ECRs
Makefile
2
star
38

dev-utils-kit

Shell
2
star
39

pmemkv-ruby

Ruby bindings for pmemkv
Ruby
2
star
40

autoflushtest

Basic data integrity test for platforms with flush-on-fail CPU caches
C
1
star
41

pmdk-convert

Conversion tool for pmdk pools
CMake
1
star
42

knowledge-base

Knowledge Base for pmem.io
SCSS
1
star