Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
This patch is a good step towards reducing the risk of race condition,
regarding the insertion of new puppets in a given instance. Indeed,
the `register_puppet` functions of `System` is blocking (it is a
`call`), therefore an Instance will not be able to deal with proxy
requests targeting Systems before the new puppet has been registered
to each Systems.
|
|
|
|
Previously, we were using a Registry with duplicated keys, but they
are not very error-friendly. In particular, the documentation states:
> For example, if a process crashes, its keys are automatically
> removed from the registry but the change may not propagate
> immediately.
In lkn, we rely on keys rather than PID to identify and reach
processes. The Instance already remembers its registered Puppeteers
key. As a consequence, we can rely on the Instance to dispatch
notification, we do not need the Registry.
|
|
The use of the :via atom was confusing, as a dispatch Registry can be
any term and :via has a special meaning in Elixir. The new key format
is more straightforward and therefore better.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fixes: #10
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Before, a given Puppeteer implementation could only expose the
functions of its Specifictaion. It was quite limited and prevented
several scenario where a Puppeteer could be influenced by some master,
e.g. a Player Puppeteer by network events, an Instance logger by the
Instance itself, etc. This patch addresses this limitation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|