Another team at my company is starting a new project where a few entities will need to communicate across the network. I overheard that they were going to implement the communication layer by making entities send messages to each other via sockets.
I asked them why. Why not send over HTTP or XMPP? A discussion followed where my arguments in favor of using another estabilished protocol were, basically:
- not having to open/close streams.
- demultiplexing of messages is already implemented.
- passing parameters and values is easier (no need to create a micro-language to serialize values).
All this, however, was not enough to convince them. Some thought that "our messages are too small and simple, there's no need to add this complexity". Other just thought that this was plain rubbish.
I'd like to know from you your opinion on this subject. Do you consider using other application protocols to implement your communication layer on top of? Or do you prefer sending custom messages through sockets?