# Persistent predicates based on RocksDB

**URL:** <https://swi-prolog.discourse.group/t/persistent-predicates-based-on-rocksdb/5501>\
**Category:** Request For Comments\
**Created:** [June 16, 2022, 1:28pm UTC](https://swi-prolog.discourse.group/t/persistent-predicates-based-on-rocksdb/5501 "2022-06-16T13:28:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Post date:** [June 16, 2022, 6:34pm UTC](https://swi-prolog.discourse.group/t/persistent-predicates-based-on-rocksdb/5501/2 "2022-06-16T18:34:05Z")

</div>

Just to give some idea of what I am doing with [library(persistency)](https://www.swi-prolog.org/pldoc/man?section=persistency).

The use case is for parsing [biological databases](https://en.wikipedia.org/wiki/List_of_biological_databases) into facts. Once the fact file is created and the data is coherent it is converted into a SWI-Prolog Quick Load File (QLF) at which point there is no need for a non-Prolog datastore. Since QLF files loads large Prolog files fast ([ref](https://swi-prolog.discourse.group/t/quick-load-files/1239/4)), there is no need for further optimizations for this use case.

As these database are typically only updated on a monthly basis or need to have the data loaded on a monthly basis, transactional processing can be avoided.

Currently library(persistency) combined with QLF fits well with my use case.

* * *

> **Personal notes**
>
> As of 07/10/2022 the only way to effectively work persistent predicates based on RocksDB is to use specific Git commits of the source.
> 
> [Commits · SWI-Prolog/swipl-devel · GitHub](https://github.com/SWI-Prolog/swipl-devel/commits/master)  
> [Commits · JanWielemaker/rocksdb · GitHub](https://github.com/JanWielemaker/rocksdb/commits/master)  
> [Commits · JanWielemaker/rocks-predicates · GitHub](https://github.com/JanWielemaker/rocks-predicates/commits/master)  
> [Commits · facebook/rocksdb · GitHub](https://github.com/facebook/rocksdb/commits/main)
> 
> * * *
> 
> Currently building specifics.
> 
> 07/10/2022  
> OS: Ubuntu 22.04 LTS  
> SWI-Prolog: Install via PPA development version 8.5.14  
> RocksDB pack commit: e253458  
> RocksDB commit: a9565ccb2  
> rocks-predicates commit: 3071007

---

_[View the full topic](https://swi-prolog.discourse.group/t/persistent-predicates-based-on-rocksdb/5501)._
