Make 'slots' concurrent #9
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We have 'solvers' running in the OS, 'workers' parsing their results via a separate erlang port each, and then the client's 'server' receiving exit statuses and starting new 'workers' as needed. The language is confusing, but this is otherwise a good use of erlang's lightweight concurrency.
We should go further with this, though, and add another layer of process indirection, to offload as much of the 'server' complexity to the erlang runtime as we can. We want each 'slot' to be a process, so that the 'slot' logic can simplify down to
This 'slot' should not crash, so if it does crash, we are in the realm of fault tolerance, and can configure a supervisor to restart the worker, or propagate the crash upwards, as necessary.
Then the server no longer deals with restarting slots, nor with restarting workers, so it is simply a nonce allocator, and interface for the workers to report back to... In other words, the server should be split into a service=>worker pattern, probably using
zx template swp
.