I'm starting my work an a school full stack project and the NodeJS & React stack is a requirement. However, I have an algorithm written in C# which I need for this project. I'm creating an app where people upload MIDI files and the algorithm analyzes the MIDI and produces instructions how to play the song on a guitar (or other string instrument e.g ukulele).
The problem is that if I have a NodeJS backend I have no idea what is the best way to utilize this algorithm. My options are:
- Rewrite in TypeScript (not a fan of this option)
- Containerize the algorithm
- Host the algorithm as it's own web service with a single API endpoint
- WebAssembly??
- NodeJS C++ addons? (I'd much rather rewrite in C++)
The reason I don't want to use TypeScript for the algorithm is that it's not a great fit in my opinion. The algorithm is almost entirely bit operations and minimal size structs with bitmasks to enable efficient copying of data (it's essentially a search algorithm). I feel TypeScript would limit my ability to improve and extend it since these things are arguable easier to implement in lower level languages.
I'm asking for advice how to proceed. I will (most likely) be using Heroku as a hosting service and I have no clue which of these options, if any, would be the best choice. Any and all advice is appreciated.