I have a node.js website (db is mongodb), one of the 2 requirements are a very complex function that calculates a "shopper score" based on several factors which is queried in the database. Second requirement is an affinity basket analysis which also requires some complex algorithm calculation.
My preference was to write them in C# and pack it as a dll. I saw this post but its too old - Using a .NET DLL in Node.js / serverside javascript
Is there a latest technology/interface which allows node.js javascript to call a .net dll file and get a return value back? The site is hosted on windows server.
OR
is it better to write the algorithm in node.js javascript function?
UPDATING the post based on comments:
There are couple of reasons for thinking about .net dll.
Security- there are cases where we have to deploy/host the node website on client's server. JS code is open, atleast the dll will be compiled (understand its not unbreakable but atleast it provides some level of obfuscation).
We have an existing dll which receives messages, processes and updates database, Looking at long term roadmap, we thought the dll could trigger updates to active users based on certain
Thank you!