Ideas Into Software

Musings on writing code

All posts tagged javascript

Opting Out of Contenteditable Reactivity in Meteor

It's a sad fact that Blaze (Meteor's reactive UI library) doesn't play particularly well with contenteditable elements. The corresponding ticket in GitHub is marked as closed but the issue itself is unfortunately far from resolved. This makes implementing e.g. autosave for contenteditable elements quite annoying - say you're throttling the keypress event and saving every two or three seconds.

Limiting Parallelism In Meteor

In the latest blog post we've touched the topic of parallelism in the Meteor framework using node-fibers. We've shown how to do multiple HTTP requests at the same time. As we've seen, unbounded parallelism in Meteor is relatively easy. There are, however, cases when you wish to limit the degree of concurrency (akin to async's eachSeries). For example when issuing

Parallel Execution In Meteor

Meteor's async execution model is based on fibers which is essentially a patch to V8 providing blocking calls making it somewhat harder for a programmer to release zalgo. Fibers work in a way similar to ES6 generators/coroutines (even though generators are syntactically more explicit); when an asynchronous call is made, the running fiber voluntarily gives up execution, suspends and