Thanks to Dennis and Craig,
The NT web server is actually Netscape Enterprise 3.6 and I believe it can support
HTTP PUT. The problem here is that after the flat file has been uploaded to the NT
web server, it needs to be processed right away where data will be extracted from
the flat file and store in database. There's no web server installed in the HP9000
Unix server. So, in this case, can I say socket is the best solution and not HTTP
PUT.
Please advice. Thanks !
- Florence
Dennis Sosnoski wrote:
> It sounds like the issue on using an HTTP PUT is whether the NT server supports
> it, since that's the destination system.
>
> As to the socket vs RMI question, let me add to Craig's summary that RMI uses
> Java serialization which can result in a large amount of data overhead. If you
> read the file in and then send it across as a single large String the RMI
> overhead should be minimal, but RMI seems to gain you little in the situation
> you've described anyway. If you can't use an HTTP PUT I'd recommend a socket
> connection.
>
> - Dennis
>
> Dennis M. Sosnoski
> Sosnoski Software Solutions, Inc.
> http://www.sosnoski.com
>
> "Craig R. McClanahan" wrote:
> >
> > Florence Tan wrote:
> >
> > > Hi all,
> > >
> > > I would like seek help here on whether to use socket programming or RMI
> > > for the following scenario :
> > >
> > > Sending a flat file from HP9000 Unix10.20 server to a NT web server
> > > every 1 or 2 minutes. The distance between this two server is about 40
> > > km and the lease line speed is 28.8kbps.
> > >
> >
> ...
> > Sockets represent the ability to send a stream of bytes from one machine to
> > another.
> >
> > RMI represents a method to call a Java method on a machine other than your
> > own. This capability relies on socket communications underneath -- it
> > passes the argument objects as byte streams of serialized Java objects, and
> > receives the result the same way.
> >
> > Use whichever approach requires you to write less code -- the slow line
> > speed means any execution time overhead
> >
> > For your particular scenario, you might also check whether your HP9000's
> > web server supports the HTTP "PUT" command. If it does, you can also think
> > about using an HttpURLConnection to upload the file to the web server, with
> > no extra programming at all on the server end.
> >
> > > Florence
> >
> > Craig McClanahan
> >
> > ___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
begin:vcard
n:Tan;Florence
tel;fax:(60)82-232008
tel;work:(60)82-234008
x-mozilla-html:FALSE
url:http://www.snt.com.my
org:SiliconNet Technology Sdn. Bhd.;Software Development
version:2.1
email;internet:[EMAIL PROTECTED]
title:IT Executive
adr;quoted-printable:;;Lot 352, Loron 12, Jalan Rubber,=0D=0A93400 Kuching, Sarawak,=0D=0AMalaysia.=0D=0A;;;;
fn:Florence Tan
end:vcard
S/MIME Cryptographic Signature