Ayende recently blogged about over the wire protocol design, and I wanted to echo opinion on this subject!
How to actually send it?
As applications become more complicated they frequently need to communicate with remote resources. So how should your applications talk to each other? If you had not figured it out already: I suggest HTTP!
Why use HTTP?
Here are just a few very small reasons that I love working with HTTP:
- It is supported by every language.
- It is supported by every platform.
- It is supported by every device.
- It has standards for authorization.
- It has standards for encryption.
- It has standard response codes.
- There are amazing tools for it.
- There are more amazing tools for it.
- There are still more amazing tools for it.
...need I go on?
Why NOT use HTTP?
I always look to successful companies for inspiration with technology. If you are making a store front, I suggest you look at Amazon or Newegg. If you are creating social media features, I suggest you look at Facebook or Twitter. If you are designing APIs, I suggest you look at Google. Do you know what Larry Page did not say after Google made it big? "Man, I really wish that we hadn't invested so heavily in all of that web stuff!"
Okay seriously, depending on your application there may be reasons not to use HTTP as your communication protocol. However for the vast majority of applications I think it will do the job, and I strongly urge you to consider using it instead of reinventing the wheel again.
Just my two cents,Tom