Hi. Definitely no problem in posting this, good on you for digging it up. We’re making this code available under the AGPL, even if not all the proprieties are in place yet.
This code was handed to me by the previous developer on the project, and, as you might imagine, it did keep occasionally throwing some memory management exceptions :-).
Back then, it was a lot of boilerplate for nothing, so i replaced the C# server with a python server, and it just invokes swipl with some json and swipl parses that and eventually prints result json back
The project has since evolved, and the question of efficient two-way channel to swipl is on the table again, so at some point, maybe i will pick up the pieces…
I think GitHub - rla/node-swipl-stdio: A Node.js interface to the SWI-Prolog communicating over stdio. illustrates the tradeoffs well.