On 10.05.2008, at 18:15, Vlad Seryakov wrote: > What will happen if 100 threads will send commands at the same time > and > those commands will be more complicated, not just return? > > Main thread will serialize them, i guess. > Does not it seems like global lock in Lua? > Will it scale the way you want it to scale?
I believe it will. It is all compromise and it sacrifies speed for memory, obviously. But you could decide how much memory you burn and how fast the system is by tuning the number of workers. At the moment we cannot tune much. All our interps are created equal and all are fully loaded. I would create a number of those heavy interps upfront and make "connection" threads as lightweight as possible (just basic Tcl commands plus ns_ commands). I would instrument the unknown command in them so all that gets executed in the connection thread, gets really excuted in one of those pre-started things, unless it is the ns_ or regular Tcl command. This requires certain conventions in the app but it would I believe scale very well. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel