<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">I don’t have a good handle on naming, but I am giving a talk at Erlang Factory SF<div>on concurrency patterns using ets tables as the implementation mechanism.</div><div>The library is now called “Erlang Patterns of Concurrency” and resides at</div><div><a href="https://github.com/duomark/epocxy">https://github.com/duomark/epocxy</a> (was recently renamed, so there may</div><div>be references to dk_cxy around but they now resolve to epocxy)</div><div><br></div><div>The documentation is a bit lacking and will be updated Real Soon Now,</div><div>but it is a library you can include into an OTP application that provides</div><div>convenient multicore data and control structures. Right now these include:</div><div><br></div><div>1) ets_buffers: Ring, FIFO and LIFO implemented as an ordered ets array</div><div>2) concurrency control: Spawn processes freely up to a limit, use inline execution as back pressure</div><div>3) generational caching: Two ets tables, no per object expiration, delete oldest generation</div><div><br></div><div>There are plans for synchronization barriers and concurrent task queues.</div><div>Comments are welcome, as are attendees at my talk which is scheduled</div><div>first thing after the keynote on the first day.</div><div><br></div><div>“Eliminating Single Process Bottlenecks with ETS Concurrency Patterns"</div><div><br></div><div><a href="http://www.erlang-factory.com/conference/show/conference-6/home/#programme">http://www.erlang-factory.com/conference/show/conference-6/home/#programme</a></div><div><br></div><div><br></div><div>I have a strong bias against the misuse of worker pools* (find me and we</div><div>can discuss over drinks at EF!) when concurrency control is what is desired.</div><div>We have found that using ets for concurrent access allows a clean method</div><div>for specifying architectural data structures and functional organization and</div><div>have seen great speed ups without catastrophic failure under heavy loads.</div><div><br></div><div>jay</div><div><br></div><div><br></div><div>———</div><div><br></div><div>*Worker pools should be used for limited resources with long init</div><div>and fast transaction semantics, and not for other patterns. The message</div><div>queue backup and catastrophic failure under overload, coupled with restart</div><div>storms are devastating and should be avoided if possible.</div><div><br></div><div><div>Concurrent task queues allow the number of workers to vary and provide</div><div>a better view of pending and in process work load, plus they have the</div><div>advantage of realtime adaptive distribution of work as opposed to the</div><div>global assignment of work at the time of task arrival imposed by pools.</div></div><div><br></div><div>Using a task queue also affords the option of using hard real time</div><div>deadlines as an alternative to avoid server collapse, without any</div><div>structural changes to the system.</div><div><br></div><div><br></div><div><br></div></body></html>