1

I am starting to work on an application that consists of multiple components. Some of them reside at the server-side while some will be on the client side. I have most of the stuff figured out but I can't decide if I should use a human readable protocol for communication between the server and the client or if it is best if the format will be non-human readable.

So far all the scenarios could be made so that only text will be transferred between the server and the client. But obviously, if I take into consideration a future expanding I may be in the need to transfer non-text data (Ipotetical example: images)

For the actual communication channel I will use standard sockets (no REST, WebServices or anything like this), so I will have a lot of flexibility.

Both human-readable and non-human-readable have advantages and disadvantages, so I am unsure which path to take.

Petre Popescu
  • 1,950
  • 3
  • 24
  • 38
  • 1
    If you don't care about the advantages and disadvantages of the both solution, you should think about the advantages and disadvantages during "dev-time". A readable protocol is more easier to implement and more easier to debug. – nouney Jul 04 '13 at 22:07

1 Answers1

1

I'm a web developer and I have a strong preference for using human-readable protocols at the outset. For example, json. They have the advantage of being easy to debug and easy to prototype. Furthermore, they allow you to reach for all the low hanging fruit, such as rough system architecture and major bottlenecks without having to do mental translation at each step.

If later on you discover that the human readable version is a major bottle neck, you can address it then. I suspect you'll very often have other things you can optimize first.

fizban
  • 53
  • 6