[PHP-DEV] Re: persistent java virtual machine under PHP

2002-12-05 Thread Akos Maroy
Ivan Ristic wrote: How is a persistent database connection handled then? e.g. in the mysql module? Apache 1.x pre-creates a number of server processes. Each process handles a certain number of requests (one at a time), and then dies. It is then replaced with an another server

[PHP-DEV] Re: persistent java virtual machine under PHP

2002-12-05 Thread Maróy Ákos
Ivan Ristic wrote: From the web serving point of view it isn't. Since Apache usually interfaces to all kinds of modules and programs, the fact that processes die naturally from time to time helps remove cumulative errors. IMHO this is a last-resort safeguard to prevent a system from

[PHP-DEV] Re: persistent java virtual machine under PHP

2002-12-05 Thread Ivan Ristic
From the PHP point of view, you can get problems with persistent database connections on a very high load site, that's true. But that's about the only problem. Sure, you can't build a persistent storage of information in the server but that's a minor issue. It's not a minor issue.

[PHP-DEV] Re: persistent java virtual machine under PHP

2002-12-05 Thread Maróy Ákos
Ivan Ristic wrote: Right, but you can still use shared memory, or, you can store persistent objects onto the filesystem. We've done the later with satisfactory results. Point taken. But this only allows to share resources that can be copied into and from IPC shared memory. Some resources

Re: [PHP-DEV] Re: persistent java virtual machine under PHP

2002-12-05 Thread Derick Rethans
On Thu, 5 Dec 2002, Maróy Ákos wrote: Ivan Ristic wrote: Right, but you can still use shared memory, or, you can store persistent objects onto the filesystem. We've done the later with satisfactory results. Point taken. But this only allows to share resources that can be copied

Re: [PHP-DEV] Re: persistent java virtual machine under PHP

2002-12-05 Thread Maróy Ákos
Derick Rethans wrote: Have a look at www.vl-srm.net, and more even the article about it @ http://www.vl-srm.net/doc/articles/php-almanac-2002.php (the part about Bananas might be th emost relevant thing). Thanks for the info. Though I could implement a similar deamon in java, and call it

[PHP-DEV] Re: persistent java virtual machine under PHP

2002-12-05 Thread Ivan Ristic
There is a servlet which accepts requests and uses native code from libphp4.so to execute them. At the same time, the Java extension is used to provide access to Java objects from PHP itself. but the ext/java as it is would not be suitable, as it would spawn new JVMs every once in a

[PHP-DEV] Re: persistent java virtual machine under PHP

2002-12-05 Thread Akos Maroy
Ivan Ristic wrote: No, I have been told (by someone, I do not remember) that if you use PHP as a servlet ext/java would use the same JVM. I haven't check to see whether that is correct. sound good, I'll take a look. Akos -- PHP Development Mailing List http://www.php.net/ To

[PHP-DEV] Re: persistent java virtual machine under PHP

2002-12-05 Thread Akos Maroy
Ivan Ristic wrote: No, I have been told (by someone, I do not remember) that if you use PHP as a servlet ext/java would use the same JVM. I haven't check to see whether that is correct. My experiences: using php-4.2.3, calling plain php pages from Tomcat seem to be OK. But when calling

[PHP-DEV] Re: persistent java virtual machine under PHP

2002-12-04 Thread Ivan Ristic
What I'm looking for is that the JVM would not be discarded on a regular basis, but it would remain persistent. I do not think that is possible, unless PHP engine itself is contained within a single process (and runs multithreaded). Which it isn't (under Apache 1.x , at least). You

[PHP-DEV] Re: persistent java virtual machine under PHP

2002-12-04 Thread Akos Maroy
Ivan Ristic wrote: I do not think that is possible, unless PHP engine itself is contained within a single process (and runs multithreaded). Which it isn't (under Apache 1.x , at least). I'm not familiar in general with the PHP engine, so my questions may be quite stupid. Anyway: How is

Re: [PHP-DEV] Re: persistent java virtual machine under PHP

2002-12-04 Thread Brad LaFountain
--- Akos Maroy [EMAIL PROTECTED] wrote: Ivan Ristic wrote: I do not think that is possible, unless PHP engine itself is contained within a single process (and runs multithreaded). Which it isn't (under Apache 1.x , at least). I'm not familiar in general with the PHP engine, so my

Re: [PHP-DEV] Re: persistent java virtual machine under PHP

2002-12-04 Thread Maróy Ákos
Brad LaFountain wrote: Are you sure its getting unloaded or is it starting up in another httpd? I'm not sure which. The only thing I see is that global static variables in the shared object have their values re-initialized. Akos -- PHP Development Mailing List http://www.php.net/ To

[PHP-DEV] Re: persistent java virtual machine under PHP

2002-12-04 Thread Ivan Ristic
How is a persistent database connection handled then? e.g. in the mysql module? Apache 1.x pre-creates a number of server processes. Each process handles a certain number of requests (one at a time), and then dies. It is then replaced with an another server process. The number of