Is Meteor Dying? State of the Meteor Ecosystem

I’d like to be able to limit what templates/JS the client gets and when, with something like associative tags I suppose.

For example, when a user first loads the application, there’s no need for them to get all the templates and JS. If they’re on a wizard, load up the first few pages of the wizard, and as they progress download more to the client as needed.

Another example would be, if a user doesn’t get a feature because they’ve not purchased it, they should never get this code unless/until they’ve gone through a purchase process. Then they can get the feature pushed down to the client.

Right now, my application is large. I have well over 100 Blaze screens and that number is growing all the time. The client today gets everything, every template and client JS file, even if they never use it. The site also has a built in Admin side, with many templates and code, but only a fraction of the users will ever need it.

Thanks for your feedback.

2 Likes

Already tried once :wink:

1 Like

I don’t think React is the right tool (yet). Tracker is the main reason for that. Shadow DOM and JSX aside, I think Blaze is the better choice until Tracker get’s the integration it deserves in React.

Beyond that, Tracker has to mature a bit. More about that [here] (https://www.google.dk/url?sa=t&source=web&rct=j&url=https://medium.com/%40faceyspacey/tracker-vs-redux-implicit-vs-explicit-df847abcc230%23.rj1vniytv&ved=0ahUKEwjD04ijsfXJAhXFRg8KHf5cANEQFggZMAA&usg=AFQjCNGF6KAflaivTyx0NDJ-HhZ1DxilxQ&sig2=VAYPWShQ8z6wbJTuIhIUUg)

I want to challenge this statement, so tell me;

  • Are you using Tracker at all?
  • How do you integrate Tracker within a React component?
  • Is Tracker doing observes/reruns within layouts or conditionally rendered components correcty?

Nah it ain’t dying. Hipsters gonna hip is all. MDG needs to keep their eyes on the prize and make the best tool for Meteor devs. There is nothing like Meteor out there, period.

6 Likes

Yep, I agree, we need to be able to load files on demand, as in the idea I mentioned. I’d love for Meteor to have this feature now that it has modules! They go nicely together! We can write individual entry points to load separately.

But webpack seems to already work with the right package (and a modified project structure). I’ve seen it work in the “kickstart” demo projects, using webpack:webpack package. Sure it would be nice it was a little better integrated with Meteor…

I think code splitting is really important. One example: I’m building an app with react, but I’m using OrionJS for the admin panel. I don’t need all the bunch of Orion dependencies in the rest of my app, only for the /admin section.

But meteor doesn’t think about anything like that. Maybe I’m using a hefty charting library on just one page, why should I load that library when I’m using the rest of the site?

This is really important for mobile experience, when downloading all these extra libraries can take a long time over a slow network, also phones are slower in general.

I was thinking about splitting my app into two or more meteor apps, but that seems like a stupid solution, when the simple solution would be to just have code splitting, right?

3 Likes

I don’t foresee managing code-splitting (or on-demand loading) of a Meteor package’s files as a feature of Meteor in the near future unless packages use the new ES2015 modules and require us to import their libraries. If the orionjs packages let us explicitly import files from the package, then we’ll be more ready to support this case in the near future. We’ll need some cooperation from the orionjs authors at some point (to convert their libraries to the ES2015 modules). As for the actual code splitting / on-demand loading, I might try to implement that myself if I have some time. It should be a matter of modifying Meteor to to read a config in package.json that tells it to ignore certain files, and to make Meteor serve those files via HTTP so they can be fetched on the client-side.

Yep, exactly! I agree 100%. Meteor 1.3 is a stepping stone towards us being able to load things on-demand the proper way (following standards). We’ll get there soon. :smile:

Of course, code-splitting / on-demand loading would be the ideal solution, but it’s actually easy to do what you just suggested: we can make two Meteor apps share the same database. The second instance would just read the DB from the first instance. Then, each Meteor instance can send different things to the UI (and also some of the same shared code as well).

But yeah, I’d much rather have legitimate control over what scripts are sent to the client than launching two separate Meteor servers. Plus, with two servers on two different ports, it’ll be slightly harder to make a sing-page app. it’s a matter of manually connecting to the desired server from within the client code for specific views of the app (for example, an /admin view might need to establish a DDP connection to the second server manually which we gotta write extra code for unlike with the default first server).


Another thing you can currently do (which isn’t hard at all) is just compile your entry points manually with Webpack (or Browserify, JSPM, etc), place them in your public folder, then you can load those on demand right now! The only downside to this is that the build step for this lies in your hands, not in Meteor’s. You’d have to make sure the files your app needs are in public before you run meteor deploy ... or the files will be missing in the deployment. This is probably the easiest route to take currently. You can have multiple entry points in your public folder, and load any of them whenever, but the downside is that anything in public is public, so a mailicious user could download the admin script even if the user is not an admin if the user knows the URL.


Meteor is just Node.js. Another thing you could do is compile entry points into somewhere besides public (a .hidden folder so they don’t get automatically loaded) then, write (or use from NPM) a simple HTTP server to serve those files with whatever security you may have in mind. The Meteor app could spawn the HTTP server on a separate port, but it’d be on the same domain, so you can just request the files using the chosen port.

1 Like

This kind of functionality is available for more than a year with preloader package - you can load different libraries per each route. Though it uses IronRouter but you can load libraries from wherever you want (CDN,…).

1 Like

Amen! That’s why I have had to look for alternatives. The points you mention are the true advantages of Meteor

Thanks for the info on these different approaches @trusktr

I wonder if this is the approach that kickstart-hugeapp project is doing? I haven’t dug into how it bundles the app, where they end up.

Public folder isn’t a problem from my point of view, better to rely on proper security rather than security by obscurity (although obscurity I guess is a good second line of defense!))

In any case I wish there was a little more information, either from MDG or somewhere else on how to do this. You say “just compile your entry points manually with Webpack” but that’s not something I would know how to do on my own!

1 Like

a solution native to Meteor doesn’t sound like a waste of time to me. Having this in the meantime is just icing on the cake :sunny:

1 Like

A component scoped within a class at that! It’s awesome.

1.2 also brought a major change to the build system, which compliments the ES2015 module system in 1.3. Meteor is it’s own Webpack now, where “loaders” (or “transforms”) can be added and removed as Meteor packages.

1 Like

Thank you for your packages but some of them have major problems (i.e. CollectionFS). I understand that you may be busy but may I ask you why don’t you get some help and accept some maintainers for you packages?

I have spent literally days in selecting some of the libraries I needed and I still ended up with buggy libraries and the authors were unresponsive. I am not sure there is a straightforward solution to quickly identify “blessed” packages. NPM has similar problems.
I would love a place where:

  1. I can see major companies that uses a packages.
  2. Easy to surface critical outstanding bugs and quickly to close PR. I have to jump in Github and dig in issues. If the author does not keep the Issues on Github updated it is chaos. Some packages have tons of “issues” and you never know which one is a real issue, which ones are issues with older versions that have been closed and which ones are just problems with the code of a newbie. If the author is not around to close issues and do a good admin job on the Github repo, I would love to see some well know people as maintainers.

I finally think that the solution has sort of human curation.

2 Likes

The CollectionFS packages are not mine. I helped work on v2 but I don’t currently maintain CFS.

I have always been happy to add maintainers to my projects, but nobody ever volunteers.

4 Likes

Actually, I think this is one of the major issues Meteor has at the moment. It would be ok, if only packages were affected that cover side-topics. But there are some packages that IMHO should be part of the Meteor core (like file upload - e.g. CollectionFS - or internationalization - e.g. tap:i18n) - where the response times are not that good. I don’t want to blame the package maintainers, because they are basically doing this in their spare-time. But I would love to see some care of MDG for these “core functionality” packages, e.g. by taking their ownership and maintaining them themselves. So I am quite happy to see that @sashko is now evaluating how to bring SimpleSchema closer to the core. For me, this is package is also essential, and I could not rate it high enough. And at least @aldeed is quite quick with his responses, as you can see above :smile:

5 Likes

I completely agree @waldgeist @Cris. I’m using CollectionFS to upload images and it has a quirk that it returns an image URL that actually isn’t yet available, so I end up with broken image links on my page, I’m pulling my hair out, and it seems like this is a known issue, and I saw some suggestions, there’s probably various hacks I could try. But the point is some of these packages seem half-baked.

So yes, MDG, or even a community effort to identify major packages and critical issues and address them, I believe is important.

CollectionFS has its purpose in some cases, however it is way too much to integrate in core.
Most people are much better off using client-side pre-processing + slingshot, and it works great as a package not in core. MDG could mention files in the meteor guide, but that’s it. Maybe also make/mention a simple package with file upload directly to their own server, could do, but nothing as comprehensive as CollectionFS, that should definitely be as packages.

1 Like