• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File upload/download using UDP

 
Maulin Rathod
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

We have web based j2ee application which allows file upload/download. Due to latency issue upload/download is slower for many users.


1) I read that sending data using UDP can improve data transfer speed. How can we send file data using UDP?

2) We are zipping file using GZIP before upload/download to reduce amount data transfer. Is there better method available improve data compression?
 
Paul Clapham
Sheriff
Posts: 20986
31
Eclipse IDE Firefox Browser MySQL Database
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure, UDP increases transfer speed. But it also reduces reliability. Do your users care if pieces of the transmitted file are missing? If they do (and I expect they would) then you are going to have to write code to make sure that all of the pieces of the file arrive at the target and are put back together in the right order. And to do this your code would essentially have to duplicate what TCP does anyway.
 
Rob Spoor
Sheriff
Pie
Posts: 20514
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I could +2 Paul's post I would have. UDP does not guarantee that any packet arrives at its destination. It even allows everything to be dropped.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maulin Rathod wrote:We are zipping file using GZIP before upload/download to reduce amount data transfer. Is there better method available improve data compression?

I think Bzip2 has better compression than Gzip on average, at the expense of longer compression/decompression times. A Java implementation is part of http://commons.apache.org/compress/, so you can easily try if it compresses your data better than Gzip.

Rob Spoor wrote:If I could +2 Paul's post I would have.

Glad I could be of assistance :-)
 
Rob Spoor
Sheriff
Pie
Posts: 20514
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic