Skip to content

All the tutorials: we need motivating (advanced) examples in our docs #175

@goodboy

Description

@goodboy

Clearly, we need some fancier and more immediately practical examples in our readme (says every person who's glanced ever), so I figured I'd start list of what I think would be coolio.


A "worker pool" example copying concurrent.futures's prime number calculator


The multiprocessing.Pool examples:


A "controlled fork blast" example

  • this would be an example of creating a fork bomb out of nested nurseries which can be "controlled" via a SIGINT from the user once they've decided that enough CPU has been crushed; this demonstrates very succinctly the true power of SC.
  • we might want to monitor system resources for this test to avoid making it impossible to send input whatsoever

A real-time streaming sorting algorithm

  • I was thinking of implementing an async-ified version of pythonmaxmin which is based on the paper here
  • Another thing we might be able to show off is performing this sort on multiple streams in parallel and using a trio-ized version of an Rx merge to serialize results.

Target tutorial set:

this is the back of hand list I can think of:

  • basic spawning and actor lifetime management
  • nested actor trees and inter-actor rpc
  • basic streaming
  • advanced 2-way streaming
  • debugger usage
  • daemon structures and (micro)serivice design
  • fancy recipes and tractor.extras

Lurker opinions always welcome.

We might actually need to pick the best of these and then stick the rest in a parallelism tutorial.
Actually, we might want a streaming, shared state, and parallelism tutorial in the new docs.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions