[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] How to implement protocols?

  • To: mirageos-devel <mirageos-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Hannes Mehnert <hannes@xxxxxxxxxxx>
  • Date: Tue, 17 Nov 2015 14:51:06 +0100
  • Delivery-date: Tue, 17 Nov 2015 13:51:32 +0000
  • List-id: Developer list for MirageOS <mirageos-devel.lists.xenproject.org>
  • Openpgp: id=11B5464249B5BD858FFF6328BC896588DF7C28EE

On 11/14/2015 16:48, Richard Mortier wrote:
> One thing I mentioned off-list, but would be interested in a wider
> opinion on, is how best to handle timers, eg., for retransmission.
> What seems to be the best thought I have on this so far is to turn the
> appropriate responses from the pure core into a "transmission thread"
> that will transmit and then retransmit packets according to whatever
> schedule is mandated, and will be cancelled by suitable subsequent
> response from the pure core. But other suggestions (or examples)
> welcome!

What about:
Pure protocol logic should provide
 [ `Sent of buffer ;
   `Retransmit of buffer -> bool * int * buffer ]

Where now each incoming packet is processed by the cancel function of
retransmit.  A timer is installed which handles the retransmission.

I have no good answer here since I haven't played around with timing too
much.  But keeping the concrete time/clock out of the core sounds
appealing to me (and at the same time, do not leak protocol logic in the
effectful thing).


Attachment: signature.asc
Description: OpenPGP digital signature

MirageOS-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.