klauswuestefeld / prevayler-clj Goto Github PK
View Code? Open in Web Editor NEWAbsurdly fast, 100% transparent, ACID persistence in under 100 lines of Clojure.
License: BSD 3-Clause "New" or "Revised" License
Absurdly fast, 100% transparent, ACID persistence in under 100 lines of Clojure.
License: BSD 3-Clause "New" or "Revised" License
Hi Klaus, first of all: thanks for Prevayler!
I've made this little test
(ns prevayler.core
(:require
[org.prevayler :refer :all])
(:import
[java.io File]))
(defn tmp-file [l]
(doto
(File/createTempFile (str "test-" l "-") ".tmp")
(.delete)))
(let [handler-fn (fn [m [k v]] (assoc m k v))
prev! #(prevayler! handler-fn %1 (tmp-file %2))
initial-state (atom {})]
(with-open [p (prev! @initial-state "a")]
(doseq [kv (range 1000000)]
(handle! p [(keyword (str "a" kv)) kv]))
(reset! initial-state @p))
(with-open [p (prev! @initial-state "b")]
))
the first temp file created contains a map and one milion two element clojure vectors and is 1GB in size. Clojure data structures are not so compact when persisted through Java serialization. I'd sugget to improve this using a clojure serialization library with fallback to java serialization, like ptaoussanis/nippy.
Cheers,
Luca
@klauswuestefeld I loved this concept and I also was searching for something easy to start and avoid complex database communications, however, trying to start an app using prevayler
/prevayler-clj
I felt some difficulties since didn't found documentation or articles about this.
Could you make a demo app or show something opensource that uses prevayler
? maybe a screencast? ๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.