[erlang-questions] Erlang suitability

ok@REDACTED ok@REDACTED
Fri May 18 18:17:45 CEST 2012


> On Fri, May 18, 2012 at 4:00 AM, Ovid <curtis_ovid_poe@REDACTED> wrote:

>> Use case 2: we periodically need to reauthenticate to the auction
>> system. We
>> MUST NOT have all 75 boxes trying to reauthenticate at the same time
>> because
>> we will be locked out of the system if we do this. Having a central box
>> handling reauthentication is a single point of failure that we would
>> like to
>> avoid, but we don't know what design pattern Erlang would use to ensure
>> that
>> only one of the 75 Erlang instances would attempt to reauthenticate at
>> any
>> one time (all 75 boxes can share the same authentication token).

How *often* is "periodically?
What would happen if each of your boxes just chose times at random?
If you have to re-authenticate once an hour, each box could be given
two 24-second windows to use (time division multiplexing, as it were).
You can probably keep the clocks sufficiently synchronised to make that
work.

Could you use a scheme where each node holds a token and uses
gproc:give_away/2 to pass it to the next node?




More information about the erlang-questions mailing list