Snippets tagged agents

  • Generic agent post operator

    Generic operator that introduces a convenient syntax for "posting" messages into any agent that has Post member. Specifically, it's useful for the standard MailboxProcessor and the AutoCancelAgent (from FSharpx library).

    4 people like this

    Posted: 11 years ago by Vasily Kirichenko

  • Floating window over observables

    Creates an observable that returns windows of size 'n' (or smaller at the start) containing 'n' past values produced by observable 'source'. The order of items in the returned buffers is not guaranteed (it's a circular buffer).

    3 people like this

    Posted: 8 years ago by Tomas Petricek

  • Receive-only SMTP server

    An agent is used to act as SMTP server and receive emails. Another agent receives emails from the SMTP server and also responds to requests for all emails received. A type is exposed that wraps this behaviour in a single method to get the list of emails.

    5 people like this

    Posted: 9 years ago by Nick Lydon

  • Parallel recursive crawler using agents

    The aim here is to demonstrate a method of distributing work using the built in F# agent across multiple nodes in parallel the result of crawling one page might result in finding multiple new pages to fetch. This is a recursive process which will continue until no new URLs are found. The main focus is how to process a potentially indefinite queue of work across a pool of workers, rather than how to parse web pages.

    6 people like this

    Posted: 8 years ago by Daniel Bradley