CPG provides a process group interface that is similar to the pg2 module within Erlang OTP. The pg2 module is used internally by Erlang/OTP, and is currently the most common approach to the combination of availability and partition tolerance in Erlang (as they relate to the CAP theorem). When comparing these goals with gproc (and its usage of gen_leader), gproc is focused on availability and consistency (as it relates to the CAP theorem), which makes its goals similar to mnesia. The cpg interface was created to avoid some problems with pg2 while pursuing better availability and partition tolerance. pg2 utilizes ets (global key/value storage in Erlang which requires internal memory locking, which limits scalability) but cpg uses internal process memory (see the Design section for more information). By default, cpg utilizes Erlang strings for group names (list of integers) and provides the ability to set a pattern string as a group name. A pattern string is a string that includes the"*"wildcard character (equivalent to ".+" regex while"**"is forbidden). When a group name is a pattern string, a process can be retrieved by matching the pattern. To change the behavior to be compatible with pg2 usage (or gproc), see the Usage section below.