Comments (5)
Well, as I said, I'm quite the n00b with ClojureScript, but here's my fork of Datascript that uses external indexes. Feel free to critique or contribute!
from datascript.
Indexes are required for fast query lookups and range searches. Slow access (full-scan) is already implemented for collections. IndexedDB would be a good data storage for DataScript, if only it had synchronous api. With callbacks, it seems very hard to use DataScript the ways I imagined it would be used.
from datascript.
Use core.async?
How hard would it be to add an async API?
Maybe a use-channels binding?
from datascript.
It will ruin the whole “db as a value” idea. You cannot do async callbacks during React render for example. Core.async callbacks will not allow for nested functions. And so on. Barriers where there shouldn’t be any. It will force you to split model and view model, extracting latter from the rendering code. This is a wrong kind of decoupling, because rendering code has high cohesion, it’s a mistake to break these apart because limitations of technology say so.
Also, it’s not clear what benefits of storing data in IndexedDB are?
from datascript.
I'd agree with @tonsky that the "db as a value" idea would be sad to lose—I've spent quite a bit of time connecting an async data source like IndexedDB to work with React, and it basically involves duplicating all of the data so that React sees it.
That said, it would be really nice to have a Datalog implementation with the option to hook in external, async indexes (like from IndexedDB or, in my case, PouchDB). I'm giving that a shot—though, since I'm quite the n00b with ClojureScript and Datalog versus JS, I'm just throwing in callbacks. I'll report back with a link to the fork if I get anywhere useful. ;-)
(P.S. If anyone has good core.async
examples, I'd love to see them…especially on how to, say, implement in core.async
a reduce
function whose reducer function is async. As I said, I'm a n00b. ;-) )
from datascript.
Related Issues (20)
- How to hotfix aot code ?
- How to hot fix aot code?
- Rules - Required bindings doesn't evaluate correctly HOT 1
- Datascript101 link is dead HOT 1
- `get-else` fails when passed a lookup.
- `entity` returns entities for ids that don't exist HOT 2
- Is there any doc to demo idiom way to implement pagination in datascript? HOT 4
- Upsert of datom with composite tuple containing lookup ref fails HOT 5
- Recursive reverse lookups not working quite like it should HOT 1
- Lookup ref in composite tuple during upsert HOT 1
- do we have double vector type? HOT 2
- `:xform` is not called on ref attributes HOT 2
- Query performance with rules is much worse than "equivalent" inline clause HOT 3
- Ability to pass multiple functions into query HOT 1
- Index usage doesn't match datomic behavior and appears to be much less efficient HOT 1
- Inaccurate temporary IDs after transit deserialization
- Unable to resolve tempids on :db.unique/identity refs HOT 2
- Handling of BigDecimal
- Regression in 1.6.4: Can’t sum relations with different attrs HOT 1
- Regression in 1.6.4: unbound vars not filtered HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datascript.