net-eval multi thread

Started by dexter, September 27, 2012, 02:59:06 AM

Previous topic - Next topic

dexter

I have a little program

need to to send net-eval to the main process

time by time



But I found out that, the main process is a single thread for doing net-eval



so It will frozed ,if too many net-eval requests sent to the main process



Will newlisp have a multi thread for doing this job or never will be ?





Thanks

iNPRwANG

#1
My solution is use a http server which has the reverse proxy feature, such as Nginx.



First, start multipile newLisp instance as local http servers, let them listening for http request.

Second, configure the Nignx as a reverse proxy, it can hold the http request from user, and dispatch the request to each newLisp instance, the Nginx may use "load balancing" to process the request.



The code of Nginx config file in http segment like this:

upstream localhost {
server localhost:4242;
server localhost:4243;
}