- Restore basic Session from disk (80h):
- Simple : ObjectStore and Agenda only, single entry-point
- Incremental streaming of ObjectStore and Agenda actions
Create a transaction-aware journal that can be replayed.- Safe-point boundaries:
- Shallow user transactions that stage WM actions
- Rule network evaluation
- Rule Firing
- Safe-point boundaries:
- Read the journal back (as a stream) to build an in-memory representation of the minimal state required to replay the engine
- Items:
- Objects
- Store / Handles
- Activations
- There will be dependencies between items that need to be preserved
- The in-memory representation will normalize the items (e.g. insert/delete cancel each other)
- (** future : the journal needs to be normalized as well, but will be done at a later stage)
- Items:
- Rebuild the session from the in-memory representation
- Restore the objects (will be done lazily in a later version)
- Rebuild the object store by reinserting the facts
- Restore the agenda
- Replay the history
- Slaves (80h)
- Send the journal to 1+ slaves with 2-phase commits
- Asynchronous streaming
- Slaves will replay the journal stream, asynchronously
- Will replay batches only when a safe point is reached
- Add / remove slave gracefully
- (** future: Add a slave without stopping the master)
- (** Test : master fails during rule evaluation; Test : master fails during rule firing)
- Send the journal to 1+ slaves with 2-phase commits
- Support the remaining internal data structures : TMS, accumulates, globals, ... ( 300h )
- Normalization of the journal on disk to ( 300h )
- How do we prevent the journal from growing indefinitely
- Create a dedicated service that incrementally creates a session snapshot byte array from the journal stream,
so that a slave can be rehydrated from that directly ( 400h ).- We don't want to use the full protobuf serialization
- We don't want to replay the whole history
- Develop a transaction model (possibly around rule modules) with rollback and integrate it with the replay mechanism ( 750h + )
Comments