User Tools

Site Tools


This is an old revision of the document!

Lab 5

We're going to be following the discussion and code experiments in this blog post by Piotr Szymański:

Simple interactions between processes

A few suggestions before you start:

  • You might want to use the Linux machines to run these examples. If you use a laptop, don't try sending millions of messages.
  • To start, use the module name Table as in the blog. When you get to the section Sending messages back and forth between processes put that code in a new module called Table2 and use that name in the tests that follow.
  • In the section after we start the Observer using :observer.start Piotr suggests running 100 million processes. Don't. If you do too many sends, the process mailbox can get *very* full when the process can't keep up - my poor 4GB MacBook died. Rather, start small and build up to 1 million (this will still take some time). For example:
    p = Table.start
    1..100 |> _ -> send p, :ping end) |> Enum.count
  • If you want to try stress-testing with 100 million processes, do it last…and on the Linux box, not a laptop.
cs326/lab5.1635134606.txt.gz · Last modified: 2021/10/24 23:03 by scarl