fpjxmqjtaw
fpjxmqjtaw

Reputation: 503

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?

Upvotes: 1

Views: 1195

Answers (2)

Malt
Malt

Reputation: 30335

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.

Upvotes: 1

Meta_data
Meta_data

Reputation: 608

I didnt understand what your application need to do but i have some experience with those problems after designing few apps for mobile and desktop.

in general there are tow main features :

  • push
  • pull

either side of your system can implement those features , but the other side must support this . for example push from local app -> server can only work when the app is running - front / background and its can get access some to local resources: internet connection , cpu , disk , ram. we need to get internet connection in order to generate http call and pass some data. so you can design this to run once app is lunched or to add these to the OS Scheduler. OS Scheduler can be found on Mac OS , Linux , Windows and you can get access to this feature and use this in order to define tasks that would run even if your app isn't lunched.

in case your local app can run without internet connection , for example mobile games working on an area with no 3G net or Wifi. you can design your app to store data locally on disk / Ram and send this to server once you have internet connection.

another issue is to think on the connection to the server , you might have some downtime. so your local app should always get confirmation that data is sent and received on the server and all necessary actions happened : Logs , database save and etc.only after getting a confirmation you local app can delete the msg.

pull feature is quite simple , your local app pull data on lunch or on a schedule task . the other way around server pull from local its more tricky unless you know how to build live streams sockets code that is now available and apply on meteor framework for example. but in general there is no need for this most of the time.

i hope this will help you and generate some ideas that will help.

Upvotes: 0

Related Questions