The document discusses various APIs provided by libpmemobj for managing persistent memory pools and performing atomic transactions. It covers pool management APIs for creating and opening pools, persistent pointer types for addressing objects, transactional APIs for atomic operations, allocation APIs for transactional object creation/deletion, and synchronization primitives. It also provides examples of using persistent arrays and vectors that integrate with transactions.
Debugging Tools & Techniques for Persistent Memory ProgrammingIntel® Software
Learn about pmempool, a Persistent Memory Development Kit tool that helps you prevent, diagnose, and recover from data corruption. The session also covers other debugging tools for persistent memory programming.
Persistent Memory Development Kit (PMDK): State of the ProjectIntel® Software
Get an introduction to a PMDK based on the Non-Volatile Memory (NVM) Programming Model from SNIA*. Review the goals, successes, and challenges that still remain.
Big Data Uses with Distributed Asynchronous Object StorageIntel® Software
Learn about the architecture and features of Distributed Asynchronous Object Storage (DAOS). This open source object store is based on the Persistent Memory Development Kit (PMDK) for massively distributed non-volatile memory applications.
A Key-Value Store for Data Acquisition SystemsIntel® Software
Get an overview of the Data Acquisition Database design. It's based on the Persistent Memory Development Kit (PMDK) and Storage Performance Development Kit (SPDK) to leverage Intel® Optane™ DC persistent memory and non-volatile memory express (NVMe) drives.
Use cases like high-performance computing (HPC), AI, and IoTA can generate a huge volume of data. Learn how Intel® Optane™ DC persistent memory can be an alternative to DRAM for applications that benefit from a very large volatile memory capacity.
Debugging Tools & Techniques for Persistent Memory ProgrammingIntel® Software
Learn about pmempool, a Persistent Memory Development Kit tool that helps you prevent, diagnose, and recover from data corruption. The session also covers other debugging tools for persistent memory programming.
Persistent Memory Development Kit (PMDK): State of the ProjectIntel® Software
Get an introduction to a PMDK based on the Non-Volatile Memory (NVM) Programming Model from SNIA*. Review the goals, successes, and challenges that still remain.
Big Data Uses with Distributed Asynchronous Object StorageIntel® Software
Learn about the architecture and features of Distributed Asynchronous Object Storage (DAOS). This open source object store is based on the Persistent Memory Development Kit (PMDK) for massively distributed non-volatile memory applications.
A Key-Value Store for Data Acquisition SystemsIntel® Software
Get an overview of the Data Acquisition Database design. It's based on the Persistent Memory Development Kit (PMDK) and Storage Performance Development Kit (SPDK) to leverage Intel® Optane™ DC persistent memory and non-volatile memory express (NVMe) drives.
Use cases like high-performance computing (HPC), AI, and IoTA can generate a huge volume of data. Learn how Intel® Optane™ DC persistent memory can be an alternative to DRAM for applications that benefit from a very large volatile memory capacity.
Learn the ways to access persistent memory from Java*. Review how to use the Low-Level Persistence Library in the Persistent Memory Development Kit to retrofit the open source database Cassandra* for persistent memory.
Ceph is an open source distributed storage system designed for scalability and reliability. Ceph's block device, RADOS block device (RBD), is widely used to store virtual machines, and is the most popular block storage used with OpenStack.
In this session, you'll learn how RBD works, including how it:
* Uses RADOS classes to make access easier from user space and within the Linux kernel.
* Implements thin provisioning.
* Builds on RADOS self-managed snapshots for cloning and differential backups.
* Increases performance with caching of various kinds.
* Uses watch/notify RADOS primitives to handle online management operations.
* Integrates with QEMU, libvirt, and OpenStack.
Revisiting CephFS MDS and mClock QoS SchedulerYongseok Oh
This presents the CephFS performance scalability and evaluation results. Specifically, it addresses some technical issues such as multi core scalability, cache size, static pinning, recovery, and QoS.
O'Reilly Velocity New York 2016 presentation on modern Linux tracing tools and technology. Highlights the available tracing data sources on Linux (ftrace, perf_events, BPF) and demonstrates some tools that can be used to obtain traces, including DebugFS, the perf front-end, and most importantly, the BCC/BPF tool collection.
A compact bytecode format for JavaScriptCoreTadeu Zagallo
JavaScriptCore (JSC) is the multi-tiered JavaScript virtual machine in WebKit. The bytecode is a central piece in JSC: it’s executed by the interpreter and the source of truth for all of JSC’s compilers. In this talk we’ll look at the recent redesign of our bytecode format, which cut its size in half and enabled persisting the bytecode on disk without impacting the overall performance of the system.
Learn the ways to access persistent memory from Java*. Review how to use the Low-Level Persistence Library in the Persistent Memory Development Kit to retrofit the open source database Cassandra* for persistent memory.
Ceph is an open source distributed storage system designed for scalability and reliability. Ceph's block device, RADOS block device (RBD), is widely used to store virtual machines, and is the most popular block storage used with OpenStack.
In this session, you'll learn how RBD works, including how it:
* Uses RADOS classes to make access easier from user space and within the Linux kernel.
* Implements thin provisioning.
* Builds on RADOS self-managed snapshots for cloning and differential backups.
* Increases performance with caching of various kinds.
* Uses watch/notify RADOS primitives to handle online management operations.
* Integrates with QEMU, libvirt, and OpenStack.
Revisiting CephFS MDS and mClock QoS SchedulerYongseok Oh
This presents the CephFS performance scalability and evaluation results. Specifically, it addresses some technical issues such as multi core scalability, cache size, static pinning, recovery, and QoS.
O'Reilly Velocity New York 2016 presentation on modern Linux tracing tools and technology. Highlights the available tracing data sources on Linux (ftrace, perf_events, BPF) and demonstrates some tools that can be used to obtain traces, including DebugFS, the perf front-end, and most importantly, the BCC/BPF tool collection.
A compact bytecode format for JavaScriptCoreTadeu Zagallo
JavaScriptCore (JSC) is the multi-tiered JavaScript virtual machine in WebKit. The bytecode is a central piece in JSC: it’s executed by the interpreter and the source of truth for all of JSC’s compilers. In this talk we’ll look at the recent redesign of our bytecode format, which cut its size in half and enabled persisting the bytecode on disk without impacting the overall performance of the system.
Docker Logging and analysing with Elastic StackJakub Hajek
Collecting logs from the entire stateless environment is challenging parts of the application lifecycle. Correlating business logs with operating system metrics to provide insights is a crucial part of the entire organization. What aspects should be considered while you design your logging solutions?
Docker Logging and analysing with Elastic Stack - Jakub Hajek PROIDEA
Collecting logs from the entire stateless environment is challenging parts of the application lifecycle. Correlating business logs with operating system metrics to provide insights is a crucial part of the entire organization. We will see the technical presentation on how to manage a large amount of the data in a typical environment with microservices.
Adding Support for Networking and Web Technologies to an Embedded SystemJohn Efstathiades
These are the slides for a presentation we gave at Device Developer Conference 2014 in the UK. The presentation discusses the work done, experiences, and lessons learnt from adding an open source TCP/IP network stack and web server to an existing industrial control system running on an ARM Cortex M3-based processor from TI.
The presentation covers the following:
· Integrating the network stack into the existing software base
· Configuring and using the network stack and web server
· Adding support for HTTP basic authentication to restrict user access
· Using HTTP to remotely access the target system and retrieve operational data
· Debugging hints and tips
· Pitfalls to avoid and other lessons learnt
Robert Pankowecki - Czy sprzedawcy SQLowych baz nas oszukali?SegFaultConf
Wyobraź sobie, że w twojej aplikacji zachodzą jakieś zmiany (domain eventy). Chcielibyśmy te zmiany wystawić na zewnątrz, żebyśmy mogli na ich podstawie robić sobie raporty, read modele, sagi, synchronizować dane. Czy to zadanie okaże się być trudne czy proste, jeśli użyjemy bazy danych SQL. Co zyskaliśmy dzięki temu, że używam RDBMS/SQL a co utraciliśmy, być może, bezpowrotnie. W tej prezentacji opowiem wam jak chciałem zbudować pewną funkcjonalność dla biblioteki Rails Event Store, dlaczego okazało być się to trudniejsze niż myślałem, o modelu MVCC w PostgreSQL, czy jest sposób, żeby go obejść i uzyskać emulację trybu READ UNCOMMITTED. A może możnaby do całego problemu podejśc zupełnie inaczej i podłączyć się pod Write-Ahead-Log (WAL) i wygrać świat w ten sposób? Pokażę też jak moim zdaniem, korzystając z dokładnie tych samych konceptów, które stoją za Event Sourcingiem i bazami danych moglibyśmy budować API, tak bym za każdym razem pisząc integrację z serwisem X nie musiał się zastanawiać czy jego autorzy rozumieją pojęcie idempotent czy nie. Albo jak moglibyśmy osiągnąć prostotę dzięki używaniu Convergent Replicated Data Types (CRDT). Być może jako community stać nas na więcej niż REST nad CRUDem. Zastanowimy się, czy sprzedawcy SQLa zlasowali nam mózgi, sprawili, że zapomnieliśmy o najprostszym sposobie, który może działać i wprowadzili nas w maliny, w których aktualnie się znajdujemy. A może sami jesteśmy sobie winni? TLDR: Czy nasze aplikacje nie mogłyby działać tak jak pod spodem działają bazy danych? Czy to wszystko musi być takie ciężkie i skomplikowane jeśli chcemy mieć mikro-serwisy, zwłaszcza w małym zespole, który niekoniecznie lubi dostawiać 5 bazę danych do stacku technologicznego.
Intro to Apache Apex - Next Gen Platform for Ingest and TransformApache Apex
Introduction to Apache Apex - The next generation native Hadoop platform. This talk will cover details about how Apache Apex can be used as a powerful and versatile platform for big data processing. Common usage of Apache Apex includes big data ingestion, streaming analytics, ETL, fast batch alerts, real-time actions, threat detection, etc.
Bio:
Pramod Immaneni is Apache Apex PMC member and senior architect at DataTorrent, where he works on Apache Apex and specializes in big data platform and applications. Prior to DataTorrent, he was a co-founder and CTO of Leaf Networks LLC, eventually acquired by Netgear Inc, where he built products in core networking space and was granted patents in peer-to-peer VPNs.
Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022HostedbyConfluent
Introducing KRaft: Kafka Without Zookeeper With Colin McCabe | Current 2022
Apache Kafka without Zookeeper is now production ready! This talk is about how you can run without ZooKeeper, and why you should.
Similar to Create C++ Applications with the Persistent Memory Development Kit (20)
AI for All: Biology is eating the world & AI is eating Biology Intel® Software
Advances in cell biology and creation of an immense amount of data are converging with advances in Machine learning to analyze this data. Biology is experiencing its AI moment and driving the massive computation involved in understanding biological mechanisms and driving interventions. Learn about how cutting edge technologies such as Software Guard Extensions (SGX) in the latest Intel Xeon Processors and Open Federated Learning (OpenFL), an open framework for federated learning developed by Intel, are helping advance AI in gene therapy, drug design, disease identification and more.
Python Data Science and Machine Learning at Scale with Intel and AnacondaIntel® Software
Python is the number 1 language for data scientists, and Anaconda is the most popular python platform. Intel and Anaconda have partnered to bring scalability and near-native performance to Python with simple installations. Learn how data scientists can now access oneAPI-optimized Python packages such as NumPy, Scikit-Learn, Modin, Pandas, and XGBoost directly from the Anaconda repository through simple installation and minimal code changes.
Streamline End-to-End AI Pipelines with Intel, Databricks, and OmniSciIntel® Software
Preprocess, visualize, and Build AI Faster at-Scale on Intel Architecture. Develop end-to-end AI pipelines for inferencing including data ingestion, preprocessing, and model inferencing with tabular, NLP, RecSys, video and image using Intel oneAPI AI Analytics Toolkit and other optimized libraries. Build at-scale performant pipelines with Databricks and end-to-end Xeon optimizations. Learn how to visualize with the OmniSci Immerse Platform and experience a live demonstration of the Intel Distribution of Modin and OmniSci.
AI for good: Scaling AI in science, healthcare, and more.Intel® Software
How do we scale AI to its full potential to enrich the lives of everyone on earth? Learn about AI hardware and software acceleration and how Intel AI technologies are being used to solve critical problems in high energy physics, cancer research, financial inclusion, and more. Get started on your AI Developer Journey @ software.intel.com/ai
Software AI Accelerators: The Next Frontier | Software for AI Optimization Su...Intel® Software
Software AI Accelerators deliver orders of magnitude performance gain for AI across deep learning, classical machine learning, and graph analytics and are key to enabling AI Everywhere. Get started on your AI Developer Journey @ software.intel.com/ai.
Advanced Techniques to Accelerate Model Tuning | Software for AI Optimization...Intel® Software
Learn about the algorithms and associated implementations that power SigOpt, a platform for efficiently conducting model development and hyperparameter optimization. Get started on your AI Developer Journey @ software.intel.com/ai.
Reducing Deep Learning Integration Costs and Maximizing Compute Efficiency| S...Intel® Software
oneDNN Graph API extends oneDNN with a graph interface which reduces deep learning integration costs and maximizes compute efficiency across a variety of AI hardware including AI accelerators. Get started on your AI Developer Journey @ software.intel.com/ai.
AWS & Intel Webinar Series - Accelerating AI ResearchIntel® Software
Scale your research workloads faster with Intel on AWS. Learn how the performance and productivity of Intel Hardware and Software help bridge the gap between ideation and results in Data Science. Get started on your AI Developer Journey @ software.intel.com/ai.
Whether you are an AI, HPC, IoT, Graphics, Networking or Media developer, visit the Intel Developer Zone today to access the latest software products, resources, training, and support. Test-drive the latest Intel hardware and software products on DevCloud, our online development sandbox, and use DevMesh, our online collaboration portal, to meet and work with other innovators and product leaders. Get started by joining the Intel Developer Community @ software.intel.com.
Advanced Single Instruction Multiple Data (SIMD) Programming with Intel® Impl...Intel® Software
Explore practical elements, such as performance profiling, debugging, and porting advice. Get an overview of advanced programming topics, like common design patterns, SIMD lane interoperability, data conversions, and more.
Build a Deep Learning Video Analytics Framework | SIGGRAPH 2019 Technical Ses...Intel® Software
Explore how to build a unified framework based on FFmpeg and GStreamer to enable video analytics on all Intel® hardware, including CPUs, GPUs, VPUs, FPGAs, and in-circuit emulators.
Review state-of-the-art techniques that use neural networks to synthesize motion, such as mode-adaptive neural network and phase-functioned neural networks. See how next-generation CPUs with reinforcement learning can offer better performance.
RenderMan*: The Role of Open Shading Language (OSL) with Intel® Advanced Vect...Intel® Software
This talk focuses on the newest release in RenderMan* 22.5 and its adoption at Pixar Animation Studios* for rendering future movies. With native support for Intel® Advanced Vector Extensions, Intel® Advanced Vector Extensions 2, and Intel® Advanced Vector Extensions 512, it includes enhanced library features, debugging support, and an extensive test framework.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
4. SPDK, PMDK & Vtune™ Summit 4
PoolManagementAPI
0x0 0xFFFFFFFF
HEAP STACK
sbrk() alloca()
Memory Mapping Area
FSDAX volume
File A
File B
File C
• Persistent Memory is usually exposed by the OS through a
DAX-enabled file system.
• Memory Mapping is used to take advantage of byte-
addressability of PMEM
• mmap() does not guarantee the address of the mapping.
Especially if Address Space Layout Randomization (ASLR) is
enabled.
mmap()
5. SPDK, PMDK & Vtune™ Summit 5
PoolManagementAPIs
0x0 0xFFFFFFFF
HEAP STACK
sbrk() alloca()
pmem::obj::pool
fsdax volume
File A
pmem::obj::pool
File C
pool::open()
• libpmemobj abstracts away the underlying storage, providing
unified APIs for managing files
• The entire library adapts to what type of storage is being used,
and does the right thing for correctness.
• This means msync() when DAX is not supported.
• It also works seamlessly for devdax devices
6. SPDK, PMDK & Vtune™ Summit 6
pmem::obj::poolexample
if (access(path.c_str(), F_OK) != 0) {
pop = pool<root>::create(path, "some_layout", PMEMOBJ_MIN_POOL,
S_IRWXU);
} else {
pop = pool<root>::open(path, "some_layout");
}
8. SPDK, PMDK & Vtune™ Summit 8
pmem::obj::persistent_ptr
0x40000000 0x4F000000
PMEMobjpool
Object A
void *objB =
0x4B400000;
Object B
• The base pointer of the mapping can change between application instances
• This means that any raw pointers between two memory locations can become invalid
• Must either fix all the pointers at the start of the application
• Potentially terabytes of data to go through…
• Or use a custom data structure which isn’t relative to the base pointer
9. SPDK, PMDK & Vtune™ Summit 9
pmem::obj::persistent_ptr
0x40000000 0x4F000000
PMEMobjpool Object B
Object A
PMEMoid objB
={…, 0xB400000};
http://pmem.io/pmdk/manpages/linux/master/libpmemobj/oid_is_null.3
• libpmemobj provides 16 byte offset pointers, which contain an offset relative to the beginning
of the mapping.
• Is a random access iterator
• Has primitives for flushing contents to persistence
• Does not manage object lifetime
• Does not automatically add contents to the transaction
• But it does add itself to the transaction
10. SPDK, PMDK & Vtune™ Summit 10
Rootobject
0x40000000 0x4F000000
PMEMobjpool
Root object
PMEMoid objA;
PMEMoid objC;
Object A
PMEMoid
objB;
Object B Object C
• All data structures of an application start at the root object.
• Has user-defined size, always exists and is initially zeroed.
• Applications should make sure that all objects are always reachable through some path that
starts at the root object.
• Unreachable objects are effectively persistent memory leaks.
13. SPDK, PMDK & Vtune™ Summit 13
TransactionalAPI
• libpmemobj provides ACID (Atomicity, Consistency, Isolation, Durability) transactions
for persistent memory
• Atomicity means that a transaction either succeeds or fails completely
• Consistency means that the transaction transforms PMEMobjpool from one
consistent state to another. This means that a pool won’t get corrupted by a
transaction.
• Isolation means that transactions can be executed as if the operations were
executed serially on the pool. This is optional, and requires user-provided locks.
• Durability means that once a transaction is committed, it remains committed even in
the case of system failures
14. SPDK, PMDK & Vtune™ Summit 14
transactionsexample
auto pop = pool<root>::open("/path/to/poolfile", "layout string");
transaction::run(pop, [] {
// do some work...
}, persistent_mtx, persistent_shmtx);
15. SPDK, PMDK & Vtune™ Summit 15
Closuretransactions
• Take an std::function object as transaction body
• No explicit transaction commit
• Available with every C++11 compliant compiler
• Throw an exception when the transaction is aborted
• Take an arbitrary number of locks
17. SPDK, PMDK & Vtune™ Summit 17
pmem::obj::p
• Overloads operator= for snapshotting in a transaction
• Overloads a bunch of other operators for seamless integration
• Arithmetic
• Logical
• Should be used for fundamental types
• No convenient way to access members of aggregate types
• No operator. to overload
18. SPDK, PMDK & Vtune™ Summit 18
Codewithmanualsnapshotting
struct data {
int x;
}
auto pop = pool<data>::("/path/to/poolfile", "layout string");
auto datap = pop.root();
transaction::run(pop, [&]{
pmemobj_tx_add_range(root, 0, sizeof (struct data));
datap->x = 5;
});
19. SPDK, PMDK & Vtune™ Summit 19
Codewithpmem::obj:p
struct data {
p<int> x;
}
auto pop = pool<data>::("/path/to/poolfile", "layout string");
auto datap = pop.root();
transaction::run(pop, [&]{
datap->x = 5;
});
21. SPDK, PMDK & Vtune™ Summit 21
Transactionalallocation
• Can be used only within transactions
• Use transaction logic to enable allocation/delete rollback of persistent state
• make_persistent calls appropriate constructor
• Syntax similar to std::make_shared
• delete_persistent calls the destructor
• Not similar to anything found in std
22. SPDK, PMDK & Vtune™ Summit 22
Transactionalallocationexample
struct data {
data(int a, int b) : a(a), b(b) {}
int a;
int b;
}
transaction::run(pop, [&]{
persistent_ptr<data> ptr = make_persistent<data>(1, 2);
assert(ptr->a == 1);
assert(ptr->b == 2);
persistent_ptr<data> ptr2 = make_persistent<data>(allocation_flag::no_flush(),
2, 3);
...
delete_persistent<data>(ptr);
});
23. SPDK, PMDK & Vtune™ Summit 23
Allocationflags
• class_id(id)
• Allocate the object from the allocation class with id equal to id
• no_flush()
• Skip flush on commit
25. SPDK, PMDK & Vtune™ Summit 25
PersistentMemorySynchronizationprimitives
• Types:
• mutex
• shared_mutex
• timed_mutex
• condition_variable
• All with an interface similar to their std counterparts
• Auto reinitializing
• Can be used with transactions
27. SPDK, PMDK & Vtune™ Summit 27
pmem::obj::experimental::array
• std::array compatible interface (almost)
• Takes care of adding elements to a transaction
• In operator[]/at() when obtainig non-const reference
• On iterator dereference
• In other methods which allow write access to data
• Works with std algorithms
28. SPDK, PMDK & Vtune™ Summit 28
pmem::obj::experimental::arrayexample
transaction::run(pop, [&]{
auto ptr = make_persistent<array<int, 6>>();
// iterators will snapshot on element access
std::fill(ptr->begin(), ptr->end(), 1);
// modify all elements in a range
for (auto &e : ptr->range(0, 3)) {
e++;
}
delete_persistent<array<int, 6>>(ptr);
});
29. SPDK, PMDK & Vtune™ Summit 29
pmem::obj::experimental::vector
• std::vector compatible interface (almost)
• Takes care of adding elements to a transaction
• The same way as in array
• All functions which may alter vector properties are atomic
• This includes: resize(), reserve(), push_back() and others
• Transactions are used internally
• Strong exception gurantee