RE: apache 1.3.12 and tomcat 3.3-m2 connection problem ??

2001-03-26 Thread GOMEZ Henri

>I agree the idea of the pushlet is a bit confusing because it 
>uses http (a non real time protocol) to do pseudo real-time job, 
>but real-time is always more "hungry" than other technology 
>(think about streaming !! ).

>On the other hand having pseudo real-time monitoring over 
>standard http is also very interesting !
>It's look like another dilemma ;-)
>But
BTW, I'll see where the problem could be in mod_jk ;-)
>Could you give me more information about the problem ?

Argh, damn't english, I wanted to say I'll looking for where
the problem could be in mod_jk. But as you know Apache add
also timeout to requests



RE: apache 1.3.12 and tomcat 3.3-m2 connection problem ??

2001-03-26 Thread Jestin Jean-Francois

Hello,
I agree the idea of the pushlet is a bit confusing because it uses http (a non real 
time protocol) to do pseudo real-time job, 
but real-time is always more "hungry" than other technology (think about streaming !! 
).
On the other hand having pseudo real-time monitoring over standard http is also very 
interesting !
It's look like another dilemma ;-)
But
>>>BTW, I'll see where the problem could be in mod_jk ;-)
Could you give me more information about the problem ?

Thank you very much



> -Original Message-
> From: GOMEZ Henri [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, March 26, 2001 6:10 PM
> To:   [EMAIL PROTECTED]
> Subject:  RE: apache 1.3.12 and tomcat 3.3-m2 connection problem ??
> 
> Hi,
> 
> I take a look at pushlet and find it very bad design.
> 
> Using opened http connections to do real-time job is
> not realist.
> 
> In that case you keep an :
> 
> - one OS (job/thread)
> - one ajp13 connection
> - one tomcat thread.
> 
> Imagine if you got > 256 concurrents connexions !
> 
> A better alternative will be to use a custom made network
> protocol.
> 
> BTW, I'll see where the problem could be in mod_jk ;-)
> 
> 
> "Entre truands, les b> énéfices, ça se partage, la réclusion, ça
> s'additionne."
> -- Michel Audiard
>  
> 
> >-Original Message-
> >From: Jestin Jean-Francois 
> >[mailto:[EMAIL PROTECTED]]
> >Sent: Monday, March 26, 2001 5:34 PM
> >To: '[EMAIL PROTECTED]'
> >Subject: RE: apache 1.3.12 and tomcat 3.3-m2 connection problem ??
> >
> >
> >here are 2 articles speaking about the pushlet
> >
> >http://www.javaworld.com/javaworld/jw-03-2000/jw-03-pushlet.html
> >
> >http://www.javaworld.com/javaworld/jw-03-2000/jw-03-pushlet-2.html
> >
> >here is a very simple sample pushlet :
> >
> >
> >import javax.servlet.*;
> >import javax.servlet.http.*;
> >import java.io.*;
> >
> >public class SimplePushlet extends HttpServlet
> >{
> >public void doGet(HttpServletRequest request, 
> >HttpServletResponse response)  throws ServletException, IOException {
> >
> >ObjectOutputStream out = new ObjectOutputStream 
> >(response.getOutputStream());
> >response.setContentType("text/plain");   
> >
> >String start = "Http connection opened";
> >
> >out.write(start.getBytes());
> >out.flush();
> >   
> >try {
> >for (int cnt=1; cnt > 0; cnt++) {
> >Thread.sleep(1000);
> >
> >String iter = "event=" + cnt + "\n";
> >out.write(iter.getBytes());
> >out.flush();
> >System.out.println("event=" + cnt + "pushed.\n");
> >}
> >} catch (Exception e) {
> >    System.out.println("error:"+e);
> >}
> >
> >out.close();
> >}
> >}
> >
> >You may use netscape as browser or ie if you don't care about 
> >waiting 15 pushes.
> >
> >Thank you for your help.
> >
> >
> >
> >
> >
> >
> >
> >> >-Original Message-
> >> >From: Jestin Jean-Francois 
> >> >[mailto:[EMAIL PROTECTED]]
> >> >Sent: Monday, March 26, 2001 4:01 PM
> >> >To: '[EMAIL PROTECTED]'; 
> >'[EMAIL PROTECTED]'
> >> >Subject: apache 1.3.12 and tomcat 3.3-m2 connection problem ??
> >> >
> >> >
> >> >Hello,
> >> >
> >> >I'm currently using apache 1.3.12(mod_jk) and tomcat 3.3-m2 
> >> >under solaris 2.6 talking ajp13
> >> >
> >> >Everything works fine except that I encounter sometime an 
> >> >Internal Server Error if I don't restart Apache each time I 
> >> >restart tomcat. Is there a fix for that problem ?
> >> >
> >> >On the other hand I use a server push mechanism (called 
> >> >pushlet) - that's why I use milestone build of 3.3 (not 
> >> >working under 3.2.1)- it works also fine (what a beautiful 
> >> >life !) except that sometime (!!??) the servlet (pushlet) > 
> >> >doesn't detect the end of the connection (Browser killed) 
> >> >between tomcat and apache
> >> >
> >> >looking at the mod_jk log gives the following :
> >> >
> >> >[jk_aj

RE: apache 1.3.12 and tomcat 3.3-m2 connection problem ??

2001-03-26 Thread Mel Martinez


--- Jestin Jean-Francois
<[EMAIL PROTECTED]> wrote:
> here are 2 articles speaking about the pushlet
> 
>
http://www.javaworld.com/javaworld/jw-03-2000/jw-03-pushlet.html
> 
>
http://www.javaworld.com/javaworld/jw-03-2000/jw-03-pushlet-2.html
> 
> here is a very simple sample pushlet :
> 
> 
> {
> public void doGet(HttpServletRequest request,
> HttpServletResponse response)  throws
> ServletException, IOException {
> 
> ObjectOutputStream out = new
> ObjectOutputStream (response.getOutputStream());
> response.setContentType("text/plain");   
> 
> String start = "Http connection opened";
> 
> out.write(start.getBytes());
> out.flush();
>
> try {
> for (int cnt=1; cnt > 0; cnt++) {
> Thread.sleep(1000);
> 
> String iter = "event=" + cnt + "\n";
> out.write(iter.getBytes());
> out.flush();
> System.out.println("event=" + cnt +
> "pushed.\n");
> }
> } catch (Exception e) {
> System.out.println("error:"+e);
> }
> 
> out.close();
> }
> }
> 

This looks like a VERY bad idea - this will lock up a
connection to the server (and possibly a web server
process)!  This will definitely not scale well.  Also,
it is vulnerable to server crash, something likely to
happen if you had even a moderate amount of traffic
going to 'pushlets'.

It might be best to have the browser redirected over
to a separate, dedicated pushlet server (on a separate
box) for this.  I sure wouldn't want it sharing
resources with the rest of my 'normal' servlets.

NitPick: You should send error messages to System.err,
not System.out.  :-)

Cheers,

mel







__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/



RE: apache 1.3.12 and tomcat 3.3-m2 connection problem ??

2001-03-26 Thread GOMEZ Henri

Hi,

I take a look at pushlet and find it very bad design.

Using opened http connections to do real-time job is
not realist.

In that case you keep an :

- one OS (job/thread)
- one ajp13 connection
- one tomcat thread.

Imagine if you got > 256 concurrents connexions !

A better alternative will be to use a custom made network
protocol.

BTW, I'll see where the problem could be in mod_jk ;-)


"Entre truands, les bénéfices, ça se partage, la réclusion, ça
s'additionne."
-- Michel Audiard
 

>-Original Message-
>From: Jestin Jean-Francois 
>[mailto:[EMAIL PROTECTED]]
>Sent: Monday, March 26, 2001 5:34 PM
>To: '[EMAIL PROTECTED]'
>Subject: RE: apache 1.3.12 and tomcat 3.3-m2 connection problem ??
>
>
>here are 2 articles speaking about the pushlet
>
>http://www.javaworld.com/javaworld/jw-03-2000/jw-03-pushlet.html
>
>http://www.javaworld.com/javaworld/jw-03-2000/jw-03-pushlet-2.html
>
>here is a very simple sample pushlet :
>
>
>import javax.servlet.*;
>import javax.servlet.http.*;
>import java.io.*;
>
>public class SimplePushlet extends HttpServlet
>{
>public void doGet(HttpServletRequest request, 
>HttpServletResponse response)  throws ServletException, IOException {
>
>ObjectOutputStream out = new ObjectOutputStream 
>(response.getOutputStream());
>response.setContentType("text/plain");   
>
>String start = "Http connection opened";
>
>out.write(start.getBytes());
>out.flush();
>   
>try {
>for (int cnt=1; cnt > 0; cnt++) {
>Thread.sleep(1000);
>
>String iter = "event=" + cnt + "\n";
>out.write(iter.getBytes());
>out.flush();
>System.out.println("event=" + cnt + "pushed.\n");
>}
>} catch (Exception e) {
>System.out.println("error:"+e);
>}
>
>out.close();
>}
>}
>
>You may use netscape as browser or ie if you don't care about 
>waiting 15 pushes.
>
>Thank you for your help.
>
>
>
>
>
>
>
>> >-Original Message-
>> >From: Jestin Jean-Francois 
>> >[mailto:[EMAIL PROTECTED]]
>> >Sent: Monday, March 26, 2001 4:01 PM
>> >To: '[EMAIL PROTECTED]'; 
>'[EMAIL PROTECTED]'
>> >Subject: apache 1.3.12 and tomcat 3.3-m2 connection problem ??
>> >
>> >
>> >Hello,
>> >
>> >I'm currently using apache 1.3.12(mod_jk) and tomcat 3.3-m2 
>> >under solaris 2.6 talking ajp13
>> >
>> >Everything works fine except that I encounter sometime an 
>> >Internal Server Error if I don't restart Apache each time I 
>> >restart tomcat. Is there a fix for that problem ?
>> >
>> >On the other hand I use a server push mechanism (called 
>> >pushlet) - that's why I use milestone build of 3.3 (not 
>> >working under 3.2.1)- it works also fine (what a beautiful 
>> >life !) except that sometime (!!??) the servlet (pushlet) 
>> >doesn't detect the end of the connection (Browser killed) 
>> >between tomcat and apache
>> >
>> >looking at the mod_jk log gives the following :
>> >
>> >[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - 
>write failed
>> >[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - 
>write failed
>> >[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - 
>write failed
>> >[jk_ajp13_worker.c (203)]: connection_tcp_get_message: Error - 
>> >jk_tcp_socket_recvfull failed
>> >[jk_ajp13_worker.c (623)]: Error reading request
>> >[jk_ajp13_worker.c (203)]: connection_tcp_get_message: Error - 
>> >jk_tcp_socket_recvfull failed
>> >[jk_ajp13_worker.c (623)]: Error reading request
>> >[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - 
>write failed
>> >[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - 
>write failed
>> >[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - 
>write failed
>> >[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - 
>write failed
>> >[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - 
>write failed
>> >
>> >Is there also a fix for that or these problems ?
>> >
>> >Thank you very for your answer and your great job !
>> >
>> >
>> >
>> >Jean-Fran> çois JESTIN
>> >
>> >
>> >
>> >
>



RE: apache 1.3.12 and tomcat 3.3-m2 connection problem ??

2001-03-26 Thread Jestin Jean-Francois

here are 2 articles speaking about the pushlet

http://www.javaworld.com/javaworld/jw-03-2000/jw-03-pushlet.html

http://www.javaworld.com/javaworld/jw-03-2000/jw-03-pushlet-2.html

here is a very simple sample pushlet :


import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;

public class SimplePushlet extends HttpServlet
{
public void doGet(HttpServletRequest request, HttpServletResponse response)  
throws ServletException, IOException {

ObjectOutputStream out = new ObjectOutputStream (response.getOutputStream());
response.setContentType("text/plain");   

String start = "Http connection opened";

out.write(start.getBytes());
out.flush();
   
try {
for (int cnt=1; cnt > 0; cnt++) {
Thread.sleep(1000);

String iter = "event=" + cnt + "\n";
out.write(iter.getBytes());
out.flush();
System.out.println("event=" + cnt + "pushed.\n");
}
} catch (Exception e) {
System.out.println("error:"+e);
}

out.close();
}
}

You may use netscape as browser or ie if you don't care about waiting 15 pushes.

Thank you for your help.







> >-Original Message-
> >From: Jestin Jean-Francois 
> >[mailto:[EMAIL PROTECTED]]
> >Sent: Monday, March 26, 2001 4:01 PM
> >To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
> >Subject: apache 1.3.12 and tomcat 3.3-m2 connection problem ??
> >
> >
> >Hello,
> >
> >I'm currently using apache 1.3.12(mod_jk) and tomcat 3.3-m2 
> >under solaris 2.6 talking ajp13
> >
> >Everything works fine except that I encounter sometime an 
> >Internal Server Error if I don't restart Apache each time I 
> >restart tomcat. Is there a fix for that problem ?
> >
> >On the other hand I use a server push mechanism (called 
> >pushlet) - that's why I use milestone build of 3.3 (not 
> >working under 3.2.1)- it works also fine (what a beautiful 
> >life !) except that sometime (!!??) the servlet (pushlet) 
> >doesn't detect the end of the connection (Browser killed) 
> >between tomcat and apache
> >
> >looking at the mod_jk log gives the following :
> >
> >[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
> >[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
> >[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
> >[jk_ajp13_worker.c (203)]: connection_tcp_get_message: Error - 
> >jk_tcp_socket_recvfull failed
> >[jk_ajp13_worker.c (623)]: Error reading request
> >[jk_ajp13_worker.c (203)]: connection_tcp_get_message: Error - 
> >jk_tcp_socket_recvfull failed
> >[jk_ajp13_worker.c (623)]: Error reading request
> >[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
> >[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
> >[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
> >[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
> >[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
> >
> >Is there also a fix for that or these problems ?
> >
> >Thank you very for your answer and your great job !
> >
> >
> >
> >Jean-Fran> çois JESTIN
> >
> >
> >
> >



RE: apache 1.3.12 and tomcat 3.3-m2 connection problem ??

2001-03-26 Thread GOMEZ Henri

Could you send us the pushlet code example.
I could help here (mod_jk) :-)

"Entre truands, les bénéfices, ça se partage, la réclusion, ça
s'additionne."
-- Michel Audiard
 

>-Original Message-
>From: Jestin Jean-Francois 
>[mailto:[EMAIL PROTECTED]]
>Sent: Monday, March 26, 2001 4:01 PM
>To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
>Subject: apache 1.3.12 and tomcat 3.3-m2 connection problem ??
>
>
>Hello,
>
>I'm currently using apache 1.3.12(mod_jk) and tomcat 3.3-m2 
>under solaris 2.6 talking ajp13
>
>Everything works fine except that I encounter sometime an 
>Internal Server Error if I don't restart Apache each time I 
>restart tomcat. Is there a fix for that problem ?
>
>On the other hand I use a server push mechanism (called 
>pushlet) - that's why I use milestone build of 3.3 (not 
>working under 3.2.1)- it works also fine (what a beautiful 
>life !) except that sometime (!!??) the servlet (pushlet) 
>doesn't detect the end of the connection (Browser killed) 
>between tomcat and apache
>
>looking at the mod_jk log gives the following :
>
>[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
>[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
>[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
>[jk_ajp13_worker.c (203)]: connection_tcp_get_message: Error - 
>jk_tcp_socket_recvfull failed
>[jk_ajp13_worker.c (623)]: Error reading request
>[jk_ajp13_worker.c (203)]: connection_tcp_get_message: Error - 
>jk_tcp_socket_recvfull failed
>[jk_ajp13_worker.c (623)]: Error reading request
>[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
>[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
>[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
>[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
>[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
>
>Is there also a fix for that or these problems ?
>
>Thank you very for your answer and your great job !
>
>
>
>Jean-François JESTIN
>
>
>
>



apache 1.3.12 and tomcat 3.3-m2 connection problem ??

2001-03-26 Thread Jestin Jean-Francois

Hello,

I'm currently using apache 1.3.12(mod_jk) and tomcat 3.3-m2 under solaris 2.6 talking 
ajp13

Everything works fine except that I encounter sometime an Internal Server Error if I 
don't restart Apache each time I restart tomcat. Is there a fix for that problem ?

On the other hand I use a server push mechanism (called pushlet) - that's why I use 
milestone build of 3.3 (not working under 3.2.1)- it works also fine (what a beautiful 
life !) except that sometime (!!??) the servlet (pushlet) doesn't detect the end of 
the connection (Browser killed) between tomcat and apache

looking at the mod_jk log gives the following :

[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
[jk_ajp13_worker.c (203)]: connection_tcp_get_message: Error - jk_tcp_socket_recvfull 
failed
[jk_ajp13_worker.c (623)]: Error reading request
[jk_ajp13_worker.c (203)]: connection_tcp_get_message: Error - jk_tcp_socket_recvfull 
failed
[jk_ajp13_worker.c (623)]: Error reading request
[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed

Is there also a fix for that or these problems ?

Thank you very for your answer and your great job !



Jean-François JESTIN