Search code examples
architecturenetwork-programmingprotocolsapi-design

How to visualize a communication protocol for design purposes?


I'm developing a desktop application that communicates with a server through an http api.

I've realized that I made a mistake in the beginning of the development process and now I have to revamp the whole communication code in those applications (when to send what and what to reply, etc..).

Is there a methodology where I can visually (like a mindmap) plan all the communications between two piece of software?


Solution

  • One convenient way of visualizing communication protocols is using UML. Specifically, sequence diagrams similar to this:

    enter image description here

    This site has quite a few sequence diagrams of common communication protocols.

    Other, often useful, diagrams are communication diagrams:

    enter image description here

    and state diagrams:

    enter image description here

    There are a variety of UML modeling tools for creating such diagrams.