lib-bpmn-engine icon indicating copy to clipboard operation
lib-bpmn-engine copied to clipboard

Persist Paused Process

Open rhzs opened this issue 3 years ago • 1 comments

Hi,

I am interested to take a challenge persisting the Process to DB. What's the best approach that should I take?

  1. Persisting in JSON
  2. Persisting in Binary using Gob
  3. Others

Also mentioned in:

  • https://github.com/nitram509/lib-bpmn-engine/issues/32#issuecomment-1235500250

And what is the storage preferences? I can do the persistence in Redis / SQLite for starter, later can be MySQL / Postgres, etc

Thank you.

rhzs avatar Sep 14 '22 11:09 rhzs

Hi,

thanks, for having some discussion upfront and for your engagement to implement this.

When it comes to storage, I would like to remind ourselves about the architecture guidelines, as mentioned here https://nitram509.github.io/lib-bpmn-engine/

Here are some thoughts, on that

  • storage will not be handled by lib-bpmn-engine
  • just persistence is offered (as in marshaling and un-marshaling)
  • preferably, some human readable and simple format is used, like JSON
    • binary would be an option to optimize for marshaling size ... but I consider that not important at this point; since JSON can easily be compressed (ZIP) as well
    • no pretty printing - just straight, single-line JSON
  • there should be an option for lib users, to "plug in" their own marshallers - and JSON is per default available
    • this is similar as with the exporters
  • an example code snippet should document how to use it
  • there should be some meta-data, like version information be marshaled as well == that would help in future library upgrades/changes

Does this make sense?

nitram509 avatar Sep 15 '22 17:09 nitram509

closed, due to inactivity.

nitram509 avatar Dec 19 '22 15:12 nitram509