This library contains two helper functions to (de)serialize transaction parameters in replikativ. This is necessary if you want to store large amounts of data in replikativ. replikativ currently does not decide on a serialization format for you, but treats all data as edn in its code. The performance differences and the payload of additional serialization formats like fressian are not necessary in small data cases and harm the cljs experience. On JavaScript runtimes transit+json is still faster than fressian, although an optimized version exists.
If you want to use nippy or some other binary storage format (e.g. for high throughput on the JVM), you can write similar wrapper functions around replikativ's binary blob protocol.
You just wrap the data of your transaction:
(<? S (cs/transact! stage [user cdvcs-id]
(fressianize [['add-tweets tweets]])))
(def eval-fns
{'add-tweets (fn [S old id]
(go-try S
(let [tweets (<? S (unfressianize S client-store id))]
(swap! old into (map :text tweets)))
old))})
The examples are taken from the twitter collector.
Copyright © 2017 Christian Weilbach
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.