How can you call a Lisp program from a Rails application? ... For example, let the end user enter a block of text in a Rails web application, have text processed by the Lisp program, and return the results to the Rails application?
Another easy way is to start Lisp HTTP server and contact Lisp from outside through HTTP requests.
There are several ways that come to mind:
Run the lisp program with Process . Communicate with the lisp program using standard input, and the lisp program prints the result to stdout.
Do the same as above, but share named pipes . Let your Ruby code write data to a named pipe, then lisp reads from that pipe and writes data to another named pipe, which you then read in your Ruby application. The lisp program can run in the background as a daemon that checks the data on the incoming channel, or you can run it as needed using the Ruby command line utility commands (as described above).
Find the Ruby Bridge - Lisp. I have no experience with such a bridge (and I donβt know if it exists), and I think that these two mechanisms are simpler, but your mileage may vary.
CL-JSON supports JSON-RPC.It is very easy to set up a web server like Hunchentoot to have a Lisp-based web service, which is all that JSON-RPC says (like this ).
This will depend on how often this happens.