Tomas Petricek

Searching for new ways of thinking in programming & working with data

I believe that the most interesting work is not the one solving hard problems, but the one changing how we think about the world. I follow this belief in my work on data science tools, functional programming and F# teaching, in my programming languages research and I try to understand it through philosophy of science.

The Gamma

I'm working on making data-driven storytelling easier, more open and reproducible at the Alan Turing Institute.

Consulting

I'm author of definitive F# books and open-source libraries. I offer my F# training and consulting services as part of fsharpWorks.

Academic

I published papers about theory of context-aware programming languages, type providers, but also philosophy of science.

Tomas Petricek
  • Tomas Petricek
  • Home
  • F# Trainings
  • Talks and books
  • The Gamma
  • Academic

Concurrent programming with F# agents in London

If you live anywhere near London and are interested in F#, then you probably already follow the F#unctional Londoners group started by Carolyn Miller and Phil Trelford. I gave a talk at the user group in June about Reactive programming in F# (if you missed that, you can view the recording). I really enjoyed talking to an audience where most of the people already played with F#, so when I met with Phil recently, I couldn't resist offering another presentation.

My next talk will be about Concurrent programming with Agents using the MailboxProcessor type. A part of the talk will be inspired by my recent blog series about parallel programming, but I just finished another pretty cool example, so you should come even if you read my blog! This time, we'll have two talks, so you can also look forward to Phil Trelford's Behaviour Driven Development with TickSpec (you just cannot miss his debugging demo!).

When, what & where?

  • See also: Concurrency with Agents and BDD with TickSpec at F#unctional Londoners
  • Date & time: 24 November (Wednesday), 7:00 PM
  • Location: The Skills Matter eXchange, 116-120 Goswell Road, London

Last time, I brought a copy of my Real-World Functional Programming as a giveaway and I think I still have a few copies lying around...

Talk teaser: F# agents

F# agents (the MailboxProcessor type) are an implementation of message passing concurrency. This is a very attractive alternative to shared memory or even standard task-based or data-parallel concurrency models. It makes it easy to write reactive applications that receive inputs from various sources in parallel (e.g. user interface, network, background tasks etc.) Agents communicate by sending (immutable) messages to each other, which makes the application easy to understand. If you design the application correctly (and structure it using enough agents) it can be also very scalable. Among other things, I'll show the following examples:

  • Agent-based chat - A simple example to introduce agents will be a chat room that uses agent to store the state of a chat. You'll see that an asynchronous and concurrent application can be written quite easily with F#. You'll also see how to expose this service using a few lines of beautiful F# code inspired by Node.js.
  • Reusable agents, buffering and blocking - We'll also look at a few agents that are not directly bound to any application and you can use them to implement common communication patterns. If you have a few agents like this, you can easily put together a sophisticated application just by composing existing agents.

Published: Tuesday, 23 November 2010, 4:40 AM
Author: Tomas Petricek
Typos: Send me a pull request!
Tags: presentations

Contact & about

This site is hosted on GitHub and is generated using F# Formatting and DotLiquid. For more info, see the website source on GitHub.

Please submit issues & corrections on GitHub. Use pull requests for minor corrections only.

  • Twitter: @tomaspetricek
  • GitHub: @tpetricek
  • Email me: tomas@tomasp.net

Blog archives

October 2020 (1),  July 2020 (1),  April 2020 (2),  December 2019 (1),  February 2019 (1),  November 2018 (1),  October 2018 (1),  May 2018 (1),  September 2017 (1),  June 2017 (1),  April 2017 (1),  March 2017 (2),  January 2017 (1),  October 2016 (1),  September 2016 (2),  August 2016 (1),  July 2016 (1),  May 2016 (2),  April 2016 (1),  December 2015 (2),  November 2015 (1),  September 2015 (3),  July 2015 (1),  June 2015 (1),  May 2015 (2),  April 2015 (3),  March 2015 (2),  February 2015 (1),  January 2015 (2),  December 2014 (1),  May 2014 (3),  April 2014 (2),  March 2014 (1),  January 2014 (2),  December 2013 (1),  November 2013 (1),  October 2013 (1),  September 2013 (1),  August 2013 (2),  May 2013 (1),  April 2013 (1),  March 2013 (1),  February 2013 (1),  January 2013 (1),  December 2012 (2),  October 2012 (1),  August 2012 (3),  June 2012 (2),  April 2012 (1),  March 2012 (4),  February 2012 (5),  January 2012 (2),  November 2011 (5),  August 2011 (3),  July 2011 (2),  June 2011 (2),  May 2011 (2),  March 2011 (4),  December 2010 (1),  November 2010 (6),  October 2010 (6),  September 2010 (4),  July 2010 (3),  June 2010 (2),  May 2010 (1),  February 2010 (2),  January 2010 (3),  December 2009 (3),  July 2009 (1),  June 2009 (3),  May 2009 (2),  April 2009 (1),  March 2009 (2),  February 2009 (1),  December 2008 (1),  November 2008 (5),  October 2008 (1),  September 2008 (1),  June 2008 (1),  March 2008 (3),  February 2008 (1),  December 2007 (2),  November 2007 (6),  October 2007 (1),  September 2007 (1),  August 2007 (1),  July 2007 (2),  April 2007 (2),  March 2007 (2),  February 2007 (3),  January 2007 (2),  November 2006 (1),  October 2006 (3),  August 2006 (2),  July 2006 (1),  June 2006 (3),  May 2006 (2),  April 2006 (2),  December 2005 (1),  July 2005 (4),  June 2005 (5),  May 2005 (1),  April 2005 (3),  March 2005 (3),  January 2005 (1),  December 2004 (3),  November 2004 (2), 

License

Unless explicitly mentioned, all articles on this site are licensed under Creative Commons Attribution Share Alike. All source code samples are licensed under the MIT License.

CC License logo