PC Review


Reply
Thread Tools Rate Thread

Asynchronous vs Synchronous network communication

 
 
Noel
Guest
Posts: n/a
 
      6th Dec 2004
Hi,
I am a tad confused about if there are any benefits from using
asynchronous vs synchronous network communication.
As my example, I have been writing a dns lookup stack with a network
communication class switchable between asynchronous and synchronous.
When I use asynchronous udp communication I find that if I want to
process a large amount of dns lookups I have one dns provider with
many state objects passing through (and a high object churn rate). If
I use synchronous udp communication I don't need state objects, but
have many providers each in a thread (although these providers are
static and so there is low churn).
It seems to me that both methods amount to the same result other than
the fact that using asynchronous communication results in a higher
object churn rate (leading to higher memory usage).
Can anybody clarify whether there really is an advantage in using one
over the other?

My second question is a bit of a throwaway. Using whatever network
communication, what kind of techniques exist to throttle something
like this based on available bandwidth?

Thanks,
Noel
 
Reply With Quote
 
 
 
 
Ivar
Guest
Posts: n/a
 
      7th Dec 2004
Hi,

For dns probably you won't get any benefit from async.
Where async gives good result ?
For example IMAP, most of time session is just IDLE.
When as sync you have 1 thread for each session, with async you just use
pooled threads if there is some work to do.

"Noel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
> I am a tad confused about if there are any benefits from using
> asynchronous vs synchronous network communication.
> As my example, I have been writing a dns lookup stack with a network
> communication class switchable between asynchronous and synchronous.
> When I use asynchronous udp communication I find that if I want to
> process a large amount of dns lookups I have one dns provider with
> many state objects passing through (and a high object churn rate). If
> I use synchronous udp communication I don't need state objects, but
> have many providers each in a thread (although these providers are
> static and so there is low churn).
> It seems to me that both methods amount to the same result other than
> the fact that using asynchronous communication results in a higher
> object churn rate (leading to higher memory usage).
> Can anybody clarify whether there really is an advantage in using one
> over the other?
>
> My second question is a bit of a throwaway. Using whatever network
> communication, what kind of techniques exist to throttle something
> like this based on available bandwidth?
>
> Thanks,
> Noel



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert asynchronous to synchronous cj_junktrap@mail.com Microsoft Dot NET Framework 2 29th Jul 2006 07:28 PM
TCPClient Synchronous or Asynchronous Writes =?Utf-8?B?SmVmZiBXZWJlcg==?= Microsoft C# .NET 5 23rd May 2005 11:07 AM
practical applications for synchronous and asynchronous communication jrefactors@hotmail.com Windows Networking 0 5th May 2005 12:54 AM
Is RaiseEvent Synchronous or Asynchronous in VB .Net ?? =?Utf-8?B?QWw=?= Microsoft VB .NET 3 9th Jul 2004 03:33 PM
MSV1_0 and synchronous/asynchronous calls William Dicks Microsoft Windows 2000 0 31st Mar 2004 09:30 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:39 PM.