JPMorganChase Interview Question

How will you synchronize some data access in distributed system ?

Interview Answer

Anonymous

May 28, 2022

It can be done by creating external locking mechanism which will be equivalent of synchronizing a block of code, but externally. I proposed idea of having dedicated lock service, which will be used by other microservices that needs to obtain lock. Also discussed about lock lease and automated lease expiry in case something goes wrong.