[erlang-questions] Does erlang:now() guarantee that subsequent calls to this BIF returns continuously increasing values even in erlang cluster?

Fred Hebert <>
Mon Apr 20 16:51:13 CEST 2015


On 04/20, Michael Turner wrote:
>If you can make do with a partial order rather than a total order, somehow:
>
>   http://www.erlang.org/doc/man/seq_trace.html
>
>Basically, Lamport clocks.
>

Lamport clocks are one form of it. Sorting by {Node, Timestamp} also 
gives you a partial order. So do vector clocks and version vectors, 
interval tree clocks, and so on.

Lamport/vector clocks and other similar ones operate on *causality*, but 
this partial ordering is not the only one available or workable.

You could have them operating on users, nodes, shards, clusters, 
geographical regions, customers, or any other partitioning mechanism 
desired, for example.

It's important to look at the system and its desired properties to be 
able to figure out which constraints allows us to best fit it to find 
the most appropriate solution possible.

Regards,
Fred.


More information about the erlang-questions mailing list