Re: 1000's UDP packets arrive same time problem



ramta jatt via .NET 247 wrote:

I have problem of packet drop out.

UDP transfers are unreliable, packets can be dropped at any time. Probably your network is congested or you cannot handle the amount of input fast enough.


How much is the buffer size for UDP packets? Can I chnage it? My app can not allow droping of packets.

You should really make a protocol on top of UDP to ensure against packet loss.


With the amounts of data that you seem to be sending are you sure you don't just want to be able to detect that packages have been lost?

Exactly what can you do if a package is lost?

Second problem is, the packets contain different type of information and will be processed by different Threads. I f I use a queue, I will be having a thread-safe problem.

Make yourself a thread-safe Producer/Consumer queue. You can use a Mutex (for example) to block readers untill data is available.


Please suggest me some design that will help me to solve above problems. I am using vb.net

It sounds like you need to be able to offload packages from the OS as fast as possible. Make the routine that receives packages queue the raw package so it does as little work as possible. Have some lower priority threads for processing the genberated queue. Not that this might cause the queue to grow indefinatly, with disasterous results, if you dont have enough processing power to process it.


You can also have a look at asynchroneous IO, but that's going to generate a radically different way of coding your IO, and it's easy to get wrong. It's not too bad if you just queue the incoming packages, but still...

Possibly you could think about coding the performance-bound IO in C# to skip the VB interpretation? (I know close to nothing of VB, and you should check that you actually gain anything by changing this part to C#/... yourself).

--
Helge Jensen
  mailto:helge.jensen@xxxxxxx
  sip:helge.jensen@xxxxxxx
               -=> Sebastian cover-music: http://ungdomshus.nu <=-
.



Relevant Pages

  • ANN: Xpdf v3.02 for OpenVMS/Alpha
    ... I'm pleased to announce that there are fresh Xpdf 3.02 PCSI packages ... name of a print queue instead of a print command, ... postscript directly to that queue using SYS$SNDJBCW. ...
    (comp.os.vms)
  • Re: Another "testing" vs "unstable" question
    ... but there's no way to test those backports thoroughly enough to ... >>match the amount of testing that went into stable in the first place. ... complex web of interactions among packages. ... Debian has no such ...
    (Debian-User)
  • Re: Looking for speed increases in "make index" and pkg_version for ports
    ... targets. ... I'm not sure it can be applied to the ports tree, ... Also, I was thinking in particular of the X.Org 7.2 packages, because the bulk majority of the packages are smaller, and compile in a short amount of time. ...
    (freebsd-hackers)
  • Re: Another "testing" vs "unstable" question
    ... >> packages go through a large amount of turnover and you'll usually ... >> have to upgrade a few times per week to keep your system in sync. ...
    (Debian-User)
  • Re: reliability of datagrams between processes on same machine?
    ... amount of buffering). ... but how about reliable delivery if we assume that the send queue never ... I was involved in a commerial real-time video project using Solaris, ...
    (comp.os.linux.networking)