Hello, we are currently using V8 in a kind of server-side scripting engine. Javascript is used for implementing business-level logic. V8 is nice, really! It is fast and well structured. But... Suppose we want to run a 1000+ small scripts simultaneosly. How can we achieve this? Run 1000+ processes like Chrome do? Well, not a smart idea. So we have a single process with 1000+ V8 contexts and there can be only one script running in V8 at the moment. If it is somehow slow we are stuck, others are waiting.
I truly understand that V8 is destinied for client-side scripting in Chrome. No doubt! But is adding multi-thread execution of code is very very hard? Context are indepent, right? Let's say we compile javascript code still in one-thread model. What about running already generated code? Let's say there's no eval() in it. I didn't sink into V8 source codes deeply and perhaps I don't understand a lot of its architecture. But still script has it's (already built) context, script has it's (already built) code, script has it's execution stack. What is shared? Some internal routines with memory managment? Let's say we put a simple mutex on access to memory managment routines. Is there anything else V8 should do to start running multiple scripts at the same time in one process? Is it so hard to add some kind of C++ definition MULTIPLE_THREADS to V8 source code and start locking not on the scripts-running-level, but on internal-management-routine level? I think lot's of people using V8 in similar projects would appreciate this. Thank you, G. --~--~---------~--~----~------------~-------~--~----~ v8-users mailing list [email protected] http://groups.google.com/group/v8-users -~----------~----~----~----~------~----~------~--~---
