Client-side implementation of fibers in JavaScript.

AFAIK meteorjs uses node-fibers , but the github page states that it is only server-side and v8 (or it is not).

  • How does Meteorjs implement non-blocking, synchronous, like api, on the client side?

  • Is it compatible with other browsers than chrome?

I would be very grateful if someone could point me to a clean introduction of fiber fibers or explain how they work (do they have their own cycle of events?).

Any reference to a github project for working on the client side on the client side will also be appreciated.

This is XMAS after all :)

+6
source share
4 answers

The node-fibers project is a Windows-only server-side extension to Node.js implemented in C ++. You will never see it available in a web browser.

+3
source

JavaScript is single threaded. If you want to implement non-blocking I / O, you will have to implement a node-style message loop and an asynchronous I / O library. By default, all client-side I / O is synchronous, although Meteor and other libraries provide functions for callbacks.

Yes, the client-side Meteor implementation works in several browsers except Chrome.

+2
source

Try JSCEX ( Windjs )

Wind.js is an advanced library that allows us to control the flow using simple JavaScript for asynchronous programming (and more) without additional pre-compilation steps.

It worked both on the server side and on the client side.

0
source

I believe that on the server side, everything is purely synchronous with Meteor, thanks to MiniMongo. Thus, an asynchronous callback is not required, or, to be more precise, Meteor does not require waiting for the update callback from the server to proceed to the next instruction, thanks to MiniMongo, which responds synchronously.

I did not check everything I just said while studying the source code, but I can’t imagine how it can work differently.

EDIT

Not yet plunged into the source code, but this section of the Meteor manual seems to be moving as I thought.

0
source

All Articles