Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when does dat.haus data on disk? #8

Open
okdistribute opened this issue Jun 17, 2016 · 5 comments
Open

when does dat.haus data on disk? #8

okdistribute opened this issue Jun 17, 2016 · 5 comments

Comments

@okdistribute
Copy link
Collaborator

Right now, is all data is stored on disk that is being served? It might be nice to able to use dat.haus as a pass-through for data sometimes, by using memdb or something like that.

@juliangruber
Copy link
Owner

i was thinking about that as well, using a memory store. Then I wouldn't use nodejs though, rather redis or memcache or something written in go. JavaScript isn't made for storing a lot of stuff in memory unfortunately.

I think storing on disk is a less troublesome alternative to storing on memory right now, but @mafintosh feel free to correct me.

@mafintosh
Copy link
Collaborator

@juliangruber yea node is not the best at that. we could however create a native binding for a super efficient memory store. the interface is pretty straight forward, just read(offset, length) and write(offset, buf)

@juliangruber
Copy link
Owner

juliangruber commented Jun 17, 2016

agreed!

@juliangruber
Copy link
Owner

actually, we should be able to just use node's Buffer API for this, since buffers are already stored outside of the JS heap and we can know there size to the byte.

@mafintosh
Copy link
Collaborator

i already have this actually (forgot lol). https://github.com/mafintosh/random-access-memory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants