|Count the Ways||Links|
Unfortunately, the Java file system has no security features. There is no way to identify yourself, to prove your identity, or to limit your read/write access to a given set of files or directories. It presumes unlimited read/write access. This is just not good enough for remotely reading and writing files.
Servers typically don’t provide a means for remote machines to directly read or write their files. When they do, such as in Novell NFS (Novell File System) servers, there is a whole layer of security tacked on top.
Instead, servers provide a pot pourri of indirect ways to read and write the remote files. In each case you run some program on the server that talks via the Internet to the remote computer and does any file reading and writing on its behalf, e. g.
|Ways of Remotely Accessing Information|
|JWS (Java Web Start) + HTTP (Hypertext Transfer Protocol)||HTTP GET allows reading of a selected set of files, HTTP POST lets you send a query and get back information. HTTP PUT lets you upload a file, though the PUT feature is rarely supported. You write an Applet, signed Applet, Java Web Start or application to simulate a browser.||Your client program can tie into a conventional Servlet system without having to change the Servlet system. You can also modify the servlet system to have a more efficient computer-friendly interface, (perhaps with auxiliary raw sockets). The Applet etc. presents a much crisper UI (User Interface) to the end user than browser would.||The client must have Java installed and enabled. Sometimes corporations mindlessly block even the safest Applets in their paranoia.|
|browser + CGI (Common Gateway Interface)/Servlets||Lets you communicate with Servlets running on the server that will read or write files for you and send back results. See Base64 and URLEncoded to convert your binary data to armoured printable characters.||Most common technique. Does not require anything other than a browser installed at the client. This is the biggest plus.||Clumsy user interface limited by browser and HTTP forms.|
|RMI (Remote Method Invocation)||Lets you send Java objects back and forth between the remote computer and a server. Each can run methods on the other published objects. These methods may read and write files.||Extremely flexible communications||High overhead. Complicated to set up. Java only. Must have Java installed on the client and firewalls permeable to RMI.|
|Sockets||let you send raw streams of bytes back and forth between remote machine and server. The program on the server can then use that information to read and write files. If you compress your data, this about as efficient as it gets.||compact, efficient, low level. This is the way to pump large volumes of data.||Pooling connections is complicated. You can’t afford to keep open idle sockets for every user.|
|XML (extensible Markup Language)||You exchange XML (sometimes SOAP (Simple Object Access Protocol) ) messages between client and server.||Allow sending tree-structured messages.||Bloats the size of the messages to many times what they need to be, thus slowing down communications. They are thus suited only for short messages or low volumes. Messages need overly complicated tools to create and parse at each end.|
|CORBA (Common Object Request Broker Architecture)||A heavy duty RMI that supports languages other than Java. It is considerably more complicated to use.||Must create definition files for every possible interaction. Tedious.||Ties into non-Java corporate CORBA systems.|
|EJB||Enterprise Java Beans Are like RMI plus servlets, plus transaction logging and backout. They are an augmentation for Servlets. The client side can be anything a Servlet might support.||Heavy duty corporate business logic.||Complicated. Requires heavy duty servers.|
|FileTransfer classes||From Canadian Mind Products. Let you copy files from a variety of sources, including jars, to a variety of targets, both remote and local. They use HTTP protocol where necessary.||Very simple to use.||Handles only files, not streams or transactions.|
|FTP (File Transfer Protocol)||Allows file upload/download. For efficiency, send only zipped files, bundling many small files into one big one. FTP is a slower protocol than HTTP but supports recovery there is a disconnect in mid transfer.||Supported almost everywhere.||Supports only file transfer, no streams or transactions. It is for batch work.|
|JavaSpaces||I’m told you can use this for intermachine communication, but I have never tried it.|
|JDBC||JDBC (Java Data Base Connectivity) Lets you communicate with an SQL (Standard Query Language) server running on the server to read and write database files.||Gives and Applet or JWS app complete power to do complex queries and updates, anything supported by JDBC.||This exposes your database to the outside world in a way that invites hackers. It is safer do all your database work with Servlets, triggered by transactions coming in oven the Internet.|
|Jini||I’m told you can use this for intermachine communication, but I have never tried it.||This works with tiny devices as well as desktops.||The technology seems to have stalled.|
|Pipes||java.nio.channels.Pipechannels.Pipe. Under the hood these are Sockets useful for parent child process communication, not general Socket communication.||Fast, simple.||Regular java.io. PipedOutputStream pipes only work between Threads in a common JVM (Java Virtual Machine). They are not suitable for remote data access.|
|WebDAV||A system to make a shared volume look like a local hard disk. Mainly used for sharing Microsoft Word documents.||platform independent. Looks like ordinary HTTP to firewalls.||Handles only batch sharing of files, no streams or transactions.|
|recommend book⇒Java P2P Unleashed: With JXTA, Web Services, XML, Jini, JavaSpaces and EE|
|by||Robert Flenner, Michael Abbott, Toufic Boubez, Frank Cohen, Navaneeth Krishnan, Alan Moffet, Rajam Ramamurti, Bilal Siddiqui, Frank Sommers||978-0-672-32399-7||paperback|
|Covers a variety of the more exotic techniques for inter-computer communication with Java.|
|Greyed out stores probably do not have the item in stock. Try looking for it with a bookfinder.|
This page is posted
Optional Replicator mirror
Please read the feedback from other visitors, or send your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.
Your face IP:[188.8.131.52]
You are visitor number|