From: Jost B. <jos...@ya...> - 2005-02-17 22:07:46
|
A binary snapshot of version 2.0 is available: http://php-java-bridge.sf.net/JavaBridge.jar http://php-java-bridge.sf.net/php The server can be started with: java -jar JavaBridge.jar The PHP binary is version 5.0.3 with the bridge compiled in. The official 2.0 version will be available next month. Please report bugs to the mailing list or open a ticket. Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Jost B. <jos...@ya...> - 2005-02-17 22:13:40
|
--- Jost Boekemeier <jos...@ya...> schrieb: > A binary snapshot of version 2.0 is available: > > http://php-java-bridge.sf.net/JavaBridge.jar I forgot to mention that you must use JDK 1.5 to run the bridge. The bridge currently does *not* run with jdk1.4 or earlier. Jost ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
From: Marek L. <ma...@le...> - 2005-02-18 07:19:11
|
Jost Boekemeier napisał(a): > A binary snapshot of version 2.0 is available: > > http://php-java-bridge.sf.net/JavaBridge.jar > http://php-java-bridge.sf.net/php > > The server can be started with: > > java -jar JavaBridge.jar > > The PHP binary is version 5.0.3 with the bridge > compiled in. > > The official 2.0 version will be available next month. > > Please report bugs to the mailing list or open a > ticket. > > Regards, > Jost Boekemeier Hello Jost, After start of PHP I saw something like this in JavaBridge console: lut 18 07:07:35 JavaBridge DEBUG: Request from unknown client But this is only a warning. But, I've made simple test: require_once "Benchmark/Timer.php"; $timer = new Benchmark_Timer(); $timer->start(); for ($i = 0; $i < 100; $i++) { $string = new Java("java.lang.String", "sdsdsd"); } $timer->stop(); $timer->display(); The results: ------------------------------------------------------------- marker time index ex time perct ------------------------------------------------------------- Start 1108710914.89464700 - 0.00% ------------------------------------------------------------- Stop 1108710917.28214400 2.38749718666 100.00% ------------------------------------------------------------- total - 2.38749718666 100.00% ------------------------------------------------------------- PHP bug, an object destructor was called after module shutdown As you see there is some problem with object destructor and also JavaBridge is quite slow - over 2 seconds in making 100 strings objects - is this normal behavior ? Regards, ML |
From: Marek L. <ma...@le...> - 2005-02-18 07:24:08
|
Marek Lewczuk napisał(a): > Jost Boekemeier napisał(a): > >> A binary snapshot of version 2.0 is available: >> >> http://php-java-bridge.sf.net/JavaBridge.jar >> http://php-java-bridge.sf.net/php >> >> The server can be started with: >> >> java -jar JavaBridge.jar >> >> The PHP binary is version 5.0.3 with the bridge >> compiled in. >> >> The official 2.0 version will be available next month. >> >> Please report bugs to the mailing list or open a >> ticket. >> Regards, >> Jost Boekemeier > > Hello Jost, > After start of PHP I saw something like this in JavaBridge console: > lut 18 07:07:35 JavaBridge DEBUG: Request from unknown client > > But this is only a warning. But, I've made simple test: > > > require_once "Benchmark/Timer.php"; > $timer = new Benchmark_Timer(); > $timer->start(); > for ($i = 0; $i < 100; $i++) { > $string = new Java("java.lang.String", "sdsdsd"); > } > $timer->stop(); > $timer->display(); > > The results: > ------------------------------------------------------------- > marker time index ex time perct > ------------------------------------------------------------- > Start 1108710914.89464700 - 0.00% > ------------------------------------------------------------- > Stop 1108710917.28214400 2.38749718666 100.00% > ------------------------------------------------------------- > total - 2.38749718666 100.00% > ------------------------------------------------------------- > > PHP bug, an object destructor was called after module shutdown > > > > As you see there is some problem with object destructor and also > JavaBridge is quite slow - over 2 seconds in making 100 strings objects > - is this normal behavior ? One correction: the performance is low because of that I've run JavaBridge in second console which prints all debug informations. When I've run with " > /dev/null &" then the results looks much better: ------------------------------------------------------------- marker time index ex time perct ------------------------------------------------------------- Start 1108711271.00199500 - 0.00% ------------------------------------------------------------- Stop 1108711271.10505000 0.103055000305 100.00% ------------------------------------------------------------- total - 0.103055000305 100.00% ------------------------------------------------------------- PHP bug, an object destructor was called after module shutdown |
From: Jost B. <jos...@ya...> - 2005-02-18 18:21:10
|
> PHP bug, an object destructor was called after > module shutdown Yes (it's a PHP bug, not a bug in the bridge). There are a number of tickets regarding this problem. I don't know if or when the PHP people are going to fix it. > JavaBridge is quite slow - over 2 seconds in making > 100 strings objects Depends on the network latency. If you talk to the server via a slow network with ~2ms latency, this is feasible. For local sockets (either TCP or Unix domain) the new protocol makes the bridge at least two times faster. From what I have seen the bench now executes twice as fast as before: ~11s vs. ~4 seconds native java code. > - is this normal behavior ? Certainly. Every RPC protocol has this problem. That's why one normally creates "value objects" on the client-side and then sends these to the server. Bandwith is not the problem, latency is. One could invent techniques such as "reply cookies" to minimize the number of roundtrips. But this is not worth it, imho. If you use local sockets, the communication is reasonably fast. If you want to talk to a remote server, use value classes to communicate with it. Jost ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |