We are currently working on an API for an existing system.
It basically wraps some web requests in the form of an easy-to-use library that third-party companies should be able to use with our product.
As part of the API, there is an event mechanism where the server can call the client back through a permanent socket connection.
To minimize the load on the server, we want to have only one connection to the computer. A socket is currently open for each process, and this can cause loading problems if you have multiple applications using the API.
So my question is: if we want to deploy our API as a single standalone assembly, then what is the best way to fix our problem?
A couple of options we were thinking about:
- Write out the COM object of the process (I donβt know if this works in .Net)
- Include the second exe file, which is required for events, it would have to have one instance on its own and open a named pipe or something to communicate through several processes.
- Extract this exe file from the embedded resource and execute it
None of this seems perfect.
Any better ideas?
source share