views:

25

answers:

2

I know only webservices,webrequest&webresponse,sockets are the ways to send/receive data.

can someone one please list out the various ways to send the information from one website to other website, and their pros&cons?

Which one is best under which situation?

A: 

Well the question is a bit vague but I will go ahead and get something started:

Web services(soap, rest)
- soap is secure but very verbose. rest is lightweight but lacks the security that soap offers. Though you can still encrypt using https

tcp sockets- guaranteed delivery, bigger payload than udp, cumbersome to setup for web based solutions
udp sockets- lighter payload, non guaranteed delivery, ability to broadcast to all ports listening but most routers don't like this

web request/response - pretty straightforward

But as for which one to use we really can't answer that without some context for the question. What are you trying to communicate? How many clients are we communicating to? Will this be initiated or do you need to notify?

spinon
I don't know where you get the idea that SOAP is somehow more "secure". It doesn't specify any particular means of security or even authentication. Worse, comparing it directly to REST like that is not a good idea. SOAP is a well-defined RPC protocol, while REST is a design concept, and there are any number of ways to secure both.
Nicholas Knight
Well with SOAP I can use x509 certificates which is not an option that you can do with REST based web services.Yes I do agree that REST is a design protocol but it is the approach of how the web services are implemented which I was trying to make the comparison.
spinon
Whaaa...? Of course you can use x509 certs with REST. All you need is a web server and client HTTPS library that supports checking client certs. Off the top of my head, Apache and nginx have the necessary support, and at least libcurl can be used on the client side.
Nicholas Knight
Ok yes you can on the server itself but I am talking about binding the soap envelope to the certificate which obviously there is no envelope for the rest request. That was my point. Sorry if it wasn't clear.
spinon
A: 
  • All protocols and techniques involving HTTP based data exchange.
  • Another intersting way would be to share the data on network-drives. Two web-applications can exchange data over a networ-drive from their back-end coding that does not involve HTTP at all.
this. __curious_geek