In fact, check out the whole CUFP schedule — in general there are a number of interesting talks at the conference part on Sep. 22, including my old friend Dave Thomas’s keynote, and a bunch of nice tutorials on the two following days. I’m greatly looking forward to attending Yaron Minsky’s and Anil Madhavapeddy’s OCaml tutorial and Dean Wampler’s Scala tutorial, since I don’t know either language (yet).
Hope to see you there!
]]>ets
tables if the Erlang processes that own those tables crash. The original post resulted from accidentally losing an ets
table full of video subscriber data during a debug session on a live customer production site. Oops.
If you’re looking for some code that implements what that post describes, look no further than DeadZen‘s etsgive
repository. DeadZen is a very experienced Erlang developer, so it’s no surprise that his example code is straightforward and clean.
Just as described in my post, DeadZen’s supervisor code starts two workers, one that manages the table and one that uses it. The table manager process takes the following steps:
ets
tableThe table user worker process first handles the transfer message resulting from the manager giving it ownership of the table. Once it becomes the owner, it can handle a call to increment a counter in the table and a call to check the table contents. It can also handle a call to die, which you would issue interactively from an Erlang shell to exercise the code. This causes the worker process to die, which means the table manager regains ownership of the table because it’s the table’s heir. The table manager then waits for the supervisor to start a a new table user worker process, and once it’s up and running, the manager links to it and then transfers table ownership to it.
This written description might be difficult to work through, but fear not, DeadZen also supplies an example Erlang shell session showing how it all works. Clone his repository and try it out for yourself!
]]>The CUFP workshop is part of ICFP 2013, and the CUFP talks will be held in Boston on Sep. 24, 2013.
]]>It’s a satellite event of the 18th ACM SIGPLAN International Conference on Functional Programming (ICFP), September 25–27, 2013. http://www.icfpconference.org/icfp2013/.
The PC is chaired by Laura M. Castro, and I’m serving as the workshop chair and as part of the program committee. We’re looking forward to receiving many excellent paper submissions from the ever-growing Erlang community.
]]>