<div dir="ltr">Dan, thanks for the mnesia hint. It looks like a murky pool to dive into, but I'll read into it more.<br></div><br><div class="gmail_quote"><div dir="ltr">On Tue, May 15, 2018 at 12:52 PM Ryan Stewart <<a href="mailto:zzantozz@gmail.com">zzantozz@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks for the pointer, Andrew. The process per resource would work, but how would you ensure that only one process is started per resource? The only way I know would be to write a central "manager" process that keeps track of the resource processes and directs traffic according to the resource "key", ensuring a new process is started when a new resource comes in demand. On top of that, the manager has to be aware of other nodes in the cluster and resource processes that might already exist elsewhere That's still a lot more work than seems necessary.<br></div><br><div class="gmail_quote"><div dir="ltr">On Tue, May 15, 2018 at 10:53 AM Andrew Thompson <<a href="mailto:andrew@thecloud.hijacked.us" target="_blank">andrew@thecloud.hijacked.us</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, May 14, 2018 at 04:53:08PM -0500, Ryan Stewart wrote:<br>
> Funneling all the calls through a single process would bring the system to<br>
> a grinding halt. Sure, I could write a system of processes, each of which<br>
> acts as a mutex to one, particular resource, but why would I want to? All I<br>
> need is locking, just like global locks, but fair. It seems like something<br>
> that should already exist in a proven library.<br>
><br>
<br>
For simple cases, wrapping a process around the individual resource and<br>
using it as a lock is actually fine and should scale well. If you want<br>
something fancier, there's Ulf's library:<br>
<a href="https://github.com/uwiger/locks" rel="noreferrer" target="_blank">https://github.com/uwiger/locks</a><br>
<br>
Andrew<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div></blockquote></div>