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.
>

Note that the physical distance is irrelevant -- only the speed matters
:-).

>
> I am still very confusing on socket and RMI.  Can some one just briefly
> tell me what's the difference between them.  Thanks a lot for your help!
>

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

Reply via email to