4

I have a node.js application and a C# algorithm. The algorithm puts out 15 numbers that represent symbols on a digital slot machine. The node server is posting and getting data from Firebase and the digital slot machine is doing the same on the same table.

My question is how do I get the node server to run or get information from a C# algorithm? Everything else is written in Javascript. Do I have to rewrite the algorithm in JS to integrate? I tried using a node module called edge.js but every time I tried to run my server there were compilation errors.

Any help is greatly appreciated.

cbanowsky
  • 393
  • 1
  • 3
  • 13
  • 1
    http://www.infoworld.com/article/2917047/microsoft-net/developing-applications-with-nodejs-and-c.html – Marc Jun 22 '15 at 12:50
  • I've had quite a bit of luck with Edge.js. Can you post what you've tried and maybe I can help resolve? – tier1 Jun 22 '15 at 14:54

1 Answers1

4

I have an solution for your problem .You can write an console app and then call it from nodejs. Can look this url Execute an exe file using node.js. After the job writes all data to database, look to the table read from it via nodejs.

EDIT: Your solution is a web service. Kindly check WCF rest. Therefore, every request calls c# code from http protocol. Then you can get the necessary data from the web service.

omerv2
  • 81
  • 5
  • will this run on Linux using mono you think? Or will I need to host my application on a Windows server? – cbanowsky Jun 22 '15 at 13:08
  • okay than new scenario. c# app is a windows application , every 3 seconds(or less) reading data from database. nodejs app is writing request to database with datas which is need for c# app.than node js service is working frequently to database for getting result for c# application. – omerv2 Jun 22 '15 at 13:24
  • they are different platforms and different operating systems. if u have a c# application than u can call web services . – omerv2 Jun 22 '15 at 13:25
  • I am unsure if firebase has a C# SDK – cbanowsky Jun 22 '15 at 13:26
  • First off all become clearer. U have a business logic from c# right ? And anything else base jscript. If i need different platform and different operating systems. U must use web service certainly. – omerv2 Jun 22 '15 at 13:31
  • I think this might be overkill for this particular issue. – tier1 Jun 22 '15 at 14:54