Pregunta

I fairly new to node.js and I don´t feel 100% comfortable writing business logic in node.js.

I have to support MSSQL as Database-Backend, so I came accross Edge.js. Subsequently I thought maybe it could be a good Idea writing my DataLayer and BusinessLogic as Edge.js modules.

Does anybody have experience with this approach? Are there any limitations?

¿Fue útil?

Solución

Edge.js (http://tjanczuk.github.io/edge) was created primarily to help Node.js developers in efficiently performing tasks that Node.js is not good at, for example:

  • running CPU intensive operations (which Edge.js enables one to do on dedicated CLR threads),
  • accessing functionality that is not available or not mature in Node.js (e.g. accessing MS SQL databases, which Edge.js enables you to do with ADO.NET),
  • efficiently integrating pre-existing .NET components or business logic in new Node.js applications.

The primary cost of using Edge.js is in increased memory footprint, since your node.exe process is now hosting two virtual machines instead of one: V8 and CLR. However, that disadvantage becomes irrelevant if your alternative is to run .NET code in a separate process. Compared to the alternative of running .NET logic in an external process, Edge.js has the advantage of dramatically reduced latency (see http://bit.ly/1hQseHY), and simplicity (one process instead of two or more).

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top