leader election again
Apr. 15th, 2013 06:13 pmвот, наткнулся на изделие мартина фаулера: lmax.
интересная и нетривиальная часть, как обычно, упомянута одним предложением: Should the master node go down, it's lack of heartbeat will be noticed, another node becomes master, starts processing input events, and starts its replicator.
вопросы, как обычно - кем will be noticed? что гарантирует единственность нового мастера? чем гарантируется, что старый мастер не очухается - или, если очухается, поймёт, что он уже не мастер?
в любом случае, интересное чтиво, например:
10: While the LMAX team shares much of the current interest in functional programming, they believe that the OO approach provides a better approach for this kind of problem. They've noticed that as they work to write faster code, they move away from a functional style towards OO style. Partly this because of the copying of data that functional styles require to maintain immutability. But it's also because objects provide a better model of a complex domain with a richer choice of data structures.
а, и ещё одного я не понял. почему фаулер считает, что lock приводит к context switching и cache invalidation? To deal with the write contention a queue often uses locks. But if a lock is used, that can cause a context switch to the kernel. When this happens the processor involved is likely to lose the data in its caches.
интересная и нетривиальная часть, как обычно, упомянута одним предложением: Should the master node go down, it's lack of heartbeat will be noticed, another node becomes master, starts processing input events, and starts its replicator.
вопросы, как обычно - кем will be noticed? что гарантирует единственность нового мастера? чем гарантируется, что старый мастер не очухается - или, если очухается, поймёт, что он уже не мастер?
в любом случае, интересное чтиво, например:
10: While the LMAX team shares much of the current interest in functional programming, they believe that the OO approach provides a better approach for this kind of problem. They've noticed that as they work to write faster code, they move away from a functional style towards OO style. Partly this because of the copying of data that functional styles require to maintain immutability. But it's also because objects provide a better model of a complex domain with a richer choice of data structures.
а, и ещё одного я не понял. почему фаулер считает, что lock приводит к context switching и cache invalidation? To deal with the write contention a queue often uses locks. But if a lock is used, that can cause a context switch to the kernel. When this happens the processor involved is likely to lose the data in its caches.
(no subject)
Date: 2013-04-16 09:07 am (UTC)