DataScript 是一个用 ClojureScript 编写的浏览器内存数据库.
其实是个 Persistent Data Structure, 作为数据库使用.
深受 ClojureScript 和 Dotamic 的影响, 性能也不错, 我还没深入.
另外有个场景是跟 React, 或者说 Om 搭配使用, 应用级别渲染.
我认为是非常值得深入的技术, 很可能未来对 React 到 Relay 带来巨大影响.目前我对这方面技术了解不够, 现在只是梳理下能找到的资源.
仓库 https://github.com/tonsky/datascript
HN https://news.ycombinator.com/item?id=7640473
作者 https://twitter.com/nikitonsky
Demo
- Om + DataScript https://gist.github.com/swannodette/11308901
- Todo https://github.com/tonsky/datascript-todo
- PossibleDB is a Database Server built with DataScript, RethinkDB, Clojure, ClojureScript, and NodeJS. https://github.com/runexec/possibledb
文章
- Chatting cats use DataScript for fun http://tonsky.me/blog/datascript-chat/
- A shallow dive into DataScript internals http://tonsky.me/blog/datascript-internals/
- Couple of DataScript resources http://tonsky.me/blog/datascript-resources/
- Datascript and React.js for a Clojure web app http://thegeez.net/2014/04/30/datascript_clojure_web_app.html
视频
- ClojureScript NYC DataScript Webinar https://vimeo.com/114688970
React
- Getting Started With Datascript and Reagent http://www.slideshare.net/fractallambda/datascript-and-reagent
- Mutations in Relay https://speakerdeck.com/laneyk/mutations-in-relay