-
Notifications
You must be signed in to change notification settings - Fork 46
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
Create offline apps #87
Comments
I'd also like to do this. Specifically, an offline electron app that does not use meteor's server, but stores data inside mongodb outside of the .app, so that new app downloads don't overwrite the old data. If the data is stored in the browser cache (indexdb, localstorage, etc) then each new update will overwrite all of that data. What I want is basically an offline desktop app built on meteor without the meteor server, since the client-side code can do everything it needs to do, and electron already runs node so electron can push to the database. |
So you want to run mongodb on user's computer, like what they do in Electrify? But are you sure local storage will be lost after app updates? I could create new builds of my app while data is persistent. So it seems working to me. Or do you talk about the automatic update mechanisme? Or will it be lost after Electron updates? I haven't noticed that yet.
|
With local storage new builds of your app persist the data? So if you were to download a new .app and delete the old .app, the new .app would open up with the old .app's data? |
Yes, because the data isn't stored in the app package but in some user directory. In my case: ~/Library/Application Support/Electron/ Furthermore I use the GroundDB package to make meteor collections persistent using local storage. |
Yes, that will do the job. Still, it's only slightly tested. I'm not sure about possible failures that I have overlooked. Furthermore, local storage will not have the full power and performance that mongodb provide. Probably it will become slow quickly as the collection increases. We need to test it. If someone could provide specs about local storage in Electron it would be helpful. I'm not sure if the size is limited for example. You can test it already. I published my forked meteor-electron to atmospherejs, see package I used it in my recent project successfully. |
Wouldn't the users of the groundDB package have answers to some of these questions about local storage? Would there be any difference between how we're using that package here and how 6,800 others have already used it and therefore tested it? |
I would like to use meteor-electron to build offline apps. I did an attempt to implement this. See #86
It differs from other solutions like arboleya/electrify in that it will not bundle the server. All you need is already there, simple javascript in the client and node_modules in electron. No need to have a meteor server packaged as well.
Furthermore I like the concept of this project where we just have to add a single package to meteor that handles it all. Configuring through a settings file is easy. Furthermore I like the automatic app reload when using custom appSrc. That is something that most other projects don't handle (right now). Therefore I would like to use meteor-electron to build offline apps.
Earlier I tried to reach this goal by adding the 'AppCache' package. It will store the app in cache and therefore only needs a server on initial load. Although I wasn't satisfied. When a new version is detected, a few seconds after startup, the app will reload which is an awkward user experience. Furthermore is hard to keep versions synced between the native client (electron) and server. Therefore offline apps could be useful too.
The text was updated successfully, but these errors were encountered: