Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-7247

Reliable (persisted/replicated) Drools core



    • Epic
    • Resolution: Unresolved
    • Major
    • None
    • None
    • None
    • None
    • Reliable Session
    • 2023 Week 03-05 (from Jan 16), 2023 Week 09-11 (from Feb 27), 2023 Week 12-14 (from Mar 20), 2023 Week 15-17 (from Apr 10), 2023 Week 24-26 (from Jun 12), 2023 Week 18-20 (from May 1), 2023 Week 21-23 (from May 22)
    • NEW
    • NEW
    • ---
    • ---


      Currently Drools core is not reliable in the stateful scenario: in case of restart the working memory is lost. There are mainly two stateful pieces of information: inserted facts and indexes. HACEP scenario solved this issue with a primary/secondary configuration and with external replication (aka serialization of data and using of external stores to make it reliable). The scenario that I think we should explore is to standardize the API of object store and the indexes so that they can be externalized. There are different ideas to explore:

      • Create a minimalized object store API that can be implemented on top of other storage (i.e. MongoDB/Infinispan)
      • Review indexes to create a generic API that is backed by other indexing solution (Solr/Lucene)
      • Consider a blocking API that just writes "outside" (i.e. filesystem) using Loom to make it efficient/non blocking (see Matteo's proposal on vThread)

      Another possibility would be persisting only the facts inserted in the working memory at a given point in time and reinserting all of them in a brand new empty session in order to replicate it. This solution has the additional problem that is necessary to avoid the duplication of side-effects executed in consequence that was already addressed in HACEP, but in a brittle way and however not transparent to users. Nevertheless this solution could be the easiest to be implemented for situations, like Ansible related use cases, where execution of consequences is not relevant and users are only interested in the agenda generated by the rules evaluation.


        Issue Links



              mfusco@redhat.com Mario Fusco
              mfusco@redhat.com Mario Fusco
              0 Vote for this issue
              2 Start watching this issue