Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've found the traditional synchronous approach I am familiar with from Ringo (http://ringojs.org) a better fit for general purpose server side work, so I've made it possible on Node with the help of node-fibers.

Common Node (https://github.com/olegp/common-node/) gives you the best of both worlds: it's easy to develop in & debug just like Ringo yet has low memory usage and is easy to integrate with existing Node libraries.

Here's a very simple CMS I wrote in it: https://github.com/olegp/mcms

Here's a canonical blog example that also shows the use of the synchronous Mongo driver: https://github.com/olegp/notes



> I've made it possible on Node with the help of node-fibers

Cheating! It's not in core. Yes, it largely solves the problem at hand, but we're not talking about node + fibers or even the node + features they're currently working on. We're talking about node. Node doesn't have fibers. Although I wish it did! Fibers really don't belong in the user-space ...


They work in user-space and are portable, so I don't see the problem.

Also, even if one opposes the idea of co-routines due to the problem of not knowing which function will yield, there's no denying that they provide one of the best current solutions to the flow control issues with a clean upgrade path to generators when those become available in V8 in 18 months or so.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: