[erlang-questions] How to Name Concurrency Patterns

Jay Nelson jay@REDACTED
Fri Feb 21 20:07:11 CET 2014


I don’t have a good handle on naming, but I am giving a talk at Erlang Factory SF
on concurrency patterns using ets tables as the implementation mechanism.
The library is now called “Erlang Patterns of Concurrency” and resides at
https://github.com/duomark/epocxy (was recently renamed, so there may
be references to dk_cxy around but they now resolve to epocxy)

The documentation is a bit lacking and will be updated Real Soon Now,
but it is a library you can include into an OTP application that provides
convenient multicore data and control structures. Right now these include:

1) ets_buffers: Ring, FIFO and LIFO implemented as an ordered ets array
2) concurrency control: Spawn processes freely up to a limit, use inline execution as back pressure
3) generational caching: Two ets tables, no per object expiration, delete oldest generation

There are plans for synchronization barriers and concurrent task queues.
Comments are welcome, as are attendees at my talk which is scheduled
first thing after the keynote on the first day.

“Eliminating Single Process Bottlenecks with ETS Concurrency Patterns"

http://www.erlang-factory.com/conference/show/conference-6/home/#programme


I have a strong bias against the misuse of worker pools* (find me and we
can discuss over drinks at EF!) when concurrency control is what is desired.
We have found that using ets for concurrent access allows a clean method
for specifying architectural data structures and functional organization and
have seen great speed ups without catastrophic failure under heavy loads.

jay


———

*Worker pools should be used for limited resources with long init
and fast transaction semantics, and not for other patterns. The message
queue backup and catastrophic failure under overload, coupled with restart
storms are devastating and should be avoided if possible.

Concurrent task queues allow the number of workers to vary and provide
a better view of pending and in process work load, plus they have the
advantage of realtime adaptive distribution of work as opposed to the
global assignment of work at the time of task arrival imposed by pools.

Using a task queue also affords the option of using hard real time
deadlines as an alternative to avoid server collapse, without any
structural changes to the system.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140221/085c34b5/attachment.htm>


More information about the erlang-questions mailing list