Can meteor application be launched offline - meteor

Can meteor application be launched offline, when no server connection is active,
for example from html5 application cache in browser.
Or being saved to offline folder.
of course no data propagation to server, but maybe some local cache.
EDIT: how about saving events to local storage when offine?

Yeah, theoretically, this should be doable by creating a HTML5 cache manifest. I asked about this here:
How can I add a cache manifest to a Meteor app?

I had the same query. This is worth looking at for persisting your data offline:-
https://github.com/awwx/meteor-offline-data

Meteor has an appcache package (check the docs) and it currently being used in the docs itself.

Related

Can I prevent background sync of firestore from old version client?

I want to control background sync of google-firebase's firestore db with persistance mode (PersistenceEnabled to true).
I'm afraid the old version client, works offline and don't know the app's version-up (with some destructive updates), may upload local-data to server when change to online.
In this case, I want to check current app versions and allow/not allow before sync.
Is there any solution?
Data in the cache is only updated when you attach a listener/observer to it. There is no automatic synchronization happening for the data in the offline cache.
This means that you can add a version check to your application startup code, before you attach any observers. Simply store a database-version field in a global document, and check against that upon application startup. If the version is greater than what the app was made to handle, show an upgrade prompt.

Meteor and React Native

We're new to Meteor and would appreciate some advice. Currently we're building out an app for our client using React Native.
Does Meteor include / provide an 'offline first' capability via its API (in a React Native dev environment) ? So for example user can persist data on device (iOS/Droid) when offline and then when back online, it can be sync'd back to Meteor's cloud db (also handling sync update conflicts on server side correctly) ?
ok i got the best thing for you, i guess:
react-native-meteor
I've been directed to this issue, to get latest info on offline w/ Meteor via the react-native-meteor lib. Posting here if others are looking for same at the current time: https://github.com/inProgress-team/react-native-meteor/issues/154

How does Meteor.js detect changes in MongoDB or Mysql?

How does Meteor.js detect changes in MongoDB or Mysql? Does it add triggers, or does it poll for changes? If if polls for changes then this seems a rather expensive operation
Update
I also found an explanation on the Meteor site after some more digging around:
https://www.meteor.com/livequery
For MongoDB, Meteor tails the operation log (oplog) for changes. In production, this requires the database to be set up as a replica set (a one-member replica set is fine); if it isn't then it will fall back to polling. In development mode, oplog tailing is enabled by default. For more information, see this (slightly out-of-date) wiki page.
There's no native MySQL support in Meteor. There are packages which add MySQL support, but you'll have to read those packages' documentation to see if it uses triggers or polling.

Meteor Deploy to .meteor.com Problems

I have been using meteor for quite awhile and have been deploying apps to .meteor.com. However recently after updating my app to meteor v0.8 and new collectionFS, the terminal states that the app has been deployed to whatever.meteor.com but when I go to the site, I see Meteor's Site is down.Try again later. I have narrowed it down to the new collectionFS package causing the problem, since my old app with the old collectionFS deploys fine. Any thoughts?
EDIT
The problem was due to the long startup time caused by my collectionFS path: definition.
There are several reasons why your site may not load when being deployed.
Site Inactivity
The meteor deploy service shuts down if your site hasn't been accessed in a while, and takes a while to start up again if it is requested, during which time you'll see that message.
In a few minutes after the first request, you should see the site come back up.
For more information, see this answer: https://stackoverflow.com/a/19072230/586086
Excessive Resource Use
Another reason your site can refuse to deploy is if your app takes more than 4 minutes to start or uses an excessive amount of CPU - it will get killed. Is it doing anything resource-intensive like that? For initializing really big databases, do the initialization locally and copy the contents using the url from meteor mongo -U yoursite.meteor.com.
I had to do this for the demo app for meteor-autocomplete. See the file upload-db.sh.
I had the same error.
But the following solution works deploying the app successfully.
meteor login
meteor deploy < available meteor sub domain name >
I know this is old but I was just having the same issue and removing the collectionFS package solved my problem immediately...in case that helps anyone.

What are the steps to bundle Meteor into a client-side-only IOS app

I have tested Cordova as a way to embed a HTML5/JavaScript application into an IOS application without a remote server.
I would like to embed Meteor instead: for my learning, for the reactivity, and so that later I can add a server-side for storing data.
What are the key steps to do this? I would need to use LocalStorage instead of in-memory storage of minimongo. Are there also steps to embed Meteor? Would I also need Cordova to provide a functional environment for Meteor? Are there steps to tell Meteor there is no server?
At the moment its not possible to persist storage with local meteor collections. You can create collections without specifying the collection name e.g
var MyCollection = new Meteor.Collection(); //(instead of Meteor.Collection("MyCollection");
The issue is as soon as you close the application the data will be cleared. So this makes it very difficult to make your app offline only.
There is also a package being worked on to help allow offline collections while a server is not available: https://github.com/awwx/meteor-offline-data#readme
You can still use meteor with cordova and phonegap though, but you will need a data connection. To bundle your cordova application there is a very helpful script: https://github.com/guaka/meteor-phonegap
I have created an application using cordova, meteor and packmeteor.
For me it works pretty nicely.
I wrote a block post on how you can get started with it here.
For the local persistence of data I used GroundDB.

Resources