aspose file tools*
The moose likes Distributed Java and the fly likes which is best  to sending file to client? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "which is best  to sending file to client?" Watch "which is best  to sending file to client?" New topic
Author

which is best to sending file to client?

Kaleeswaran Karuppasamy
Ranch Hand

Joined: Jul 19, 2007
Posts: 154
i have to option to send file

1.using URL class in java.net package in client side and server side we can use HttpServletRequest.getStream() that mean https or http communication

2. using RMI


i want to know which is scalable and high performance solution among the two


please suggest me


Judge a man by his questions rather than his answers --Voltaire
SCJP 1.5 97%
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41525
    
  53
What does "scalable" and "high performance" mean to you? Can you give some numbers as to the expected orders of magnitude (file size, number of files, time frame in which this happens, ...)?

Neither HTTP nor RMI is particularly suited for sending files. I might consider sockets instead -or a file server, if feasible- but it's hard to say for sure without knowing more about the problem.


Ping & DNS - my free Android networking tools app
Kaleeswaran Karuppasamy
Ranch Hand

Joined: Jul 19, 2007
Posts: 154
Originally posted by Ulf Dittmer:
What does "scalable" and "high performance" mean to you? Can you give some numbers as to the expected orders of magnitude (file size, number of files, time frame in which this happens, ...)?

Neither HTTP nor RMI is particularly suited for sending files. I might consider sockets instead -or a file server, if feasible- but it's hard to say for sure without knowing more about the problem.


we are doing medical transcription project in this we are sending wave and doc file to server from multiple client. so in server side need file sending and receiving component .In this project very important component is file sending and receiving component.maximum 400 concurrent user each user send and receive at least 50 wave and doc file per day.the normal file size 5MB maximum file size is 30 MB.we are following folder stucture to store all file.

so please suggest right solution for this i want to know RMI ot HTTP.

how much help if i use file server


please tell me
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41525
    
  53
It sounds like HTTP might be better suited than sockets. RMI is definitely not a good approach.

Where are the clients located - on the same network as the server? That is to say, is the use of a file server possible?

How are you handling the encryption that's crucial for any medical data?
Kaleeswaran Karuppasamy
Ranch Hand

Joined: Jul 19, 2007
Posts: 154
Originally posted by Ulf Dittmer:

How are you handling the encryption that's crucial for any medical data?


I asked this question in security topic i also new for data encryption and decryption.i asked question "which is famous security algorithm?" you were suggested AES and triple AES.

so you have any idea related Encryption/decryption

please suggest me.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41525
    
  53
Let's not sidetrack this discussion by talking about encryption specifics; that's what the other topic is for.

What is pertinent here is whether the files themselves are already encrypted, or whether you were planning to encrypt the file contents in transit. But it sounds like that isn't decided yet, so we can't yet use that as a criterion for aiding in the decision of how to transfer the files.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
That sounds like quite a volume of data. Since this is pure file transfer I see no reason to involve RMI at all.

If the clients are not on the same network as the server, you might consider having clients upload to Amazon's bulk storage service or something similar, with your server downloading the files as it gets the time.

This would give high reliability of transfer even during peak traffic at the cost of extra steps. Your clients could continue to send data even if your server is down or overloaded.

Bill
My survey article on using Amazon S3
Kaleeswaran Karuppasamy
Ranch Hand

Joined: Jul 19, 2007
Posts: 154
can i use http protocol with serial port communication using javaComm technologies i downloaded javacomm .dll file from http://www.rxtx.org/

please suggest me how reliable serial port communication with http protocol
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41525
    
  53
HTTP runs on top of TCP/IP, which is a completely different beast than serial communication. So, no, you can't.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
please suggest me how reliable serial port communication with http protocol


TCP/IP - as used with HTTP connections provides for error detection and automatic retrys. You would essentially have to reinvent the wheel to make serial port communication reliable, and for what? It would still be slower than even the slowest Ethernet network.

You appear to be thrashing around with various random ideas but you still have not described your problem with enough detail. Please answer the point Ulf and I raised:

Are these clients all on the same network as the server or are they dispersed?

Bill
Kaleeswaran Karuppasamy
Ranch Hand

Joined: Jul 19, 2007
Posts: 154
Originally posted by William Brogden:


Are these clients all on the same network as the server or are they dispersed?

Bill


in my project all the client on the same network.

In client side we use standalone application which is directly connected to server.the client may send voice and xml file to server directly.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41525
    
  53
in my project all the client on the same network.

Then a file server running Samba might be a viable alternative.
[ October 14, 2008: Message edited by: Ulf Dittmer ]
Kaleeswaran Karuppasamy
Ranch Hand

Joined: Jul 19, 2007
Posts: 154
Originally posted by Ulf Dittmer:

Then a file server running Samba might be a viable alternative.

[ October 14, 2008: Message edited by: Ulf Dittmer ]


can we use subversion for file sending instead of file server.subversion also open source we may customize and use.

please suggest me sir
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41525
    
  53
I'm sure there's a Java client API for SVN. But why would you introduce this complication? Are the files you're talking about actually versioned?
 
 
subject: which is best to sending file to client?