August'24: Kamaelia is in maintenance mode and will recieve periodic updates, about twice a year, primarily targeted around Python 3 and ecosystem compatibility. PRs are always welcome. Latest Release: 1.14.32 (2024/3/24)

Kamaelia.Internet.Simulate.BrokenNetwork

Broken Network Simulation

Components to simulate properties of an unreliable network connection. Specifically: out of order delivery, duplication, and loss of packets.

Original author: Tom Gibson (whilst at BBC)

Example Usage

Testing a forward-error correction scheme to cope with an unreliable network:

Pipeline( RateControlledFileReader("sourcefile",rate=1000000),
          MyForwardErrorCorrector(),
          Duplicate(),
          Throwaway(),
          Reorder(),
          MyErrorRecoverer(),
          SimpleFileWriter("receiveddata")
        ).activate()

Duplicate, Throwaway, Reorder

These three components all receive data and, respectively, randomly duplicate packets, re-order packets or throw some packets away.

They can be used to simulate the effects of multicast delivery over wireless or a WAN.

More details

These component all receive data on their "inbox" inbox and send it on to their "outbox" outbox. However, they will sometimes tamper with the data in the manners described!

None of these components terminate when sent shutdown messages.

History

This was used for the development of a simple recovery protocol. The actual version in use replaces the string2tuple and tuple2string code (in sketches in tomg.py, omitted here), with something more robust.


Kamaelia.Internet.Simulate.BrokenNetwork.Duplicate

class Duplicate(Axon.Component.component)

Duplicate() -> new component.

This component passes on data it receives. Sometimes it randomly duplicates items.

Inboxes

Outboxes

Methods defined here

Warning!

You should be using the inbox/outbox interface, not these methods (except construction). This documentation is designed as a roadmap as to their functionalilty for maintainers and new component developers.

main(self)

Kamaelia.Internet.Simulate.BrokenNetwork.Reorder

class Reorder(Axon.Component.component)

Reorder() -> new component

This component passes on data it receives, but will sometimes jumble it up (reordering it).

Inboxes

Outboxes

Methods defined here

Warning!

You should be using the inbox/outbox interface, not these methods (except construction). This documentation is designed as a roadmap as to their functionalilty for maintainers and new component developers.

main(self)

Kamaelia.Internet.Simulate.BrokenNetwork.Throwaway

class Throwaway(Axon.Component.component)

Throwaway() -> new component.

This component passes on data it receives, but sometimes it doesn't!

Inboxes

Outboxes

Methods defined here

Warning!

You should be using the inbox/outbox interface, not these methods (except construction). This documentation is designed as a roadmap as to their functionalilty for maintainers and new component developers.

main(self)

Feedback

Got a problem with the documentation? Something unclear that could be clearer? Want to help improve it? Constructive criticism is very welcome - especially if you can suggest a better rewording!

Please leave you feedback here in reply to the documentation thread in the Kamaelia blog.

-- Automatic documentation generator, 05 Jun 2009 at 03:01:38 UTC/GMT