mirror https://github.com/ostinelli/syn
![]() |
5 лет назад | |
---|---|---|
src | 5 лет назад | |
test | 5 лет назад | |
.gitignore | 9 лет назад | |
.travis.yml | 7 лет назад | |
LICENSE.md | 5 лет назад | |
Makefile | 5 лет назад | |
README.md | 5 лет назад | |
rebar.config | 5 лет назад | |
rebar.lock | 5 лет назад |
Syn (short for synonym) is a global Process Registry and Process Group manager for Erlang.
A global Process Registry allows registering a process on all the nodes of a cluster with a single Key. Consider this the process equivalent of a DNS server: in the same way you can retrieve an IP address from a domain name, you can retrieve a process from its Key.
Typical Use Case: registering on a system a process that handles a physical device (using its serial number).
A global Process Group is a named group which contains many processes, possibly running on different nodes. With the group Name, you can retrieve on any cluster node the list of these processes, or publish a message to all of them. This mechanism allows for Publish / Subscribe patterns.
Typical Use Case: a chatroom.
Syn is a Process Registry and Process Group manager that has the following features:
In any distributed system you are faced with a consistency challenge, which is often resolved by having one master arbiter performing all write operations (chosen with a mechanism of leader election), or through atomic transactions.
Syn was born for applications of the IoT field. In this context, Keys used to identify a process are often the physical object's unique identifier (for instance, its serial or MAC address), and are therefore already defined and unique before hitting the system. The consistency challenge is less of a problem in this case, since the likelihood of concurrent incoming requests that would register processes with the same Key is extremely low and, in most cases, acceptable.
In addition, write speeds were a determining factor in the architecture of Syn.
Therefore, Availability has been chosen over Consistency and Syn is eventually consistent.