Did you run your tests more than once and average the times?
HTTP is not a speedy protocol, and is not well designed for TCP/IP (strange
that).
HTTP is very much subject to the TCP/IP slow start and windowing mechanisms.
HTTP still needs to open a socket, just like RMI, so there is no hidden
magic there.
You could set your system to do a TCP fast start, which is better for HTTP.
I'm not sure what RMI sets its window size, but this might make a difference
too.
Thor HW
----- Original Message -----
From: "David Regan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 09, 2000 1:57 PM
Subject: Re: RMI/HTTP?
> The message is quite large actually, since I'm sending
> close to 16000 text entries in this test, and the client
> is not on the same box as the server.
>
> The results are not phenomenally different (20 seconds
> for RMI/HTTP and 23 for HTTP) but it seems like the
> times should be reversed for this.
>
> Certainly there was a huge difference vs sending
> individual objects instead of one RMI object with
> XML (over 45 seconds in that case), but it seems like
> XML without RMI should be lighter weight and therefore
> faster still.
>
> At least for this example that does not seem the case,
> I'm just not sure why.
>
> -David
>
> -----Original Message-----
> From: Ranjan Bagchi [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 09, 2000 11:46 AM
> To: [EMAIL PROTECTED]
> Cc: Ranjan Bagchi
> Subject: Re: RMI/HTTP?
>
>
> David,
>
> Certainly wacky: One thing that comes to mind is: is the message short
> enough that the overhead of opening a socket connection to your server
could
> overwhelm the transport time? In that case if RMI had some kind of
> connection pooling going on it could explain.
>
> Similarly: are client and server physically on different machines? RMI
> might be being smart and further optimizing the transport.
>
> Curious what your results are though.
>
> Ranjan Bagchi
>
>
> On Tue, 9 May 2000 11:04:44 -0700, David Regan
<[EMAIL PROTECTED]>
> wrote:
>
> >This is not really the right forum for this, but I
> >have been playing with Weblogic's custom RMI libraries
> >in my EJB app and coming up with some very odd results.
> >
> >For some reason sending XML data encapsulated in a RMI
> >object over HTTP is faster than sending raw XML over
> >straight HTTP.
> >
> >This really doesn't make sense to me since using RMI
> >(even an optimized version) should generate some
> >additional overhead to the communication vs a raw
> >URLConnection.
> >
> >Since I'm doing XML->DOM translations in both cases,
> >that's not the issue..it really seems to be communication
> >related.
> >
> >RMI code
> > xml = obj.getDirList(name);
> > parseXmlFileList(xml, 0, this);
> >
> >non-RMI code
> > URLConnection urlc = httpServletUrl.openConnection();
> > urlc.setDoOutput(true);
> > urlc.setDoInput(true);
> >
> > PrintWriter pw = new PrintWriter(
> > new OutputStreamWriter(
> > urlc.getOutputStream()), true);
> > pw.println(name);
> >
> > BufferedReader r = new BufferedReader(
> > new InputStreamReader(urlc.getInputStream()));
> > StringBuffer sb = new StringBuffer();
> > while (true) {
> > String s = r.readLine();
> > if (s == null || s.equals("\n") || s.equals(""))
> > break;
> > sb.append(s);
> > sb.append("\n");
> > }
> > xml = sb.toString();
> > parseXmlFileList(xml, 0, this);
> >
> >Any opinions on this? I'm at a loss on this one.
> >-David
> >
> >
==========================================================================
> >To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> >of the message "signoff EJB-INTEREST". For general help, send email to
> >[EMAIL PROTECTED] and include in the body of the message "help".
> >
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff EJB-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".