Backing EDN data structures with Amazon S3 or local filesystem. Uploads to S3 use durable queue, so entries will survive process death.
Add following to project's dependencies:
[byte-streams "0.2.0"]
[ilshad/edn-keeper "xxx"]
First, define keeper object. Configure the storage with Amazon S3 or local filesystem:
(require '[edn-keeper.core :as k])
;; Option #1: Amazon S3
(def keeper (k/keeper {:storage :s3 :bucket "my-bucket-name"}))
;; Option #2: local filesystem
(def keeper (k/keeper {:storage :fs :path "/var/edn-keeper/my-application"}))
Keeper object implements edn-keeper.core/IKeeper
protocol.
;; Save the data in the storage. "my-key" is kind of database partition.
(k/put keeper "my-key" {:foo [bar 42]})
;; List partitions
(k/keys keeper)
;; Download partition form the storage and read EDN
(k/get keeper "my-key")
Copyright © 2015 Ilshad Khabibullin.
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.