joshaber / freezer Goto Github PK
View Code? Open in Web Editor NEWDatabase as a value.
Home Page: http://www.infoq.com/presentations/Datomic-Database-Value
License: MIT License
Database as a value.
Home Page: http://www.infoq.com/presentations/Datomic-Database-Value
License: MIT License
Just laziness on my part, but we need to fix it.
Since FRZDatabase
s are immutable, it'd be super easy to cache lookups in process. Should we?
Currently each attribute is its own table. We could instead implement each attribute as a column on one table. This could help address #5.
The downside is that we'd probably end up with a super wide table. I'm not sure how Sqlite feels about that.
Transactions exist currently in the database, but we don't expose them to users. It could be useful:
Related to #3.
We currently don't use any indexes. It'd probably make sense to index on key
. Maybe attribute
too?
Should Freezer provide more sophisticated querying?
Currently, getting a collection of size n
requires (at least) n * 2
selects.
That's super gross.
Sqlite's awesome, LevelDB might be more awesome.
๐
๐
In light of #5, #12, #19, I think it'd make sense to move back to using a single table.
๐
๐
value
column will just be a blob, making it harder for us to leverage SQLite magic.
We should run VACUUM
. Probably as part of trimming.
From @mdiep.
It seems like a good idea to make it clearer what's happening.
Add a way for users to remove an attribute.
It'd be useful/cool to be able to say, "give me the database from yesterday", etc.
We have a date attribute type, but the object we get out isn't a date. ๐ข
From @mdiep.
I think the dissonance for me is that it feels like I'm mutating a dictionary, but the names don't convey that
I agree. It's tricky because dictionaries are key -> value, but Freezer's more like key -> (attribute, value).
Currently the sqlite database just keeps adding things. That's less than ideal. We should have some way of trimming it.
Some things:
Currently key-based reads require walking over each of attribute tables and checking if they have an entry for the key. This means it's gonna slow down as you add more attributes.
A couple thoughts on speeding it up:
Currently on both branches, inserting is O(n), n = number of objects in the previous "database." This is because they create a new list of objects for each insert. That's... less than ideal.
Reads and writes require that we look up attribute information (type, cardinality, etc.). We should cache that.
We'd get this for free if we did #8.
Probably easiest to leverage -keysWithAttribute
and use some attribute as a belongs-to-this-collection tag.
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.