Page 1 of 1

net-eval multi thread

Posted: Thu Sep 27, 2012 9:59 am
by 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

Re: net-eval multi thread

Posted: Fri Sep 28, 2012 1:40 am
by iNPRwANG
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:

Code: Select all

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