Node.js for .NET.

I know about projects like Edge.js that allow you to use C # and Node.js, but I'm talking about something else. Is there a library for C # that allows you to create scalable, non-blocking event servers with a single thread, asynchronous events in C #, similar to servers that you can build using Node.js? A library that also has a unique Node.js event model, single-threaded for user code, multi-threaded for files / network events, and native code (correct me if I'm wrong). Of course, I know about ASP and WCF, and OSS projects like this , but I'm looking for something that gives you performance comparable to Node.js, a view of the Node.js port in C #. Do you know about any such library and what it needs to create it?

Single or multi-threaded?

If you need one managed process with multiple threads, all of its work using APC and completion ports, you will need Manual code. Construction would be risky and difficult. - Sam Salton

It is plentiful that single-threaded code simplifies code writing, since you do not need to work with locks and mutexes. There is only one thread that reads / modifies program state data, which keeps things simple. All calculations take place on separate threads and return to the main thread when the results are ready. All file / network events fork and return to the main stream after the op operation completes.

Related but different questions:

Perhaps useful projects:

+4
1

, :

, VB.NET #:

https://github.com/perrybutler/dotnetsockets/

(EAP), IAsyncResult (IOCP). / ( , ), , TCP / , , Protobuf RPC.

"netcode" , . , . , - .

, . !

+1

Source: https://habr.com/ru/post/1528921/


All Articles