Node-fiber NOTE OF OBSOLESCENCE

I’m a big fan of this library direction.

I personally think that’s the right architecture/path forward, and this is how I’m developing some of my Meteor apps, decoupling client from sever and offloading the caching and updates to each view layer framework. In the case of React for example, there is useQuery and SWR doing very close to what tracker/minimongo are doing.

This could potentially evolve to be the Meteor 2.0 client data layer, a thin client downloadable from NPM and pluggable to any front-end framework or client.

1 Like

Its good to note that its pretty much a work in prigress package. I’m fully committed to it though. :slight_smile:

5 Likes

If there is an agreement on this direction I think many will step in to help building it.

My take on building survivable open source projects is the same on my viewpoint for larger projects.

  • Composability and layering as the highest priority

Fibers is not a problem, Minimongo is not a problem, DDP is not a problem. In fact, they are great. What makes them less great is that they can’t go without each-other in the current setup. All of these packages are tightly coupled. Removing one will destroy the other.

We need to start focusing on decoupling features, have the individual packages be cross-compatible with the entire ecosystem and leverage Meteor’s build tool with smart packages to create drop-in features for Meteor.

I’ve started the DDP package for that reason. To have something that allows me to optionally connect with other very popular framework and have the best of both Meteor and for example Nuxt and Next.

  • Composable
  • Layered (low level fast changing API vs higher level less changing till never changing API’s / facades)
  • Sprinklable (Optional low level integration for Meteor into existing ecosystems and tools)
  • AWESOME documentation for new and experienced devs

This is what makes Vue so great. It has been rewritten in the background without actually changing a lot to its high level facade.

12 Likes

by starting this effort on the right direction (i.e Meteor 2.0 branch), the meteor team/community will surely give a very strong social signal on their intention to keep Meteor around for a very very long time. And I hope benjamn has to some interest in this task

2 Likes

The former maintainers of mdg worked full time on that, they got paid for that. It was their business. Tiny now took over this business.

The point of tiny acquiring meteor was to keep it alive for current users, to maintain galaxy, give support. I don’t think that they have the intention to do something new. A non-backwards compatible version 2 won’t be accepted by the community, not without a clear migration plan.

The only way out is to slowly reduce the usage of fibers. First in the core and core packages, afterwards i user-space, which is quite hard as explained above. It is not possible to remove fibers (co-routines) without breaking changes for everyone. So there is a long way until a breaking meteor 2.

Its probably easier to either just maintain fibers (its anyway unclear whether it will break at all) or to deprecated the whole pub/sub/collections data-layer (which has other flaws than fibers in my opinion).

To their credit, Tiny and the new Meteor team are way more communicative and in touch with the community than MDG so I don’t think we need to speculate too much on their position and direction.

I agree and understand, that is why it is Meteor 2.0 it will be breaking change but given the author warning, I think it make sense to invest in that direction slowly, again it is not urgent but desirable direction. And frankly Meteor has been on this path for several years now (since they open up the view layers), although I do see a path technically of migrating existing classical Meteor apps, and I think it can be done gracefully, also put this in perspective, this discussion is long-term planning and due diligence, not to cause any additional FUD for newcomers etc.

@macrozone what is your position/recommendation on this? it is not clear to me, there are really two choices here as far as I can see (feel free to suggest others):

  1. Meteor team (and whoever else happen to use Fibers) invest in maintaining Fibers after Node14, despite the authors warning and hope for good, while slowly minimizing the dependency on Fibers in case it broke and revisit this discussion again when it does break and Meteor needs catch up to latest Node, that is the pragmatic approach, and I think it is ok. I’ve a feeling that this library won’t break in any major way, but the author warning is concerning, that is why I suggested that the Meteor team reach out to him try to get more info.

  2. Start the migration effort soon on a breaking Meteor 2.0 branch and use this an opportunity to modernize other aspect of the stack well

I think anyone who has been using open source (and specailly node/npm) for some time has been in similar situation. Again I see this as opportunity now and that is why I switched my view from maintaining to migrating, but I’m keen to see what others think.

2 Likes

i wouldn’t start a meteor 2.0 branch. With typical semantic versioning, you would increase this number on a breaking change and its not the time for a breaking change.

i would only maintain fiber if and when it won’t work for any future node version.

instead someone should go to the whiteboard and sketch out how a fiber less pub/sub could work (giving up isomorphic code? working with promise in a smart way?) and provide a new api that does not rely on fiber without removing the old way of doing things, but try to deprecated it (and warn).

Personally i have only one bigger project that uses pub/sub anymore and tend to migrate to graphql in that project (if i need to migrate at all). I would advice to at least consider switching to another (existing) datalayer as an option.

2 Likes

Hence why I started a DDP library. Its client only at first, but maybe I should aim to build a server version as well. A bit like how the Apollo Server and Apollo Client work together

1 Like

I believe when most of us mention MDG we mean whoever currently responsible for codebase and its open source roadmap. While it’s community-powered and open for contributions, it isn’t open for merging by contributors.

1 Like

Oh, for sure. I said that in case you meant you were contacting the actual previous owner of Meteor (they are still MDG, afaik). I see the new owner, Tiny, mentioned all the time since the acquisition.

I genuinely thought you didn’t know. :slight_smile:

1 Like

:ok_hand: just want to make sure we are on the same page, and we are :slight_smile:

1 Like

Just bumped into this presentation: Why Fibers Make Sense For Meteor

4 Likes

Hey @dr.dimitru we respond to all applications, maybe you are sending to an old email? Not sure.

Always remember, MDG is not the owner of Meteor anymore, Meteor Software (part of Tiny capital) is.

You can send messages to us at hello@meteor.com :slight_smile:

1 Like

Using Fibers makes some server side async code match the synchronous client side code style, but if we were starting today, I’d rather make both server and client use async/await instead. Then it’s isomorphic without Fibers.

My 2 cents would be to start to work toward removing, or at least reducing the prevalence of Fibers on a package by package basis. This can be done in a way which would preserve backward compatibility for as long as possible, by maintaining the existing Fibers branches of various packages, and doing a major version bump (or even forking and creating new names for packages) for packages that would migrate off Fibers. Of course, Fibers would have to be removed from core. There is a large body of packages that use Fibers (or more specifically, use packages that rely on Fibers), but Meteor’s versioning system can accommodate that, since everything is locked to Meteor and/or package version number anyway.

My primary motivations are 2: 1) I’ve noticed Fibers trip up new users quite a bit. Many newbie questions are about interactions with Fibers. 2) They aren’t supported by React’s SSR and might be causing memory leaks (I haven’t been able to confirm presicely that Fibers are the cause yet - I’ll eat a lot of crow if it’s from something else…).

/2 cents

3 Likes

Hey, as a developer I’m not a big fan of big breaking changes or full re-writes, I believe software can be written in a way that it can live for a very long time.

That said, our plan here on Meteor Software (Tiny) is to keep Meteor as compatible as possible without compromising quality, I know that is a hard task but this is what we are trying to do in every case, including Fibers.

Then our plan is to study the direct impacts of removing Fibers, we probably already know the answer but we want to confirm.

The solution I see for now is to provide a way for people to avoid Fibers but keep Fibers working for existent projects, as @alawi said unless we have a patch breaking Fibers we still have time and we can see how Fibers is going to behave on Node 16 as well before Node 14 is close to an end.

Our focus in the core now is on HMR (I’m coordinating with @zodern on this https://github.com/meteor/meteor/pull/11117), Tree-shaking (https://github.com/meteor/meteor/pull/11164) + Dead code elimination (https://github.com/meteor/meteor/pull/11107). I believe these 3 PRs are not that far from being merged. Then we can start to think about other big tasks in the core, like Fibers replacement or alternative API.

One thing I can ensure for all of you, I’m also a Meteor user, I also have Meteor apps in production (https://www.bemarke.com, https://app.archlive.com.br are just a few public examples) and then we are NOT going to do anything that is BAD for Meteor users or for companies relying on Meteor to make money. As some people mentioned in this thread, we are open to conversation, if you have any questions feel free to reach me out here on private or also on our Community Slack.

We don’t have anything to hide. Our roadmaps (Galaxy and Meteor) are public and we want the best for Meteor in all possible ways. As I said in the podcast, Tiny bought Meteor because we believe in Meteor and we are going to make Meteor better and better.


Also, a different discussion is about semantic versioning and Meteor, I believe Meteor is not bumping the version as frequent as we should, if you look to other big frameworks/platforms they are bumping the major version all the time, that is good to show for people that are not using the platform everyday that we are moving forward, that we are adding things. That (bumping the major version) is not allowed only when we add breaking changes. It’s the opposite, if you have big breaking changes you SHOULD bump your major version, if you don’t, you CAN bump your major version as well but you don’t HAVE to.

Meteor is a platform and not just a library so we can make major bumps even trying to keep our breaking changes at minimum, as we are going to do. What I mean by that is that maybe, we are going to have Meteor 2.0 soon, and then Meteor 3.0 and then 4.0 and so on. Meteor is a great platform, up-to-date with all major dependencies and we are still using Meteor 1.x for all the releases, this is not good IMO. If you are not using Meteor everyday and you see Meteor is still on 1.x as it was many years ago you are going to conclude that Meteor is dead and we know that Meteor is not dead at all.


Sorry for the long post, to wrap up:

  • We are confident in the future of Meteor, keeping Fibers or providing alternatives. Meteor is not going to die because of Fibers.
  • We are confident that we are one of the best choices in terms of productivity and stability for many types of web-based apps (including Hybrid Mobile apps). And we are going to be even better soon (HMR, Tree-shaking, etc)
  • We are confident that Galaxy will continue to be the best way to have Meteor apps running in production. And Galaxy is also going to receive new updates (as it is already receiving many) for a long time. Cool features for the community is also in our pipeline, trust me :wink:

How you can help?

  • Promote your work with Meteor for your friends and in social medias.
  • Help triaging issues and reviewing PRs.
  • Propose ideas and constructive threads in the Forums like this one.
  • Reach us out! Don’t be afraid, we don’t bite. Are you afraid of something? Talk to us. Do you have a question? Talk to us. Our goal is to help and to improve Meteor.

See you!

29 Likes

I’m also checking from time to time the progress on this library with Spider, it’s cool to have something on NPM that could reproduce DDP protocol and Meteor features. Let’s see how this ends up :wink:

15 Likes

Thanks @filipenevola for sharing your insights. I also think that backwards compatibility is important.

On the other hand, when I was still a noob with Meteor, Fibers actually confused me a lot. I remember numerous occasions where I ran into the mysterious “code has to run in a fiber” error. Nowadays, I know how to fix this, but it still feels weird.

I think the best option would be to mimic Fibers on top of async/await, if this is possible, to let people gradually migrate whenever they have time to do so.

1 Like

Totally agree. The fiber error can also turn people off of Meteor entirely because it feels very odd when you first hit it.

2 Likes

I would even go as far as saying they are a pretty bad design concept, at least from a modern perspective. They “hide” the fact that some code has to run asynchronously, without any clue that this is the case. With async/await, you are pretty aware of this. With Fibers, you have absolutely no clue when a method is actually awaiting something. Of course, it’s easy to state this in hindsight (back in these days, there was only callback hell), but it’s another reason to slowly migrate.

1 Like