You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(6) |
Nov
(8) |
Dec
(2) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(19) |
Feb
(15) |
Mar
(10) |
Apr
(8) |
May
(7) |
Jun
(9) |
Jul
(13) |
Aug
(31) |
Sep
(111) |
Oct
(52) |
Nov
(72) |
Dec
(42) |
| 2006 |
Jan
(21) |
Feb
(32) |
Mar
(33) |
Apr
(24) |
May
(15) |
Jun
(40) |
Jul
(32) |
Aug
(19) |
Sep
(38) |
Oct
(37) |
Nov
(63) |
Dec
(37) |
| 2007 |
Jan
(18) |
Feb
(39) |
Mar
(69) |
Apr
(49) |
May
(71) |
Jun
(59) |
Jul
(71) |
Aug
(85) |
Sep
(46) |
Oct
(14) |
Nov
(25) |
Dec
(56) |
| 2008 |
Jan
(24) |
Feb
(77) |
Mar
(104) |
Apr
(44) |
May
(41) |
Jun
(11) |
Jul
(31) |
Aug
(59) |
Sep
(44) |
Oct
(86) |
Nov
(66) |
Dec
(93) |
| 2009 |
Jan
(88) |
Feb
(41) |
Mar
(49) |
Apr
(135) |
May
(22) |
Jun
(31) |
Jul
(60) |
Aug
(71) |
Sep
(76) |
Oct
(18) |
Nov
(52) |
Dec
(20) |
| 2010 |
Jan
(8) |
Feb
(50) |
Mar
(35) |
Apr
(48) |
May
(46) |
Jun
(84) |
Jul
(38) |
Aug
(61) |
Sep
(51) |
Oct
(31) |
Nov
(17) |
Dec
(18) |
| 2011 |
Jan
(51) |
Feb
(14) |
Mar
(17) |
Apr
(23) |
May
(15) |
Jun
(11) |
Jul
(5) |
Aug
(5) |
Sep
(15) |
Oct
(8) |
Nov
(5) |
Dec
(25) |
| 2012 |
Jan
(2) |
Feb
(4) |
Mar
(6) |
Apr
(9) |
May
(27) |
Jun
(32) |
Jul
(36) |
Aug
(10) |
Sep
(16) |
Oct
(3) |
Nov
(13) |
Dec
(7) |
| 2013 |
Jan
(1) |
Feb
(4) |
Mar
|
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(4) |
Oct
(2) |
Nov
(1) |
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
(9) |
Jul
(5) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
(3) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
(5) |
Oct
(1) |
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
(6) |
Feb
|
Mar
|
Apr
(10) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
| 2018 |
Jan
(2) |
Feb
(5) |
Mar
|
Apr
|
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
| 2021 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2023 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
|
2
|
3
|
4
|
|
5
|
6
|
7
|
8
|
9
|
10
|
11
|
|
12
|
13
|
14
|
15
|
16
|
17
|
18
|
|
19
|
20
|
21
|
22
|
23
|
24
|
25
|
|
26
|
27
(3) |
28
(1) |
29
(1) |
30
(1) |
|
|
|
From: Jost B. <jos...@ya...> - 2004-09-30 14:35:04
|
> handle each batch of requests
> from client side
> right? why not use a thread pool for that?
Apache already contains a thread/process pool.
Depending on your apache configuration there will be
no more than 2*n processes/threads running at a time;
1 process or thread from the apache pool connected
with 1 corresponding thread spawned by the JVM.
If we want to avoid to spawn a new thread each time
we accept, creating an "open" thread pool would make
sense, however. But I am not sure it's worth it.
Creating a NPTL thread or calling clone() isn't as
expensive as one might think. -- The main purpose of
a thread pool is to limit the resource usage, which is
something apache already does for us.
> have you tried a "pure java" server? would the
> performance be too bad?
Yes, but:
a) Java currently does not support local sockets, so
you must create a TCP/IP socket. Doing this on the
web-server is not be a good idea. So you will want to
start the server part on a different machine and open
your firewall to accept connections on that port from
the web-server:
b) Non-local TCP/IP connections must check the byte
order etc. so you cannot simply swrite/sread JNI types
anymore. Which means that you must define a
"standard" protocol first. Let's assume we solve this
problem using soap or another protocol, the next
problem will be:
c) With TCP/IP sockets you have to pay attention to
round-trips (latency problem). For example you cannot
send the client a "here's the result as an array
object" and then rely on the client to ask the server
for additional information ("now send me array entry
#12"). You must send all information is a single
call, otherwise you will need N round trips. Assuming
that one trip consts 50ms filling a PHP hashtable with
5000 entries would take 500s.
So we decided to use local sockets, nearly the same
way as jserv/tomcat's ajp adapter does it.
Jost
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
|
|
From: Jost B. <jos...@ya...> - 2004-09-29 16:12:33
|
> do you plan to create a CNI version your > natcJavaBridge.c? Well, CNI is certainly a much nicer interface to access java objects from C or C++ than JNI. If I start to develop an application from scratch, I would certainly consider CNI as an interface to access java objects---well, today I would probably choose .NET/MONO instead of java, but that's a different story. But since the bridge uses JNI and the JNI binding is now more or less bug-free, I don't think we should rewrite the code to use CNI. About 60% of the code is JNI code and the rest is standard socket code. However, I will certainly accept a patch if you want to write a CNI binding. Jost ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |
|
From: <php...@li...> - 2004-09-28 15:15:17
|
> now the pattern is a little different though.. the
> php script runs fine
> for like 15 times.. then the same exception comes up
> in JavaBridge.svr
> console.. and the php output is this: [error
message]
It will work fine if you make sure that only one
thread at a time accesses the gcj library.
> java.lang.StringIndexOutOfBoundsException
> at java.lang.String.charAt(int)
> (/usr/lib/libgcj.so.4.0.0)
It could be a separate issue, but I've had your script
running for about half an hour without any problems (I
suspected problems with the Boehm GC, but there aren't
any.
> This starts a new server process for each
> incoming request.
>
> ... what this mean exactly? ... apache is
> multithreaded.. and thus I can
> have two php scripts running in different threads
> and being called at
> the same time..
The normal operation is that for each thread or
process that apache starts the bridge creates a new
request. The server side acknowledges this request
and then spawns a new thread. Because of this gcj bug
we currently cannot have multiple threads jni threads:
32users -> httpd
|-- (32*httpd)--32 conn--->JVM
|-> 32 threads
So we must start a new process for each request from
the bridge:
32users -> httpd
|-- (32*httpd)--32 conn--> 32* JVM
The best way to do this is to remove the java entry
from the php.ini and to load the bridge via dl().
Of course, this is not the normal operation, but it
will work until the bug has been fixed.
Jost
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
|
|
From: <php...@li...> - 2004-09-27 20:55:14
|
do you plan to create a CNI version your natcJavaBridge.c? do you think it is worth? .. right now I dont have much time to work on that right now, but I may help if you think that it would be worth to do.. or even do it myself entirely.. then would just need some help from you.. |
|
From: <php...@li...> - 2004-09-27 20:34:26
|
> Hi,
> [please excuse the delay]
>
> I have just checked a fix into the head of the CVS.
> Please use this until the next version 1.0.6 is available.
>
> I have tested your program against the CVS head:
> gcj: 3.2.3
> php: 4.3.4
>
> gcj -fjni -oJavaBridge.srv \
> --main=JavaBridge \
> php-java-bridge-1.0.5/modules/JavaBridge.class \
> test/gcjtest.java \
> -L`pwd`/php-java-bridge-1.0.5/modules -lnatcJavaBridge
>
> su -c "killall -9 java; rm /tmp/.php-java-bridge"
>
> export LD_LIBRARY_PATH=`pwd`/php-java-bridge-1.0.5/modules
>
> ./JavaBridge.srv /tmp/.php-java-bridge 1 "" &
> php test/gcjtest.php
>
> ==> 48890
yes.. the my original code used a lots of space chars as padding.. but
sourceforge's forum engine shrank it to just one space.. thats why the
output length is different... the original class was:
public class Test {
public String test () {
StringBuffer sb = new StringBuffer ();
for (int i=0;i<10000;i++) {
sb.append (i);
sb.append (" ");
}
return sb.toString ();
}
}
so Test.test() outputs 248890 bytes.
I just checkout the cvs and tried and the same problem comes up again.
now the pattern is a little different though.. the php script runs fine
for like 15 times.. then the same exception comes up in JavaBridge.svr
console.. and the php output is this:
Warning: java.lang.StringIndexOutOfBoundsException in
/home/www/test.php on line 31
then I can just run the script again and it will work.. for 2 or 3
times.. then the exception and the warning come up again.. and this
pattern is repeated as many time I try the thing.
I compiled with -g so the exception is a bit more verbose:
java.lang.StringIndexOutOfBoundsException
at java.lang.String.charAt(int) (/usr/lib/libgcj.so.4.0.0)
at gnu.gcj.convert.Output_8859_1.write(java.lang.String, int, int,
char[]) (/usr/lib/libgcj.so.4.0.0)
at java.lang.String.getBytes(java.lang.String)
(/usr/lib/libgcj.so.4.0.0)
at java.lang.String.getBytes() (/usr/lib/libgcj.so.4.0.0)
at JavaBridge.setResult(long, long, java.lang.Object)
(/home/Downloads/php-java-bridge/cvs/php-java-bridge/server/JavaBridge.java:114)
at JavaBridge.Invoke(java.lang.Object, java.lang.String,
java.lang.Object[], long, long)
(/home/Downloads/php-java-bridge/cvs/php-java-bridge/server/JavaBridge.java:409)
at _Jv_CallAnyMethodA(java.lang.Object, java.lang.Class, _Jv_Method,
boolean, java.lang.Class[], jvalue, jvalue) (/usr/lib/libgcj.so.4.0.0)
at __clone (/lib/tls/libc-2.3.3.so)
> Additional notes regarding gcj:
>
> 1. GCJ cannot currently handle multiple threads accessing the library
> via JNI (CNI might work, not tested). So until this gcj bug is fixed,
> please start the bridge via dl() and do *not* hard-code the socketname
> option. This starts a new server process for each incoming request.
... what this mean exactly? ... apache is multithreaded.. and thus I can
have two php scripts running in different threads and being called at
the same time.. so they cannot access the same class.method? or cannot
use the php-java-bridge lib at once at all?
|
|
From: <php...@li...> - 2004-09-27 16:22:45
|
test ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |