• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Synchronous and Asynchronous ???

 
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Can you please tell the exact meanings of synchronous and asynchronous communications?

Thanks.
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Synchronous is where the sender of a request sits around doing nothing waiting for a response.

Asynchronous is where a request is sent then the sender gets on with other stuff. Replies may come back later from the recipient.
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Conversation is usually synchronous. I say something, then wait for you to reply. During that wait it would be rude of me to do something else like play a game on my phone, so I don't.

But postal mail communication is asynchronous. I send you a letter and then go on with my life for a couple days. When you send a reply I rip it open and read it.

Ordinary method calls are synchronous. I call someobject.method() and block until that returns.

If I start another thread I may get an asynchronous reply. I can go on and do other things while the other thread runs, and it may call my object back some time in the future.

Message queuing is often (but not always) asynchronous. Any kind of multi-threaded program like a Swing UI can get into async territory, too.

Does that help?
[ May 24, 2006: Message edited by: Stan James ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic