How to convert batch application to server app?
I have an application that performs some processing task in batch mode: data in, processing, data out. The application can be accessed through a well-documented API but is not thread-safe -- one cannot run the processing function in two threads concurrently.
In order to make that processing accessible to a program written in another language I would like to encapsulate it into some form of server.
I would like to find some minimum overhead solution where the other program sends the data to the server app in some way, waits for the processing to complete and reads back the result. One option would be to use the HTTP protocol with a POST request, another to write the data to a database row and send some command over a socket.
My main problem is: which solution is the easiest to implement and use and the one that allows to serialize the processing with the least effort. The solution should make it easy to prevent deadlocks or similar nuisances.
Are there some standard patterns for doing this or what would you Wizards recommend?