Writing applications to be used with unreliable connectivity

The project I’m developing will be used in places with poor Internet connection (by very few users). I’m wondering how large typical Meteor applications are in Kb. Is your app, once deployed, transferring hundreds of Kb? Several Mb?

Any tips to cut down the size? And to make it more reliable under such conditions?

The skeleton app with just the core Meteor packages weighs in at 101KB (look at http://testskel.meteor.com/ in the Chrome network analyzer), which is not too bad. However, since all of your app code is loaded at once on the first load, if you’re not careful it’s easy to inflate the size. On the other hand, after the initial load of all of the app code the only other network traffic is the data sent over the wire. This should be a lot less than the HTML that would be sent in a “normal” AJAX or server-side rendered app.

You can use the appcache package to make your app available for use offline (of course, without the data). For a demonstration, check out https://docs.meteor.com (turn off your internet and visit the page again!).

There are also some community packages like GroundDB that will help you store data offline if you need to.

What devices are you targeting? Desktop or mobile?

Maybe also add appcache so that you cache your CSS & JS.
Not sure if there is a negative to adding it.

Thanks for the tips. I deployed to a test EC2 server, and I was surprised about how fast it was to navigate through the application. It felt like local.

I checked and the size of the application seemed to be about 1.6 Mb. From those, 460 Kb are because of OpenLayers.

I’m not sure what people will use, but the application works in all screen sizes. It will probably be just 10 or 20 users.

I’ll get into optimizing when all the features are implemented.

1 Like