Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Multiple write locking for BerkeleyDB

by samtregar (Abbot)
on Apr 24, 2008 at 16:35 UTC ( [id://682670]=note: print w/replies, xml ) Need Help??


in reply to Re: Multiple write locking for BerkeleyDB
in thread Multiple write locking for BerkeleyDB

Neat, but beware UDP is a lossy protocol and your code doesn't appear to do anything to detect dropped packets!

-sam

  • Comment on Re^2: Multiple write locking for BerkeleyDB

Replies are listed 'Best First'.
Re^3: Multiple write locking for BerkeleyDB
by BrowserUk (Patriarch) on Apr 24, 2008 at 19:35 UTC
    UDP is a lossy protocol

    Yes. That is the nature of udp. But for some applications, throughput and low latency are more important than absolute reliability, which is why udp exists.

    For comms within the same machine where the "transmission" consists entirely of transfers between memory buffers, the scope for non-delivery is relatively low. Even on a local subnetwork with modern high-speed circuits, non-delivery is pretty unheard of unless the subring is running close to its maximum bandwidth. The main source for dropped packets is at the listener if it doesn't service them in a timely manner, which was the purpose of using two threads and buffering to ensure the recv loop could run as tightly as possible.

    For the purposes of my testing, the mechanism for "detecting dropped packets" consisted of printing out how many were sent and how many were received. Good enough for a quick test. I had to make my machine work very hard indeed before it would drop any packets at all. By kicking out my firewall for a test I got close to a 1e6/minute using 5 producers before it started dropping packets.

    However, whether the OPs statistics gathering requires 100% guarantee of accuracy, or just an ongoing indication of current trends where random dropouts are likely to affect all statistcs equally and so not affect their legitimacy--think random sampling--only he will know for sure.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://682670]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-18 02:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found