precisely / rapids

A Clojure DSL for scripting user flows
MIT License
1 stars 0 forks source link

Allow persistence of system objects across partitions #5

Closed aneilbaboo closed 3 years ago

aneilbaboo commented 4 years ago

Objects like runs, closures/functions and flows either take unnecessary stack space or cannot be persisted to the stack.

We need a way for such objects to be passed between partitions. This may end up being more than one story, as closures may require special treatment.

One idea is to implement multimethods to provide specialized encode and decode behavior. This will require a deep traversal over partition bindings at the beginning an end of every runlet. Such a technique should work for Runs and Flows, which might be persisted as a RunRef and as a GlobalDef, respectively. Closures will need special handling.

aneilbaboo commented 3 years ago

The nippy project should be helpful - a serialization/deserialization library which allows for handling custom types.

https://github.com/ptaoussanis/nippy

aneilbaboo commented 3 years ago

Fixed by https://github.com/precisely/rapids/pull/13