As I am working (is too difficult as i see and not easy to make it in some hours) on this "Tutorial"... sharing thoughts..
the question: Where an MQTT synchronous mode can be used ?
What "I" mean with synchronous may be not the same with what is possible exists (something read about paho c client library, etc)... or may be is the same...
Let's have a Real Life Example...
First... let's say we have two clients (at a broker/mqtt server)...
One that will share Data of his DB when asked for (Client-A) and other (Client-B) that will ask/request for specific data from Client-A...
How works in when in asynchronous mode...
Client-A opens DB... and wait for messagearrive (the request from Client-B)
when see the request will send the data
* simple and clean...
but in real life - how the Client-B will get the data asked...
1) What if those data-resulset are so many (200MB) that will make all freeze or if mqtt broker not has the feature of so big messages -will not transfer...?
2) and if the data-resultset is ok to transfer... when will come to Client-B.. ? --need to check with --messagearrived-- (answer - but not this we want - right ?)
How will be working in synchronous mode or at the mode we will create... ?
Client-A opens DB... and wait for messagearrive (the request from Client-B)
when see the request will send the data
* simple and clean...
Client-B, Request for Data
Client-B, Wait for Data (waitfor)------------------------- ---> Imagine those commands in one "button sub" and no need to have check messsagearrived
Client-B, when all data arrived - show the data
* also imagine that at wait for will append all (possible) splitted bytes transferred from the other Client..
still working on all that... if someone has something to share - will be useful