Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Migrating to Meteor/React

Does anyone know of any resources available for Meteor that can help load large (20MB-80MB) assets for (mainly) offline use?

My current development is completely in Vanilla JS (on the client side) and I'm considering building a Meteor/React version for performance and for practice. Currently my app operates both online and offline and syncs data when a connection is present with a MongoDB database. It also initially dynamically loads large assets into IndexedDB for offline use (actually the view layer only communicates with the local database). The whole system uses WebSockets to transport all data aside from the initial load. The transportation of the large assets is loaded steadily through the socket so it takes a while, but that data can be downloaded and paused and restarted essentially.

Is there something out there that handles something like this already? Or is there a better way to download large data files and install them in a local database? It could be a JSON file, but my fear of doing something like that it would crash the user's browser trying to load all that data at once. Any direction or advice would be much appreciated. Thanks.

like image 384
Justin Levine Avatar asked Mar 13 '26 10:03

Justin Levine


1 Answers

As what I can understand, you are trying to build a web application that could works offline. In that case, Progressive Web App (PWA) is the thing you should look for.

In fact PWA is a standard, working offline is one of the core features. In practice, PWA makes use of service worker to cache your static assets in browser and use them for future loads. But keep in mind that this technology is still new and has not yet been a standard for web development, so you should check if it works on your users' browsers.

Speaking about Meteor, there are already some attempts to make Meteor apps work offline. The best two which I know are meteor-service-worker and GroundDB. The first helps your cache the app source in browser and the last helps your db live in client-side. They are all good packages, however I think they are not mature yet so think twice before using them.

like image 75
kkkkkkk Avatar answered Mar 16 '26 01:03

kkkkkkk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!