Re: [racket-users] Racket's UDP Behavior

2016-04-12 Thread Nick Gordon
On Monday, April 11, 2016 at 1:41:57 PM UTC-5, Tony Garnock-Jones wrote:
> On 04/11/2016 01:52 PM, Nick Gordon wrote:
> > I'm building reliable data transfer onto Racket's UDP suite for a
> > term project, and I need to know what Racket does with corrupt
> > datagrams. Since the Racket docs don't mention the word checksum for
> > the UDP segment, I need to know some things:
> 
> The kernel discards corrupt UDP datagrams, so Racket doesn't see them.
> 
> There is certainly *no* automatic retransmission involved.
> 
> > I can't build reliable data transfer until I can be sure I'm not
> > losing datagrams in the ether, and I don't know how to accomplish
> > this. Is there a preferred workaround for this (as in continued
> > retransmission until the datagram successfully reaches its
> > destination)?
> 
> Yes, effectively this. I recommend reading up on protocols for achieving
> "reliable" delivery on unreliable networks. For example, look into how
> TCP works. (Bear in mind that UDP is basically the same thing as IP.)
> 
> One of your first tasks will be to decide what "reliable" means in your
> context. If you haven't seen it before, check out the
> Fischer-Lynch-Patterson Impossibility Result:
> http://the-paper-trail.org/blog/a-brief-tour-of-flp-impossibility/
> 
> Also, look into the Byzantine Generals problem:
> https://en.wikipedia.org/wiki/Byzantine_fault_tolerance
> 
> Once you understand why the Byzantine Generals problem has no solution,
> you can start to work toward making a decision about how your "reliable"
> system should behave in corner cases.
> 
> Tony

I haven't had the time to look up those theoretical results, but I definitely 
have taken your advice into account. It deviates slightly from the "ideal" 
design specification, but since we aren't actually rewriting the 
transport-level driver for our OS, we have to sort of "emulate" the system.
Thus, I am compensating for not being able to interact with corrupt datagrams 
by having each side of the program resend them whenever they detect a loss.

Thank you much!

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Racket's UDP Behavior

2016-04-11 Thread Nick Gordon
I'm building reliable data transfer onto Racket's UDP suite for a term project, 
and I need to know what Racket does with corrupt datagrams. Since the Racket 
docs don't mention the word checksum for the UDP segment, I need to know some 
things:

* Does Racket just throw away corrupt datagrams?
** Does it then notify the program that's running (udp-receive!)?
* When it detects a corrupt datagram, does it do something as radical as 
contact the sender for retransmission? 

I can't build reliable data transfer until I can be sure I'm not losing 
datagrams in the ether, and I don't know how to accomplish this. Is there a 
preferred workaround for this (as in continued retransmission until the 
datagram successfully reaches its destination)?

Thanks,
Nick

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.