TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

LokiJS – In-memory JavaScript Datastore with Persistence

82 pointsby joeminichinoalmost 9 years ago

9 comments

andrewaylettalmost 9 years ago
While "Performance over everything" is obviously hyperbole, I hope they really don't mean it and actually prioritise correctness: that it apparently does actually store and retrieve data suggests that at some level, at least, they do.
评论 #12036983 未加载
评论 #12037709 未加载
评论 #12036566 未加载
egeozcanalmost 9 years ago
&gt; In-Browser NoSQL db with syncing and persisting<p>Is the syncing part as straightforward as Pouch[1]? I couldn&#x27;t find anything about syncing on its docs. If a db comes with an easy offline-first and sync-when-possible model with granular permissions, it will be very interesting. Current solutions have (IMHO unacceptable) fixed dependencies on the backend or the architecture.<p>[1]: <a href="https:&#x2F;&#x2F;pouchdb.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pouchdb.com&#x2F;</a>
评论 #12037770 未加载
评论 #12036366 未加载
评论 #12037993 未加载
thinkloopalmost 9 years ago
V8 has some quirky memory mechanics. Object pointers, and similar, are subject to a vague hard limit, loosely defined by `--max-old-space-size` and other related flags, while the objects themselves can extend beyond it. For example, if you had 1 object that contained 15gb text, that would likely be OK, however if you had 1 billion objects, storing 1 character each, that would likely lead to a crash - even if the process memory is below limits. Relatedly the shape and nature of the data matters (nesting, types, etc.), limiting the ability to use the full memory available in various ways. I imagine a lot of it has to do with GC, but I don&#x27;t think that&#x27;s the full story.<p>Have you noticed such quirks building loki? Do you imagine being able to make full use of, say, a 64gb ram server? Is this something being taken into account and optimized in the project somehow? @joeminichino
formula1almost 9 years ago
What I find fascinating about a tool like this is how simple it is. An in memory store is not very important to me and what I develop. And yet, Im very happy this exists so that it sets a standard for other work in the future.
swalshalmost 9 years ago
Awesome, we&#x27;re now 1 bored developer weekend away from Mumps.JS
评论 #12036280 未加载
ldehaanalmost 9 years ago
I used this on a internal project for a little while, it&#x27;s easy to use, and the promises integration is useful, however at high volumes it did very poorly.<p>I was storing time series data.<p>I ended up moving to redis which has worked very well as long as I make sure it has enough memory for the date range I am keeping.<p>I hope this project keeps at it and gets a handle on performance under heavy load.
评论 #12039060 未加载
finchiskoalmost 9 years ago
After 5min of introduction video I had to stop. Guy explains why he started loki. Hi didn&#x27;t want to use sqlite in cordova app, so he created loki. Did he heard about localStorage or indexeddb? Probably not.
nilvedalmost 9 years ago
This website would actually be better if they removed all the CSS and images.
code_researchalmost 9 years ago
can I sync this with data in a postgresql db?