• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

File upload/download using UDP

 
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?
 
Marshal
Posts: 25811
69
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.
 
Sheriff
Posts: 21997
107
Eclipse IDE Spring VI Editor Chrome Java Ubuntu 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.
 
Rancher
Posts: 43016
76
  • 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
Posts: 21997
107
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!
 
We've gotta get close enough to that helmet to pull the choke on it's engine and flood his mind! Or, we could just read this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic