261
© The Author(s) 2020
S. Scargall, Programming Persistent Memory, https://doi.org/10.1007/978-1-4842-4932-1_13
CHAPTER 13
Enabling Persistence
Using a Real-World
Application
This chapter turns the theory from Chapter 4 (and other chapters) into practice.
We show how an application can take advantage of persistent memory by building
a persistent memory-aware database storage engine. We use MariaDB (https://
mariadb.org/), a popular open source database, as it provides a pluggable storage
engine model. The completed storage engine is not intended for production use and
does not implement all the features a production quality storage engine should. We
implement only the basic functionality to demonstrate how to begin persistent memory
programming using a well known database. The intent is to provide you with a more
hands-on approach for persistent memory programming so you may enable persistent
memory features and functionality within your own application. Our storage engine is
left as an optional exercise for you to complete. Doing so would create a new persistent
memory storage engine for MariaDB, MySQL, Percona Server, and other derivatives. You
may also choose to modify an existing MySQL database storage engine to add persistent
memory features, or perhaps choose a different database entirely.
We assume that you are familiar with the preceding chapters that covered the
fundamentals of the persistent memory programming model and Persistent Memory
Development Kit (PMDK). In this chapter, we implement our storage engine using C++
and libpmemobj-cpp from Chapter 8. If you are not a C++ developer, you will still find this
information helpful because the fundamentals apply to other languages and applications.
The complete source code for the persistent memory-aware database storage engine
can be found on GitHub at https://github.com/pmem/pmdk-examples/tree/master/
pmem-mariadb.
Précédent

- 285/457

Suivant