I think i've read something related to this before. I don't
remember if it was a project, an article, ... I have some unrelated Groovy scripts started by different process at different times. If the script X is running and someone starts the script Y, I want to reuse the same JVM instance. It will be a kind of GroovyServ (http://kobo.github.com/groovyserv/), but I'm looking for a pure-Java implementation because we have all kind of OSes here: Windows XP/Vista/2003, some flavors of Linux, HP-UX, ... I'm aware of: 1. All funny things that can happen when running those scripts in a shared JVM :-); 2. I won't be able to use groovy.sh or groovy.bat, because they aren't prepared for this kind of "joining in" feature; 3. I can develop a "smart" Grails (or Java) server to do something like that. I really don't care about the slow(?) startup of scripting languages (in general), because we are talking about long running processes. I'm just worry about 100 or more concurrent scripts starting 100 different JVMs on a production server :-) Is there any ready-to-use solution/tool, for this kind of problem? Thanks in advance. Best regards, Daniel. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
I would define a service somewhere that executes Groovy scripts, and then have all of the processes that normally spawn these scripts use the service as well. Then that service could be one (or more) processes.
In my mind, I am thinking a synchronous message service would be good here. Do you have any other architectural components you are using? EJB? Spring? JMS? ----- Original Message ----- > I think i've read something related to this before. I don't > remember if it was a project, an article, ... > > I have some unrelated Groovy scripts started by different > process at different times. If the script X is running and someone > starts the script Y, I want to reuse the same JVM instance. It will > be > a kind of GroovyServ (http://kobo.github.com/groovyserv/), but I'm > looking for a pure-Java implementation because we have all kind of > OSes here: Windows XP/Vista/2003, some flavors of Linux, HP-UX, ... > I'm aware of: > > 1. All funny things that can happen when running those > scripts > in a shared JVM :-); > 2. I won't be able to use groovy.sh or groovy.bat, because > they aren't prepared for this kind of "joining in" feature; > 3. I can develop a "smart" Grails (or Java) server to do > something like that. > > > I really don't care about the slow(?) startup of scripting > languages (in general), because we are talking about long running > processes. I'm just worry about 100 or more concurrent scripts > starting 100 different JVMs on a production server :-) > > > Is there any ready-to-use solution/tool, for this kind of > problem? > > > Thanks in advance. > > Best regards, > > Daniel. > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
In reply to this post by Daniel Henrique Alves Lima
Hi, Hamlet. I've inadvertently made a tricky question and I
apologize for that (it wasn't my intention). I'm trying to replace the usage of *nix shell scripts, Perl scripts, Python scripts, ... by Groovy scripts. But any JVM 'language' has a limitation for some cases: The JVM itself :-( If I start a lot of JVM instances, the consumption of memory and CPU can be prohibitive. For synchronous execution/processing, I believe the 'server' can be written using Java/Groovy, but the client need to be written using something else (like GroovyServ does) or I'll go back to the original problem in the end. I need to think more about all this. Thanks. Best regards, Daniel. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
Free forum by Nabble | Edit this page |