• Post Reply Bookmark Topic Watch Topic
  • New Topic

sockets  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what are the advantages and disadvantages of using sockets for mail application over servlets
 
Harish Kashyap
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
since servlets uses the http protocol and hence http headers contains all the information about the data to be transfered.
http uses two methods of transfer viz. GET and POST.
these are slower compared to the streamline flow of data through the sockets.the data through sockets is not using get or post.
its a stream of bytes travelling towards the destination. so these are faster than the internet GET and POST http methods.
the packet size in both the cases is different . The http packets contains more informations compared to those in sockets. Moreover socket transmission is not a pure tcp/ip communication
that's why it is faster.
 
alexander Petrovich
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and also don't forget about firewalls!
With sockets it is very difficult to create apllication which will easy work in any network. You need to ask administrator to open some ports to make a connection. But with HTTP it is no problem on most intranets!
alex from http://javafaq.nu/java
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!