This is a project developed to copy in .Net the behaviour of Node.Js. It's not a direct port since simply I prefer the approach proposed here :) . Nothing against Node.Js developers, i love their work!

The idea is to leverage on the usage of "Coroutines" with the simple implementation offered by the C# IEnumerable and IEnumerator. I could have made something based on the new await and async, but I like to loose myself in the darkest and deepest forrest, for the sake of knowledge... or masochism sometimes.

The result was to develope a complete web server and to port MVC Music Store to this webserver.

The sample can be downloaded from NodeCsMusicStore repository on Github

Result, with JMeter and 150 concurrent users on 4 pages accessing the local database on an i7 quad core with 8 Gb ram. With 160000 request in total. Here you can get the test i used. The IIS version is the original music store, with all updated (MVC, JQuery) removing the SqlCe database (it reached 90 req/second with that...) and moving it to the database used as standard (with the System.Data.Entity.SqlServer.SqlProviderServices) with a file based data source.

All this without any kind of cache enabled.

For some other results you can check this article from Eli Weinstock-Herman.

Just try it at home!


Well, firstly I was curious to understand if the whole thing was feasible without using the new async and await C# keywords. Having seen node.js and loving it's way of using resources, i thought to do something like that in C#, adding a plugin based infrastructure and the support for the already defined .NET MVC structure.

I thought to reuse part of the Cassini project, but there were too much refactoring involved. And i started something new, thanks to the HttpListener and the RazorEngine

After this (being really interested in LockFree data structures and, in general, to thread safe data structures, i thought that it would be nice to have a system where, for example:

All i did was something like what is made by the async/await keywords, but extending it beyond the tasks, like node,js does( Decompiling Async/Await written by the author of IlSpy).


Release 1.1.0

Release 1.2.0


Feel free to ask (with an explanation) to change my priorities! All these are more or less indipendents between them



Last modified on: February 28, 2014