Why not Meteor in 2020?

I used to be a huge Meteor fan back in 2014 - 2016. Wrote a lengthy advocacy post, tried to repackage all the popular libraries for Meteor before it supported npm out of the box, gave talks at DevShops.

Then I joined Google and stopped using Meteor, just no need for it. Later, when I got back into making web apps, Meteor felt abandoned, the client side story was split (React vs. Blaze), a bunch of the team moved on to Apollo, all sorts of new frameworks on the block were getting popular, the service worker support feature request I put in still isn’t there yet, so I ended up going for TypeScript + Node + MongoDB + GraphQL + React. In other words, rebuilding the car. But hey, the “car” had the PWAs license plate. (I worked as a Developer Advocate at Google for PWAs.)

After a year working with this stack, I have to say that the developer experience, with the (partial) exception of GraphQL, has been rather painful. Accounts have been a huge pain. Firebase is bloated, Firebase Web UI social logins are incredibly slow (enough to turn users away), and Auth0 is way over-engineered. Keeping data in sync was a delight with Meteor, and a pain with React state management and even Apollo caching. Gatsby builds are getting slower and slower. I mentioned the GraphQL experience was partially not painful, but there are the painful parts - modularization (settled on graphq-modules eventually), inability to extend types, uninformative errors. Having to define a GraphQL mutation for everything enforces good discipline but is nowhere near as convenient as Meteor.methods. And I’m not even talking about building mobile apps from the same codebase, or testing. Or other awesome Meteor features that made the developer experience fun, but which I have forgotten about. Good luck trying to rebuild by 2015 Instagram clone in < 300 lines of code with this stack.

So I feel like the returning prodigal son now.

My app is SEO-optimized thanks to Gatsby, but Meteor has SSR too; and the app still needs to load data dynamically, so what’s the big win here? It’s a small scale app and it won’t realistically be reaching 1M users any time soon. Vulcan.js has GraphQL. Tiny took over Meteor development. Meteor still uses the dreaded appcache and doesn’t support PWAs but apparently there are working Service Worker hacks.

So what’s wrong with Meteor in 2020? And what’s the win in rebuilding the car for small-ish PWAs?

18 Likes

We are building many PWAs powered by Meteor methods and the experience has been great. We believe it’s the fastest way to get Mobile app to the market and thinking of releasing a boilerplate for that (I really think the Meteor community should press on the PWA front).

We have also tried plain webpack (rebuilding the car), Razzle, Gatsby, NextJS, GraphQL and none of them came even close to what the Meteor ecosystem has to offer, so we went back to using Meteor.

There are areas that I am hoping will get better soon such as adding HMR API with react fast refresh and auto scaling with Galaxy but I think they are on the way, overall I think Tiny is on the right path with Meteor. I also look forward to DDP running on Deno and have some plans for that.

I personally share the exact same conclusion as you do, so I would say welcome back and happy coding :).

PS I didn’t know Firebase has this client performance hit. We didn’t use it to avoid vendor lock-in and to have more flexibility/control over the stack.

8 Likes

@dandv, @alawi, these would be great articles on dev.to or Medium!

1 Like

It does support PWA but not 100% out-of-the-box and you have to provide your custom serviceworker settings.

I have created a dev.to article on how to make any Meteor App a PWA and it involves only a few steps!

Besides that there is still discussion on how to make the serviceworker config right and what PWA integration is good for which use case.

7 Likes

Thanks for writing and sharing this article @jkuester, it is really well-written and I think it should be part of the Meteor guide.

PWA implementation was feasible from day one (although not out-of-the box and required some tweaking). But as I mentioned, we’ve built several PWAs powered with Meteor, they work and scale perfectly, and it is the fastest and simplest way to get mobile apps (with backend) in the market today, the closest alternative would be Firebase, and other backend as a service offerings, but we avoided vender lock-in, we didn’t think that their short-term value (if any) justifies the lack of their long-term flexibility.

However, I really think there are many potential innovations on that front to make that integration (PWAs/Meteor) even more powerful and simpler for the community, we already have some internal boilerplates/patterns for that.

1 Like

we already have some internal boilerplates/patterns for that

I would love to see some best practices and boilerplates on various PWA topics.

3 Likes

Past aside, it sounds like you need to figure out your accounts and build tool.

The full-stack Meteor was abandoned as you witnessed.

I don’t think so, the build tool is webpack (or Parcel) and accounts is PassportJS, he seems to be well researched to not find those. But most developers/entrepreneurs want a decent framework with sensible defaults that saves man hours so they can focus on adding value to their users, and not an Ikea furniture style, do it all yourself micro frameworks, without manual, has missing pieces, that gives you the top of the table and wish you a good luck finding the legs, and with no customer support or coherent community to refer to, meanwhile, you have urgent timelines to meet, without the staff and manpower of Facebook.

I think that is what he was referring to by “rebuilding the car”. But he was probably impacted by the FUD around Meteor’s future and seduced by the marketing of the new shiny JS overly hyped frameworks (Gatsby and NextJS), which I think are React (not Web) front-end only frameworks, with way less to offer than the Meteor ecosystem. Meteor has never been abounded over the last 4 years, in fact, it matured and became way more versatile thanks mostly to @benjamn and some smart community members, however the focus/resources was shifted to Apollo by MDG which has worried the community, and eventually led to Tiny acquisition. Frankly, I think it is in a much better management hands now.

But he can keep us honest here.

5 Likes

I’d put a +1 under almost everything written here. Accounts is just so much less pain than anything else from the JS ecosystem. Meteor is still a very solid choice for new projects, and MongoDB’s query syntax + not having to use an abstract ORM + query generator is a big plus.

My biggest personal concerns right now (YMMV):

  • MongoDB’s focus shifted towards closing its ecosystem and having a lot of shiny vendor-locked-in features, while killing its competition. There is no drop-in DB replacement that I could host myself on-premise if necessary. Some DBs begin to offer MongoDB-compatible APIs, but don’t support the MongoDB geo APIs that I currently use.
  • when starting to grow more products with Meteor, I put a bet on Postgres for Meteor to come into existence at some point so I could migrate when my app grew bigger. It did grow bigger, and now MongoDB is simply not performant enough for my case anymore. The project to support Postgres with pub/sub has been abandoned. Anyone else who’d be interested in reviving it?
  • IMO, accounts needs a built-in way to function as a server for external (non-Meteor) apps. This would allow to deploy more performant components where Meteor is no good fit, but that still need authentication. I know there is accounts.js, but I think authenticating external clients should be a core part of Meteor.
  • Everyone and their parent will have their own k8s at some point. How does Meteor integrate there? What about better support for Dockerfile builds? What about built-in integration with things like Prometheus and OpenTelemetry so you can collect method/sub stats in other APM solutions? Or a bring-your-own-cluster license model to run Galaxy on-premise? What about integration for k8s API and a Meteor.js-based k8s operator boilerplate, for example?
  • Atmosphere packages begin to crumble slowly, packages are not maintained. This is an issue because many of them have (native) dependencies, they won’t survive an npm install anymore with the coming node updates. For meteor projects to stay alive longer, the documentation should replace Atmosphere package usages with npm-based solutions (if possible without native dependencies) where possible.

Looking elsewhere, I really liked these random ideas:

  • the speed and ecosystem of Postgres, which thanks to Zalando can easily run automatically on your own k8s. It’s really a thing.
  • the speed of queries in Postgraphile (not so much its account system security, it’s complete Postgres-based dev flow + per-core on-premise pricing)
  • the TypeScript API + Admin UI of Prisma
  • Airtable. How about a Meteor.js-based community-developed minimal Airtable clone…? This could be crazy good for the whole ecosystem.
  • the apparent Semantic Web lift off. An ‘official’ triple store integrations for lowering impedance between Meteor apps and the Semantic Web could be a huge win for the web as a whole.
4 Likes

prisma is indeed very nice, we are currently building a stak based on

  • nextjs
  • prisma2 + nexus (can even run directly on nextjs to get a full-stack monolith)
  • react-admin + ra-data-prisma for backoffice

this gives you a bottom-up, fully typerscripted full-stack framework, where everything is replaceable and customizable. Only thing lacking compare to meteor is live-updates (still possible to add of course)

1 Like

Agreed, it seems you’ve a successful product, so congrats. Let me try to push back on the concerns a bit.

As of now Meteor is still coupled with MongoDB, so I’d say if you want to use SQL perhaps Meteor is not the best choice. (although I know there is a functional SQL driver and someone was using it for years with pub/sub).

I personally like MongoDB for web apps, I’ve used Postgres and MySQL with Java for more than a decade, and prefer Mongo syntax over SQL, although SQL is really powerful and had many years of optimization.

Where are you hosting your MongoDB?

There are many providers for MongoDB and it serves most of our use cases, also financially they’ve been doing really well, it is a very competitive market with many established players so they must be doing something right. But I do understand the desire for Postgres integration.

accounts needs a built-in way to function as a server for external (non-Meteor) apps.

I think this is straight forward to do, we have several non-meteor apps authenticating with a Meteor server. Perhaps I’m missing something?

I don’t use it, I don’t plan to use it in the near time. I’d rather have DevOps managed by Galaxy. For some apps, I have some docker containers running Meteor apps on DO, others on Galaxy. So what exactly am I missing here?

The advice here is to use npm packages directly and only use Atmosphere when requiring some features that can’t be done in NPM. Atmosphere can define client/server targets which can’t be done on NPM, but I mostly use NPM and only use Atmosphere for very specific packages.

I was given a course about the semantic web at university 15 years ago, back then the professor said the exact same thing, he said Semantic Web is lifting off, instead we got Facebook. Maybe this time it’s better :slight_smile: .

  • NextJS: is a really confused famework, first they marketed as a SSR framework, then Static Sites framework, now they’re calling it a hybrid framework. It’s a framework that can’t make up its mind where to best render a page next, and which next hype to follow, so they called it NextJS. I personally think, it is an overly hyped framework and good for basic blogs and CMS only.
  • React-admin: we built our own, not too hard to do with React/MUI and we prefer the flexibility.
  • Prisma2: I like it, but it kinda reminds me of hibernate in Java. Generally, I’m not a big fan of ORM, I’d rather have less abstraction and only add middle layers when absolutely needed to avoid unnecessary defects/complexity.

It is not surprising that many entrepreneurs and even senior developers complain about JS fatigue. Just look at the list of tools mentioned in this thread alone and put yourself in the perspective of newcomers and you’ll have a good understanding of why Meteor is a solid choice for many. At the end of the day, many of us want to create value to our customers and generate profit not just fiddle with new tech.

7 Likes

I have extended the rocketchat:oauth2-server to work with the latest node-oauth2 package: https://github.com/leaonline/oauth2-server

Based on this plus some extras I am currently building a full authentication server, that is used by our resource servers. Of course authentication is part of this: https://github.com/leaonline/leaonline-accounts

It is currently still strongly bound to the project it servers but the goal is to make it generic enough, so we can use it in the future as a full oauth2 server for any project.

4 Likes

your statements here about nexjs and prisma are overly simplified and show a lack of understanding, but its probably not the right place to discuss that here. I just wanted to show some alternatives here, that are in my opinion more flexible and future proof for bigger apps/projects than meteor.

2 Likes

Perhaps I used NextJS a bit, it is a very opinionated React framework, and I think I understand what it offers well but not Primsa (I think Prisma, pivoted from just GraphQL ORM, it seems like an abstraction layer on top of your data source, again I have not used it, so I don’t know it, but didn’t feel the need for it yet).

I have been building web apps for long time and I don’t find their offering appealing to me or much value to our users.

@macrozone, we have a React app with SEO, SSR for the initial page load, code splitting at the routes using dynamic imports, modern JS syntax for modern browsers (differential loading), with CDN on front, loads under 0.8s, with real-time, and it’s a very large app, so what exactly can NextJS offer more to our users? Can you please name one feature that our users might be missing and is offered uniquely by NextJS? I think it’s very relevant to the question in discussion.

I tend to trust my intuition not the marketing hype, but maybe I’m wrong and I’m being too harsh on them, you can keep me honest.

3 Likes

Thanks, this is exactly what I meant. Kudos to you!

Atlas, but my issue is not the hoster, but MongoDB itself. I do a lot of geo-related stuff where PostGIS is a better fit (but using PostGIS from the beginning would have meant a too-slow start for my apps).

I missed the oauth package mentioned above. Neat!

Kubernetes is not for everyone, but there are things that you don’t get outside of its ecosystem. postgres-operator, cert-manager, external-dns, tracing + APM solutions, GitOps, CI/CD, automatic feature branch deployments, just to name a few things… it helps to build systems like Netlify, Galaxy or with complex container-based parallel workflows, e.g. to move around bigger data. Here is why Galaxy announced that it uses it.. It comes at a price: It’s a time-sink + rabbit hole. Hosting on Galaxy is a good deal if you can’t afford the time to learn and set all this stuff up correctly, which is quite some work.

1 Like

Thanks for the links! I will take a look at that ecosystem, it’s interesting.

@hypo I’m curious about what prompted you to manage/create your own cluster using kubernetes as oppose to letting a provider like Galaxy handle that?

It’s hard to believe that Mongo performance was an unsolvable issue. Are you using oplog or change streams? Why haven’t you adopted Postgres? Have you considered ElasticSearch for geo searching?

What is k8s?

2 Likes

Definitely not on Medium for me!

Can you expand on that? What kind of flexibility was desired (any of these)? I assume you’ve built your own auth solution, but was that worth the numerous pitfalls? Did you have the resources to run a proper security audit? (Not that I expect a negative answer on a public forum : )

Parcel is decent, I’ve been a fan. I did look at Passport.js and Accounts.js and as a solopreneur at the time, I preferred to outsource the security given then auth pitfalls I linked to above.

DB-wise, I’m totally fine with MongoDB and haven’t found compelling reasons yet to desire Postgres or a RDBMS instead. If you want to do joins, you can use $lookup in Mongo.

I haven’t seen anyone mention GraphQL though. I really like its clean and powerful API for clients, and Meteor seems to be agnostic of it, which is a shame considering that Vulcan.js marries Meteor with GraphQL and React.

On the other hand, I suppose I could just build the GraphQL server outside of Meteor, so after checking out the PWA solutions listed here, my next project might start with and stay with Meteor. How’s the Time to Interactive nowadays? Or do folks serve public pages separately?

2 Likes