jeffmitchel / meteor-local-persist

Persistent client (browser) collections for Meteor, using localStorage.
Other
33 stars 11 forks source link

Revivie your package #1

Closed frozeman closed 9 years ago

frozeman commented 9 years ago

I would like to revive your package, as it seems fine to me. Either i will publish it under a new name, or you can add me as a collaborator, though i would like to change the name, to make it more findable (so i better publish a new one) :)

Just as a info

jeffmitchel commented 9 years ago

What name were you thinking of? I have found this package useful and was planning on upgrading it in the next few weeks.

frozeman commented 9 years ago

hi i actually forked it an released it under the name persistent-minimongo see https://atmospherejs.com/frozeman/persistent-minimongo

I also add a local storage cap, so that when the max size of 4.8 mb i met, it will remove the oldest 50 entries. As well as simplified the code. You now don't need to add a key, it will use the collection name instead.

jeffmitchel commented 9 years ago

Hi Fabian,

I decided to upgrade my package as well. Thanks for the kick!

Here’s what I did differently:

Jeff

On January 28, 2015 at 10:17:27 AM, Fabian Vogelsteller (notifications@github.com) wrote:

hi i actually forked it an released it under the name persistent-minimongo see https://atmospherejs.com/frozeman/persistent-minimongo

I also add a local storage cap, so that when the max size of 4.8 mb i met, it will remove the oldest 50 entries. As well as simplified the code. You now don't need to add a key, it will use the collection name instead.

— Reply to this email directly or view it on GitHub.

frozeman commented 9 years ago

Hey i didn't saw you answer back then :)

I just a few days ago released persistent-minimongo2, which uses the browsers indexedDB instead of localstorage.

jeffmitchel commented 9 years ago

Hi. Looks like you have a different use case in mind. Mine is reliable storage of small datasets, so localStorage makes sense for what I'm trying to do. The shopping cart example is actually pretty close to why it was originally implemented. I'd bee interested to hear how you are using your indexedDB package.

frozeman commented 9 years ago

Im working for ethereum a bitcoin 2.0 (or better 3.0) platform. I develop Dapps, this are decentralised applications, which get their information only from the blockchain and have therefore no server.

So these dapps need to store some data in a DB, for faster retrieval and user settings.

Additionally you can build desktop applications using e.g. electron. There you also need a DB and the local storage might be to small.

The main cause for me actually was, that when the browser crashes, it sometimes doesn't flush the local storage to disk and looses the data.

Using the indexedDB makes sure that data is always written to disk when changed.