I am coding a web application in PHP and it has some performance intensive parts that I'd like to rewrite in a compiled language. I know that I could probably get this done more easily just by writing a C++ extension for PHP, but I'm a bit too spoiled by managed languages like C#, so I'd like to avoid C++ if possible.
If I wanted a PHP script to execute a function inside of a running C# (on mono) process, how could I do this? My first guess is to have PHP open a socket to the C# process, do the work, and close the socket, but I think that would add unnecessary overhead.
Are named pipes something that could solve this problem? If so, do they work on windows (my development machine), and how do I use them from C#?
If not, what other options do I have?